Nexus

Deepinfra

Use Deepinfra for serverless open-source model inference with Nexus.

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

Installation

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

Quick Start

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

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

Options

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

Capabilities

CapabilitySupported
ChatYes
StreamingYes
EmbeddingsYes
VisionNo
ToolsYes
ThinkingNo

Models

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

On this page