claude-sonnet-5 API
Claude Sonnet 5 is Anthropic's balanced flagship: near-Opus coding and agent quality at Sonnet speed. Call it on CaMeL Hub with any OpenAI-compatible SDK — set base_url to https://api.camel-hub.com/v1 — at $3 per 1M input tokens and $15 per 1M output tokens. The Anthropic-native Messages format is supported on the same key, so Claude Code and the official Anthropic SDK work unchanged.
Pricing
| per 1M input tokens | per 1M output tokens | |
|---|---|---|
| CaMeL Hub | $3.00 | $15.00 |
| 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
- Agentic coding assistants — connect Cursor, Cline, or your own agent loop through the OpenAI-compatible endpoint for near-Opus code quality at Sonnet cost
- Whole-repository or long-document analysis — contracts, papers, and multi-file codebases fit inside the 1M-token context window in a single request
- Function-calling backends that translate natural-language requests into structured tool calls against internal APIs
- Screenshot and document-image understanding — extract data from UI captures, scanned forms, and charts via vision input
- Customer-facing chat products that need fast streaming first tokens under real traffic
- Automated code review and PR summarization pipelines where literal instruction-following keeps output format stable
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-5",
"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-5",
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-5",
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 5 billed on CaMeL Hub?
Input and output tokens are billed separately: $3 per 1M input tokens and $15 per 1M output tokens at the public default rate. Charges are deducted from your prepaid balance based on the exact token counts of each request — there is no per-seat or minimum fee.
Does it support streaming, function calling, and image input?
Yes to all three. Streaming works over both the OpenAI-compatible and Anthropic-native endpoints; function calling (tools) uses the standard schema of whichever protocol you call; and vision input accepts images alongside text in the same request.
What are the context window and output limits?
Claude Sonnet 5 documents a 1,000,000-token context window with up to 128,000 output tokens per request, per Anthropic's model documentation. For very large outputs, use streaming to avoid client-side HTTP timeouts.
Can I use the OpenAI SDK instead of the Anthropic SDK?
Yes. Point any OpenAI-compatible SDK at base_url https://api.camel-hub.com/v1 with your CaMeL Hub API key and model "claude-sonnet-5" — no code changes beyond configuration. If you prefer Claude-native tooling (Claude Code, the anthropic SDK), the Anthropic Messages endpoint is available on the same key.
How do I get started?
Register at https://api.camel-hub.com/console, top up your balance, and create an API key. Then set base_url to https://api.camel-hub.com/v1 in your SDK, pick model "claude-sonnet-5", and send your first request — the whole setup takes a couple of minutes.