Nexus
1.x
Docs/Nexus/Deepinfra
Open

Reading1 min
Updated31 Jul 2026
Sourcev1/providers/deepinfra.mdx

Deepinfra provides serverless inference for open-source models with embedding support. Uses an OpenAI-compatible API.

Installation01

import "github.com/xraph/nexus/providers/deepinfra"

Quick Start02

provider := deepinfra.New(os.Getenv("DEEPINFRA_API_KEY"))

gw := nexus.New(
    nexus.WithProvider(provider),
)

Options03

OptionDescription
deepinfra.WithBaseURL(url)Override the API base URL (default: https://api.deepinfra.com/v1/openai)

Capabilities04

CapabilitySupported
ChatYes
StreamingYes
EmbeddingsYes
VisionNo
ToolsYes
ThinkingNo

Models05

ModelContextMax OutputInput PriceOutput Price
meta-llama/Meta-Llama-3.1-405B-Instruct131K4,096$1.79/M$1.79/M
meta-llama/Meta-Llama-3.1-8B-Instruct131K4,096$0.06/M$0.06/M
BAAI/bge-large-en-v1.5512$0.01/M