claude-sonnet-4-6 API

25% below list price streamingvisionfunction-calling

Claude Sonnet 4.6 is Anthropic's fast, 1M-token-context Sonnet-tier model for coding, agents, and vision. Call it on CaMeL Hub via the OpenAI-compatible API (base_url https://api.camel-hub.com/v1, model claude-sonnet-4-6) at $2.25 per 1M input tokens and $11.25 per 1M output tokens — streaming, function calling, and image input all work out of the box.

Pricing

per 1M input tokensper 1M output tokens
CaMeL Hub$2.25$11.25
Provider list price$3.00$15.00

Prices are the public default-group rate in USD per 1M tokens; input and output are billed separately. · Provider list price · verified 2026-07-11

Specifications

Provider
Anthropic
Context window
1000000 tokens
Max output
128000 tokens
Capabilities
streaming, vision, function-calling
Endpoints
anthropic, openai
Claude Sonnet 4.6 sits in the sweet spot of the Claude lineup: substantially cheaper and lower-latency than the Opus-tier models, while remaining strong enough for production coding assistants, multi-step agent loops, and document-heavy analysis. Anthropic documents a 1,000,000-token context window and up to 128k output tokens for this model, which means an entire mid-sized codebase or several hundred pages of source material can fit into a single request instead of being chunked through a retrieval pipeline. A practical detail that matters for cost planning: Sonnet 4.6 uses Anthropic's earlier tokenizer, not the newer one introduced with Opus 4.7 and later models. The newer tokenizer produces roughly 30% more tokens for the same text, so on identical inputs Sonnet 4.6 tends to meter fewer tokens than its successors — worth knowing when you compare per-request costs rather than per-token list prices. The model ID claude-sonnet-4-6 is a dateless pinned snapshot, so behavior stays stable over time rather than silently drifting to a newer release. On CaMeL Hub the model is exposed through two endpoint flavors: the OpenAI-compatible /v1/chat/completions route (point any OpenAI SDK at base_url https://api.camel-hub.com/v1 and set model to claude-sonnet-4-6) and the Anthropic-native Messages route for code already written against the Anthropic SDK. Streaming responses, function/tool calling, and vision (image input) are supported on both. Billing is per-token with separate input and output rates — $2.25 per 1M input tokens and $11.25 per 1M output tokens on the public default group — with no extra charge for using the large context window.

What it is good for

Quickstart

OpenAI-compatible: set base_url to https://api.camel-hub.com/v1 and use your CaMeL Hub API key. No SDK changes needed.

cURL

curl https://api.camel-hub.com/v1/chat/completions \
  -H "Authorization: Bearer $CAMEL_HUB_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Python

from openai import OpenAI

client = OpenAI(
    api_key="$CAMEL_HUB_KEY",
    base_url="https://api.camel-hub.com/v1",  # <-- the only change vs. the OpenAI default
)

resp = client.chat.completions.create(
    model="claude-sonnet-4-6",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)

Node.js

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.CAMEL_HUB_KEY,
  baseURL: "https://api.camel-hub.com/v1", // <-- the only change vs. the OpenAI default
});

const resp = await client.chat.completions.create({
  model: "claude-sonnet-4-6",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(resp.choices[0].message.content);

Get an API key Browse integration guides

Frequently asked questions

How is claude-sonnet-4-6 billed on CaMeL Hub?

Billing is per-token, with input and output metered separately: $2.25 per 1M input tokens and $11.25 per 1M output tokens on the public default group. You only pay for what a request actually consumes — there is no per-request fee, and the large context window carries no surcharge. You can pay via balance top-up (Alipay, WeChat Pay, or international cards) or a subscription plan.

Does claude-sonnet-4-6 support streaming, function calling, and image input?

Yes to all three. Streaming works with the standard stream=true parameter, function/tool calling follows the OpenAI tools format on the compatible endpoint (or Anthropic's native tool schema on the Messages endpoint), and you can pass images as input for vision tasks such as screenshot or document understanding.

What are the context window and maximum output for this model?

Anthropic documents a 1,000,000-token context window and up to 128k output tokens for Claude Sonnet 4.6. That is roughly 750k English words of input capacity — enough for entire codebases or book-length documents in one request.

Can I use the OpenAI SDK to call claude-sonnet-4-6?

Yes. CaMeL Hub exposes an OpenAI-compatible endpoint, so the official OpenAI SDK for Python or Node.js works unchanged: set base_url to https://api.camel-hub.com/v1, use your CaMeL Hub API key, and set model to claude-sonnet-4-6. If your code is written against the Anthropic SDK instead, the Anthropic-native endpoint is also available.

How do I get started?

Create an account at https://api.camel-hub.com/console, generate an API key, and send your first request with model set to claude-sonnet-4-6. New accounts can start with a small top-up — there is no minimum commitment, and usage logs in the console show the exact token counts and cost of every call.

More from Anthropic

Compare with other models