Nexus

Anthropic

Use Anthropic Claude models with Nexus — vision, tools, and extended thinking.

The Anthropic provider connects to the Anthropic Messages API for chat completions, streaming, vision, tool calling, and extended thinking.

Installation

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

Quick Start

provider := anthropic.New(os.Getenv("ANTHROPIC_API_KEY"))

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

Options

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

Capabilities

CapabilitySupported
ChatYes
StreamingYes
EmbeddingsNo
VisionYes
ToolsYes
ThinkingYes

Models

ModelContextMax OutputInput PriceOutput Price
claude-sonnet-4-5-20250514200K8,192$3.00/M$15.00/M
claude-opus-4-5-20250630200K8,192$15.00/M$75.00/M
claude-3-5-haiku-20241022200K8,192$0.80/M$4.00/M
claude-3-5-sonnet-20241022200K8,192$3.00/M$15.00/M

On this page