claude-sonnet-5 API

At provider list price streamingvisionfunction-calling

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 tokensper 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
Claude Sonnet 5 is the first Sonnet-tier model to ship with a 1M-token context window and 128K max output, and Anthropic positions it as the best combination of speed and intelligence in the lineup. Its largest gains over Sonnet 4.6 are in coding and agentic work, where it reaches quality that previously required an Opus-tier model — while staying in the "fast" latency class and at a fraction of Opus-tier per-token cost. In practice the model is noticeably more agentic than its predecessors: it reaches for tools readily, runs its own verification loops, and follows instructions literally rather than guessing at intent. That literalism makes it a strong fit for production pipelines — structured extraction, function-calling backends, and carefully tuned prompts behave predictably instead of drifting. It also accepts image input, so screenshot understanding, document photos, and UI analysis run through the same endpoint as text. On CaMeL Hub, Claude Sonnet 5 is exposed through two protocols on one API key: the OpenAI-compatible chat/completions route (change base_url, keep your existing SDK and code) and the Anthropic-native Messages route (drop-in for Claude Code, the anthropic SDK, and other Claude-first tools). Streaming is supported on both. Billing is purely usage-based per token at the public rate of $3 per million input tokens and $15 per million output tokens, with top-ups via Alipay, WeChat Pay, or international cards, plus optional subscription plans for steady workloads.

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-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.

More from Anthropic

Compare with other models