claude-sonnet-4-6 API
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 tokens | per 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
What it is good for
- Whole-repo code review and refactoring assistants — load a mid-sized codebase directly into the 1M-token context instead of building a chunking pipeline
- Long-document analysis: contracts, financial filings, technical specs, or discovery material processed in a single request with citations back to the source
- Agentic workflows with function calling — customer-support triage, data-extraction pipelines, and multi-step tool loops where Opus-tier pricing would be overkill
- Vision tasks such as reading screenshots, dashboards, scanned forms, and charts, then returning structured JSON via tool calls
- High-volume RAG chat backends that need Sonnet-class quality at fast latency and mid-tier per-token cost
- A stable pinned target for teams migrating off claude-sonnet-4-5 who want 1M context and 128k max output without rewriting their integration
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.