Claude API proxy with pay-per-token pricing. Compatible with Anthropic API format.
The Messages API is compatible with the official Anthropic API format. It supports streaming, vision, tool use, and extended thinking features.
/api/v1/messagesPrices are per 1M tokens
| Model | Input | Output | Description |
|---|---|---|---|
| claude-opus-5 | $3.0000/1M | $15.0000/1M | Newest Opus · 1M context · agentic coding |
| claude-fable-5-1 | $5.0000/1M | $25.0000/1M | Newest Fable generation, same price as Fable 5 |
| claude-fable-5 | $5.0000/1M | $25.0000/1M | Public flagship, multimodal + ultra-long context |
| claude-opus-4-8 | $3.0000/1M | $13.0001/1M | Most capable Opus, long-horizon work |
| claude-opus-4-7 | $3.6760/1M | $18.3820/1M | 1M context, adaptive thinking |
| claude-opus-4-7-thinking | $3.6760/1M | $18.3820/1M | Opus 4.7 + Thinking |
| claude-haiku-4-5-20251001 | $0.3530/1M | $1.7650/1M | Fast, affordable |
| claude-haiku-4-5-20251001-thinking | $0.3530/1M | $1.7650/1M | Haiku + Thinking |
| claude-sonnet-4-5-20250929 | $1.0590/1M | $5.2950/1M | Sonnet 4.5 |
| claude-sonnet-4-5-20250929-thinking | $1.0590/1M | $5.2950/1M | Sonnet 4.5 + Thinking |
| claude-sonnet-5 | $1.6000/1M | $8.0000/1M | Newest Sonnet · 1M context · adaptive thinking. Billed output tokens include thinking tokens |
| claude-sonnet-4-6 | $1.0590/1M | $5.2950/1M | Latest Sonnet |
| claude-sonnet-4-6-thinking | $1.0590/1M | $5.2950/1M | Latest Sonnet + Thinking |
| claude-opus-4-6 | $1.7650/1M | $8.8240/1M | Latest Opus |
| claude-opus-4-6-thinking | $1.7650/1M | $8.8240/1M | Latest Opus + Thinking |
| claude-opus-4-5-20251101 | $1.7650/1M | $8.8240/1M | Opus 4.5 |
| claude-opus-4-5-20251101-thinking | $1.7650/1M | $8.8240/1M | Opus 4.5 + Thinking |
curl -X POST https://api.apimodels.app/v1/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-5-20250929",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello, Claude!"}
]
}'{
"id": "msg_01XFDUDYJgAACzvnptvVoYEL",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Hello! How can I help you today?"
}
],
"model": "claude-sonnet-4-5-20250929",
"stop_reason": "end_turn",
"usage": {
"input_tokens": 12,
"output_tokens": 10
}
}For *-thinking models, you can enable extended thinking for complex reasoning tasks.
curl -X POST https://api.apimodels.app/v1/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-5-20250929-thinking",
"max_tokens": 16000,
"thinking": {
"type": "enabled",
"budget_tokens": 10000
},
"messages": [
{"role": "user", "content": "Solve this step by step: What is 15% of 340?"}
]
}'Set stream: true to receive Server-Sent Events (SSE). Strongly recommended for long generations: non-streaming requests that take longer than ~100 seconds to produce a first byte hit the CDN gateway timeout and return an HTML 524 page even though the generation completes (and is billed) server-side. If you expect more than a few hundred output tokens or use thinking/reasoning models, stream — or poll asynchronously.
curl -X POST https://api.apimodels.app/v1/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-5-20250929",
"max_tokens": 1024,
"stream": true,
"messages": [
{"role": "user", "content": "Write a short poem about coding."}
]
}'Repeated prefixes — a system prompt, a codebase dump, a long document — can be cached upstream and re-read at a fraction of the input rate. Cache prices are per model; see the price on each model page.
Claude: mark the last block of the stable prefix with cache_control. Reads come back as cache_read_input_tokens and writes as cache_creation_input_tokens, with the 5-minute and 1-hour TTLs broken out under cache_creation. Both TTLs bill at the same cache-write rate here, so passing ttl:"1h" costs nothing extra.
The cached prefix must be byte-identical between calls — one changed character (a timestamp, a re-ordered tool list) misses the cache and you pay the full input rate. Put everything variable at the END of the prompt.
{
"model": "claude-fable-5-1",
"max_tokens": 1024,
"system": [
{
"type": "text",
"text": "<long, unchanging instructions or document>",
"cache_control": { "type": "ephemeral" }
}
],
"messages": [{ "role": "user", "content": "<the part that changes>" }]
}Credits are calculated from actual token usage, across four tiers: full-rate input, cached input, cache writes and output. Reasoning / thinking tokens are billed at the OUTPUT rate and are not part of the visible answer — on Claude they are counted in output_tokens, on Gemini they arrive as thoughtsTokenCount alongside candidatesTokenCount, and on GPT-5.6 as reasoning_tokens inside completion_tokens. A model that thinks a lot can bill several times what the visible reply suggests. Failed requests are never billed.
Cost = (input_tokens * input_price + cached_tokens * cache_read_price
+ cache_write_tokens * cache_write_price + output_tokens * output_price) / 1,000,000
Credits = Cost // amounts are in USD ($)Todos os modelos são chamados por uma API unificada e uma única chave. Clique em um modelo para o playground e a documentação.
| Modelo | model (API) | Preço | Detalhes |
|---|---|---|---|
| Claude Opus 5 | claude-opus-5 | $3 / $15 | Anthropic's newest Opus — a step change on deep reasoning, agentic coding and long-horizon work, at 40% off official pricing. 1M context, adaptive thinking on by default, native tool use. Works with Claude Code, Cursor and the OpenAI SDK alike. |
| Claude Fable 5.1 | claude-fable-5-1 | $5 / $25 | Anthropic's September 2026 flagship — exactly half Anthropic's $10/$50 list price. More than doubles Fable 5 on agentic science (52.6% vs 24.7% on Terminal-Bench-Science) and tops it on every published benchmark. 1M context, native Anthropic Messages API, so Claude Code, the SDK and Cursor work unchanged. |
| Claude Fable 5 | claude-fable-5 | $5 / $25 | Anthropic's high-end public LLM — about 50% cheaper than official. Works with Claude Code & Cursor via the Anthropic API. Ultra-long context, multimodal, complex reasoning, strict safety. |
| Claude Opus 4.8 | claude-opus-4-8 | $3 / $13 | Anthropic's most capable model yet — built to autonomously carry long, complex work end to end. Ideal for big projects, building agents, and high-stakes scenarios demanding top quality and autonomy. |
| Claude Opus 4.7 | claude-opus-4-7 | $3.676 / $18.382 | Latest Opus model with 1M context, 128K max output, and adaptive thinking — same tools and platform features as Opus 4.6. |
| Claude Opus 4.7 (Thinking) | claude-opus-4-7-thinking | $3.676 / $18.382 | Claude Opus 4.7 with extended thinking explicitly enabled for the most complex reasoning tasks. |
| Claude Opus 4.6 | claude-opus-4-6 | $1.765 / $8.824 | Latest Opus model with ultimate performance and reasoning capabilities. |
| Claude Opus 4.6 (Thinking) | claude-opus-4-6-thinking | $1.765 / $8.824 | Claude Opus 4.6 with extended thinking capability for the most complex reasoning tasks. |
| Claude Sonnet 5 | claude-sonnet-5 | $1.60 / $8.00 | Anthropic's newest Sonnet — 1M-token context (default & max), 128K max output, adaptive thinking, and the same tools & platform features as Sonnet 4.6 (Priority Tier not supported). Works with Claude Code & Cursor via the Anthropic API. |
| Claude Sonnet 4.6 | claude-sonnet-4-6 | $1.059 / $5.295 | Latest Sonnet model with best performance and efficiency. |
| Claude Sonnet 4.6 (Thinking) | claude-sonnet-4-6-thinking | $1.059 / $5.295 | Claude Sonnet 4.6 with extended thinking capability for complex reasoning tasks. |
| Claude Opus 4.5 | claude-opus-4-5-20251101 | $1.765 / $8.824 | Latest Opus model with enhanced capabilities and improved reasoning. |
| Claude Opus 4.5 (Thinking) | claude-opus-4-5-20251101-thinking | $1.765 / $8.824 | Claude Opus 4.5 with extended thinking capability for the most complex reasoning tasks. |
| Claude Sonnet 4.5 | claude-sonnet-4-5-20250929 | $1.059 / $5.295 | Latest Sonnet model with improved performance and efficiency. |
| Claude Sonnet 4.5 (Thinking) | claude-sonnet-4-5-20250929-thinking | $1.059 / $5.295 | Claude Sonnet 4.5 with extended thinking capability for complex reasoning tasks. |
| Claude Haiku 4.5 | claude-haiku-4-5-20251001 | $0.353 / $1.765 | Fast and affordable model for lightweight tasks. Best for simple queries and quick responses. |
| Claude Haiku 4.5 (Thinking) | claude-haiku-4-5-20251001-thinking | $0.353 / $1.765 | Claude Haiku 4.5 with extended thinking capability for complex reasoning tasks. |
| Gemini 3.8 Flash | gemini-3.8-flash | $0.450 / $2.250 | Google's September 2026 Flash — 40% below Google's own $0.75/$3.75 list. Tops DeepSWE v1.1 and scores 89.4% on Terminal-Bench 2.1; beats Claude Opus 5 on HLE-Verified, Vals Finance Agent v2 and Harvey's Legal Agent. 1M context, built for coding and agents. |
| Gemini 3.6 Flash | gemini-3.6-flash | $0.662 / $3.302 | Same input price as 3.5 Flash with cheaper output, for agentic and long-horizon work where the answer, not the prompt, dominates the bill. For the lowest bill outright, see 3.8 Flash. |
| Gemini 3.5 Flash | gemini-3.5-flash | $0.662 / $3.971 | GA release. Our most intelligent Flash model — consistent leadership on agentic execution, coding, and long-horizon tasks at scale. |
| Gemini 3.1 Flash Lite | gemini-3.1-flash-lite | $0.375 / $2.25 | Most cost-effective multimodal model with fastest performance for high-frequency lightweight tasks. |
| Gemini 3.1 Pro Preview | gemini-3.1-pro-preview | $0.882 / $5.294 | Latest Pro model with enhanced reasoning and multimodal capabilities. |
| Gemini 3 Flash Preview | gemini-3-flash-preview | $0.2 / $1.2 | Fast and efficient multimodal model. Great for quick responses and simple tasks. |
| Gemini 3 Pro Preview | gemini-3-pro-preview | $1.6 / $9.6 | Advanced multimodal reasoning model with superior capabilities. |
| Gemini 3 Pro (Thinking) | gemini-3-pro-preview-thinking | $1.6 / $9.6 | Gemini 3 Pro with extended thinking capability for complex reasoning tasks. |
| GPT-6 Astra | gpt-6-astra | $2.40 / $12.00 | OpenAI's September 2026 flagship — 76% below the $10/$50 list. Built for computer use and long-horizon agents: 72.6% on OSWorld 2.0 and 57.7% on Terminal-Bench 4.0 against Sol's 65.7% and 37.3%. 1.05M context, 128K output, text + vision in. |
| GPT-5.6 Sol | gpt-5-6-sol | $1.324 / $6.618 | GPT-5.6 Sol is the frontier model in the GPT-5.6 family — OpenAI's highest-intelligence tier (the gpt-5.6 alias routes to Sol), roughly the unsuffixed top tier of earlier GPT-5 families. Reasoning-token support, text + image input, 1.05M-token context, 128K max output, Feb 2026 knowledge cutoff. Call it on /v1/chat/completions or /v1/responses — one key, well below OpenAI list, reachable from China. |
| GPT-5.6 Terra | gpt-5-6-terra | $0.551 / $3.309 | GPT-5.6 Terra balances intelligence and cost — the mini tier of the GPT-5.6 family, priced at half of Sol's output rate and about 40% of its input rate. Higher reasoning, fast, text + image input, text output, 1.05M-token context, 128K max output, Feb 2026 knowledge cutoff, reasoning-token support. Call it on /v1/chat/completions or /v1/responses — one key, well below OpenAI list, reachable from China. |
| GPT-5.6 Luna | gpt-5-6-luna | $0.16 / $0.96 | GPT-5.6 Luna is optimized for cost-sensitive, high-volume workloads — the nano tier of the GPT-5.6 family, priced at about a seventh of Sol's output rate and an eighth of its input rate. High reasoning, fast, text + image input, text output, 1.05M-token context, 128K max output, Feb 2026 knowledge cutoff, reasoning-token support. Served as gpt-5.6-luna-max on /v1/chat/completions or /v1/responses — one key, 20% below OpenAI's $0.20 / $1.20 list, pay-as-you-go, reachable from China. |
| Grok 4.6 | grok-4.6 | $1.765 / $5.294 | xAI's newest frontier model, built for long-running agents and multi-step work — it matches GPT-5.6 Sol on the Artificial Analysis Intelligence Index. 500K context, text + image input, four reasoning-effort levels, and function calling verified at 12/12 under concurrency with nested schemas. 12% below xAI official ($2 / $6 per 1M). |
| Grok 4.5 | grok-4.5 | $1.5 / $5 | xAI's newest flagship model — leads the industry in coding, non-hallucination rate, agentic tool calling, and instruction following. Supports both non-reasoning and reasoning modes, 500K context. Cheaper than xAI official ($2 / $6 per 1M tokens): 25% off input, ~17% off output. |
| GPT-5.5 | gpt-5-5 | $3 / $18 | OpenAI’s advanced reasoning model for agentic coding, knowledge work, scientific research, and complex multi-step task execution. Served via the Responses API with adjustable reasoning effort (low–xhigh), web search, and function calling. |
| GPT-5.4 | gpt-5-4 | $1.8 / $10.8 | Frontier model for complex professional work and agentic coding. Served via the Responses API with adjustable reasoning effort (low–xhigh), web search, and function calling. |
| GLM-5.2 | glm-5.2 | $1.26 / $3.96 | Zhipu GLM-5.2 — a reasoning model with strong function-calling / tool-use, served via the OpenAI-compatible chat-completions endpoint. |
| GLM-5.3 | glm-5.3 | $1.33 / $4.18 | Zhipu GLM-5.3 — Z.ai's newest reasoning model, built for long-horizon agent work and complex software engineering. 1M-token context, strong function calling, served over the OpenAI-compatible chat-completions endpoint. |
| DeepSeek V4 Flash | deepseek-v4-flash | $0.12 / $0.24 | DeepSeek V4 Flash — the lightweight, high-throughput, cost-effective member of the DeepSeek V4 family for general chat and basic text. 1M-token context, tool calling, streaming; OpenAI-compatible. |
| DeepSeek V4 Pro | deepseek-v4-pro | $0.37 / $0.74 | DeepSeek V4 Pro — DeepSeek’s high-performance model with top-tier reasoning and agent capabilities, 1M-token context, and full thinking (reasoning_content) output. Tool calling, streaming; OpenAI-compatible. |
| Qwen3.7 Max | qwen3.7-max | $1.76 / $5.29 | Alibaba Qwen3.7 Max — the most capable Qwen3.7 model: top-tier reasoning and agent ability, 1M-token context, hybrid thinking. Tool calling, streaming; OpenAI-compatible. |
| Qwen3.7 Plus | qwen3.7-plus | $0.88 / $1.18 | Alibaba Qwen3.7 Plus — the best-value Qwen3.7 model: strong reasoning at a fraction of Max’s price, 1M-token context, hybrid thinking. Tool calling, streaming; OpenAI-compatible. |
| Text Embedding 3 Small | text-embedding-3-small | $0.018 / 1M tokens | Small embedding model, efficient and cost-effective for most use cases. |
| Text Embedding 3 Large | text-embedding-3-large | $0.059 / 1M tokens | Large embedding model for higher accuracy and flexible dimensions. |
POST /api/v1/messages with a model like claude-opus-4-8 or gemini-3-pro-preview; routing is automatic by model prefix. OpenAI-format models (gpt-, grok-, glm-) also work via /v1/chat/completions.
Yes — LLM calls are billed per token below official list price, with no monthly fee. One key covers Claude, Gemini, GPT, Grok, GLM and more, so you avoid multiple vendor accounts.
Yes. Set stream: true for SSE streaming; tool/function calling passes through to the upstream model. Works with the Anthropic and OpenAI SDKs by changing the base URL.