APIMODELSAPIMODELS
Документация API

apimodels.app

Docs/Language Models API
LLM

Language Models API

Claude API proxy with pay-per-token pricing. Call it in OpenAI Chat Completions format (below) or in the native Anthropic Messages format.

Overview

The examples on this page use the OpenAI-compatible /v1/chat/completions endpoint. The same key also works with the native Anthropic Messages API at /v1/messages: point the Anthropic SDK (or Claude Code) at https://api.apimodels.app. Both support streaming, vision, tool use and extended thinking.

Endpoint

POST/api/v1/chat/completions

Available Models

Prices are per 1M tokens

ModelInputOutputDescription
claude-opus-5-5$2.4000/1M$12.0000/1MFirst of the Claude 5.5 family · 1M context · 40% below list
claude-sonnet-5-5$1.2000/1M$6.0000/1MClaude 5.5 Sonnet · 30%+ faster than Sonnet 5 · 1M context · 40% below list
claude-haiku-5-5$0.0900/1M$0.4500/1MClaude 5.5 Haiku · ahead of GPT-6 Luna on shared benchmarks · 1M context · 10% below list
claude-opus-5$3.0000/1M$15.0000/1MNewest Opus · 1M context · agentic coding
claude-fable-5-1$5.0000/1M$25.0000/1MNewest Fable generation, same price as Fable 5
claude-fable-5$5.0000/1M$25.0000/1MPublic flagship, multimodal + ultra-long context
claude-opus-4-8$3.0000/1M$13.0001/1MMost capable Opus, long-horizon work
claude-opus-4-7$3.6760/1M$18.3820/1M1M context, adaptive thinking
claude-opus-4-7-thinking$3.6760/1M$18.3820/1MOpus 4.7 + Thinking
claude-haiku-4-5-20251001$0.3530/1M$1.7650/1MFast, affordable
claude-haiku-4-5-20251001-thinking$0.3530/1M$1.7650/1MHaiku + Thinking
claude-sonnet-4-5-20250929$1.0590/1M$5.2950/1MSonnet 4.5
claude-sonnet-4-5-20250929-thinking$1.0590/1M$5.2950/1MSonnet 4.5 + Thinking
claude-sonnet-5$1.6000/1M$8.0000/1MPrevious Sonnet (newest is Sonnet 5.5) · 1M context · adaptive thinking. Billed output tokens include thinking tokens
claude-sonnet-4-6$1.0590/1M$5.2950/1MSonnet 4.6 (earlier generation)
claude-sonnet-4-6-thinking$1.0590/1M$5.2950/1MSonnet 4.6 + Thinking
claude-opus-4-6$1.7650/1M$8.8240/1MLatest Opus
claude-opus-4-6-thinking$1.7650/1M$8.8240/1MLatest Opus + Thinking
claude-opus-4-5-20251101$1.7650/1M$8.8240/1MOpus 4.5
claude-opus-4-5-20251101-thinking$1.7650/1M$8.8240/1MOpus 4.5 + Thinking

Request Parameters

modelrequiredstring
The model to use (see table above)
messagesrequiredarray
Array of messages with role (user/assistant) and content
max_tokensinteger
Maximum tokens to generate. Default: 1024
systemstring
System prompt to set context
streamboolean
Enable streaming responses. Default: false
temperaturenumber
Sampling temperature (0-1). Default: 1
thinkingobject
Enable extended thinking for *-thinking models

Basic Request

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!"}
    ]
  }'

Response

{
  "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
  }
}

Extended Thinking

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?"}
    ]
  }'

Streaming

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."}
    ]
  }'

Prompt Caching

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>" }]
}

Billing

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 ($)

Error Codes

400Invalid request parameters
401Invalid or missing API key
402Insufficient credits
404Model not found
429Rate limit exceeded
500Internal server error

All LLM Models & Pricing

Every model below is callable through one unified API and a single key. Click a model for its full playground and docs.

Modelmodel (API)PriceDetails
Claude Opus 5.5claude-opus-5-5$2.40 / $12.00Anthropic's first Claude 5.5 model, released 22 September 2026: Fable 5.1-level results on most work at 40% lower running cost than Opus 5, per Anthropic. 1M context, 128K output, adaptive thinking always on, knowledge cutoff June 2026. $2.40 / $12.00 per 1M tokens on APIMODELS — 40% below the $4 / $20 list — with cache reads at $0.12.
Claude Sonnet 5.5claude-sonnet-5-5$1.20 / $6.00Anthropic's Sonnet 5.5, released 28 September 2026: 30%+ faster output than Sonnet 5 and up to 30% less per task, with Terminal-Bench 4.0 at 70.6% against 10.3%, per Anthropic. 1M context, 128K output, adaptive thinking (default effort high), knowledge cutoff June 2026. $1.20 / $6.00 per 1M tokens on APIMODELS — 40% below the $2 / $10 list — with cache reads at $0.12 and cache writes at $1.50.
Claude Haiku 5.5claude-haiku-5-5$0.09 / $0.45Anthropic's Haiku 5.5, released 7 October 2026, for high-volume work. Per Anthropic: GDPval-AA 1620 (Haiku 4.5: 735) and OSWorld 2.1 72.4%, ahead of GPT-6 Luna on every benchmark both report. 1M context, 128K output, adaptive thinking (default effort medium). $0.09 / $0.45 per 1M tokens on APIMODELS — 10% below the $0.10 / $0.50 list — with cache reads at $0.009; prompts over 100K tokens bill at 5×.
Claude Opus 5claude-opus-5$3 / $15Anthropic'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.1claude-fable-5-1$5 / $25Anthropic'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 5claude-fable-5$5 / $25Anthropic's high-end public LLM — about 50% less than official. Works with Claude Code & Cursor via the Anthropic API. Ultra-long context, multimodal, complex reasoning, strict safety.
Claude Opus 4.8claude-opus-4-8$3 / $13Anthropic'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.7claude-opus-4-7$3.676 / $18.382Latest 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.382Claude Opus 4.7 with extended thinking explicitly enabled for the most complex reasoning tasks.
Claude Opus 4.6claude-opus-4-6$1.765 / $8.824Latest Opus model with ultimate performance and reasoning capabilities.
Claude Opus 4.6 (Thinking)claude-opus-4-6-thinking$1.765 / $8.824Claude Opus 4.6 with extended thinking capability for the most complex reasoning tasks.
Claude Sonnet 5claude-sonnet-5$1.60 / $8.00Anthropic's previous Sonnet (the newest is Sonnet 5.5) — 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.6claude-sonnet-4-6$1.059 / $5.295Claude Sonnet 4.6, an earlier-generation Sonnet balancing quality and efficiency. The newest Sonnet is Sonnet 5.5.
Claude Sonnet 4.6 (Thinking)claude-sonnet-4-6-thinking$1.059 / $5.295Claude Sonnet 4.6 with extended thinking capability for complex reasoning tasks.
Claude Opus 4.5claude-opus-4-5-20251101$1.765 / $8.824Latest Opus model with enhanced capabilities and improved reasoning.
Claude Opus 4.5 (Thinking)claude-opus-4-5-20251101-thinking$1.765 / $8.824Claude Opus 4.5 with extended thinking capability for the most complex reasoning tasks.
Claude Sonnet 4.5claude-sonnet-4-5-20250929$1.059 / $5.295Claude Sonnet 4.5, the Claude 4.5-generation Sonnet with improved performance and efficiency over earlier Sonnets. The newest Sonnet is Sonnet 5.5.
Claude Sonnet 4.5 (Thinking)claude-sonnet-4-5-20250929-thinking$1.059 / $5.295Claude Sonnet 4.5 with extended thinking capability for complex reasoning tasks.
Claude Haiku 4.5claude-haiku-4-5-20251001$0.353 / $1.765Fast 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.765Claude Haiku 4.5 with extended thinking capability for complex reasoning tasks.
Gemini 4 Argongemini-4-argon$1.10 / $5.50Google's flagship reasoning model, announced 30 Sep 2026 and on the Gemini API from 13 Oct. Per Google: DeepSWE v1.1 77.9%, LVBench 91.7%, CWE-bench v1 68% (tied first), AutomationBench 51.3% (first). 1M context, up to 65,536 output tokens per response. $1.10 / $5.50 per 1M tokens through 30 Nov, $2.20 / $11.00 from 1 Dec 2026 — 45% below Google's list either way.
Gemini 3.8 Flashgemini-3.8-flash$0.450 / $2.250Google's September 2026 Flash — 40% below Google's own $0.75/$3.75 list. Topped DeepSWE v1.1 at launch 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 Flashgemini-3.6-flash$0.662 / $3.302Same input price as 3.5 Flash with more affordable 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 Flashgemini-3.5-flash$0.662 / $3.971GA release. Our most intelligent Flash model — consistent leadership on agentic execution, coding, and long-horizon tasks at scale.
Gemini 3.1 Flash Litegemini-3.1-flash-lite$0.375 / $2.25Most cost-effective multimodal model with fastest performance for high-frequency lightweight tasks.
Gemini 3.1 Pro Previewgemini-3.1-pro-preview$0.882 / $5.294Gemini 3.x Pro preview with enhanced reasoning and multimodal input. For Google's newer flagship, see Gemini 4 Argon.
Gemini 3 Flash Previewgemini-3-flash-preview$0.2 / $1.2Fast and efficient multimodal model. Great for quick responses and simple tasks.
Gemini 3 Pro Previewgemini-3-pro-preview$1.6 / $9.6Advanced multimodal reasoning model with superior capabilities.
Gemini 3 Pro (Thinking)gemini-3-pro-preview-thinking$1.6 / $9.6Gemini 3 Pro with extended thinking capability for complex reasoning tasks.
GPT-6 Solgpt-6-sol$1.00 / $5.00OpenAI's GPT-6 workhorse tier, released September 2026 alongside Luna: much of GPT-6 Astra's strength in a faster, more affordable model, at half OpenAI's own $2 / $10 list. 1.05M context, 128K output, text and image input, knowledge cutoff 20 April 2026, reasoning_effort from none to max. $1.00 / $5.00 per 1M tokens, cached input $0.10.
GPT-6.1 Solgpt-6.1-sol$1.00 / $5.00OpenAI's upgraded Sol, released 29 September 2026: higher scores than GPT-6 Sol on coding and automation benchmarks at the same $2 / $10 list, with cached input halved to $0.10. $1.00 / $5.00 per 1M tokens on APIMODELS — half the list — and $0.05 cached. 1.05M context, 128K output, text and image input, knowledge cutoff 30 April 2026, reasoning_effort low to max.
GPT-6.1 Terragpt-6.1-terra$0.50 / $2.50OpenAI's GPT-6.1 Terra, released October 2026: a fast, efficient model OpenAI aims at visual reasoning, computer use and natural writing, listed at half the price of GPT-6.1 Sol. $0.50 / $2.50 per 1M tokens on APIMODELS — half the $1 / $5 list — and $0.025 cached. 1.05M context, 128K output, text and image input, knowledge cutoff 1 June 2026, reasoning_effort none to max.
GPT-6 Lunagpt-6-luna$0.09 / $0.45OpenAI's most efficient GPT-6 model for focused, high-volume tasks, released September 2026 with Sol. 1.05M context, 128K output, text and image input, knowledge cutoff 18 May 2026, reasoning_effort from none to max. $0.09 / $0.45 per 1M tokens on APIMODELS — 10% below the $0.10 / $0.50 list — with cached input at $0.009.
GPT-6 Astragpt-6-astra$3.40 / $17.00OpenAI's September 2026 flagship — 66% below the $10/$50 list. Through this API you get function calling, built-in web search and code interpreter; the computer-use tool is not available. Its usable gains are long-horizon agents and terminal work: 57.7% on Terminal-Bench 4.0 and 88.0% on SRE-Bench against Sol's 37.3% and 55.9%. 1.05M context, 128K output, text + vision in.
GPT-5.6 Solgpt-5-6-sol$1.324 / $6.618GPT-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 Terragpt-5-6-terra$0.551 / $3.309GPT-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 Lunagpt-5-6-luna$0.18 / $0.96GPT-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 input and output rates. 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, below OpenAI's $0.20 / $1.20 list (10% on input, 20% on output), pay-as-you-go, reachable from China.
Grok 4.6grok-4.6$1.50 / $4.50xAI'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. 25% below xAI official ($2 / $6 per 1M).
Grok 4.5grok-4.5$1.275 / $4.25xAI'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. More affordable than xAI official ($2 / $6 per 1M tokens): 36% off input, ~29% off output.
GPT-5.5gpt-5-5$3 / $18OpenAI’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.4gpt-5-4$1.8 / $10.8Frontier 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.2glm-5.2$1.26 / $3.96Zhipu GLM-5.2 — a reasoning model with strong function-calling / tool-use, served via the OpenAI-compatible chat-completions endpoint.
GLM-5.3glm-5.3$1.33 / $4.18Zhipu 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 Flashdeepseek-v4-flash$0.27 / $1.08DeepSeek 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.1 Flashdeepseek-v4.1-flash$0.27 / $1.08DeepSeek V4.1 Flash — the newer V4.1 generation of DeepSeek’s fast, high-throughput model. 1M-token context, tool calling, JSON output and streaming; OpenAI-compatible. Billed on DeepSeek’s peak / off-peak schedule.
DeepSeek V4 Prodeepseek-v4-pro$1.247 / $3.742DeepSeek 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 Maxqwen3.7-max$2.25 / $6.75Alibaba 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 Plusqwen3.7-plus$0.36 / $1.44Alibaba 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.
Qwen3.8 Maxqwen3.8-max$2.00 / $6.00Alibaba Qwen3.8 Max — the newest Qwen flagship. Reasoning-first with graded effort (low / medium / xhigh), 1M-token context, tool calling and streaming; OpenAI-compatible.
Qwen3.8 Flashqwen3.8-flash$0.15 / $0.47Alibaba Qwen3.8 Flash — the most affordable reasoning model in the Qwen3.8 line: same graded thinking effort as Max at a fraction of the price, 1M-token context, tool calling and streaming.
Jevjev$0.05 / $0.00TypeSafe's Jev — a System One decision model, not a chat model: send your application state plus typed questions (choice / score / noul) and get answers with probabilities and confidence, evaluated in parallel. $0.05 per 1M input tokens, output free, billed per token with no per-call minimum. Same POST /v1/systemone request and response as TypeSafe, so the official SDK works with only base_url and the key changed.
Text Embedding 3 Smalltext-embedding-3-small$0.018 / 1M tokensSmall embedding model, efficient and cost-effective for most use cases.
Text Embedding 3 Largetext-embedding-3-large$0.059 / 1M tokensLarge embedding model for higher accuracy and flexible dimensions.

FAQ

How do I call Claude and Gemini with one API key?

POST /api/v1/messages with a model like claude-opus-5-5 or gemini-3-pro-preview; routing is automatic by model prefix. OpenAI-format models (gpt-, grok-, glm-) also work via /v1/chat/completions.

Is it more affordable than the official Claude / OpenAI API?

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.

Do you support streaming and tool calling?

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.

Модели на этой странице