API pricing

What breaks when you switch AI APIs

What breaks when you move an app from one AI API to another, at 10 providers: strict JSON schemas, parallel tool calls, streamed tool arguments, reasoning with tools, and caching of tool definitions. Each answer is yes, partly, no or not stated, with the provider’s own words and the date we read them, or with our own test call and its date.

Before you switch

  • Strict JSON schemas: partly at DeepSeek, Alibaba Cloud (Qwen), Z.ai (GLM). Code that parses answers without checks starts failing where a provider promises only valid JSON, not your schema.
  • Parallel tool calls: partly at Groq; not stated at DeepSeek, Z.ai (GLM). An agent built around several calls per turn gets one call per turn: more round trips, more input tokens, slower runs.
  • Streamed tool arguments: no at xAI, Groq, Mistral; partly at Z.ai (GLM). An interface that shows arguments as they are written sees nothing until the whole call is ready.
  • Reasoning with tools: partly at Cerebras; not stated at Mistral. Switching reasoning on can rule out some tool settings or output formats, or the other way round.
  • Cache covers tool definitions: not stated at Google Gemini, DeepSeek, Alibaba Cloud (Qwen), xAI, Mistral, Z.ai (GLM). Where the cache does not cover tool definitions, a long tool list is paid as fresh input on every request.

At a glance

ProviderStrict JSON schemasParallel tool callsStreamed tool argumentsReasoning with toolsCache covers tool definitions
AnthropicYes PublishedObservedYes PublishedYes PublishedYes PublishedYes Published
OpenAIYes PublishedObservedYes PublishedYes PublishedYes PublishedYes Published
Google GeminiYes PublishedObservedYes PublishedYes PublishedYes PublishedNot stated Published
DeepSeekPartly PublishedObservedNot stated UnknownYes ObservedYes PublishedNot stated Published
Alibaba Cloud (Qwen)Partly PublishedObservedYes PublishedYes ObservedYes PublishedNot stated Published
xAIYes PublishedYes PublishedNo PublishedYes PublishedNot stated Unknown
GroqYes PublishedPartly PublishedNo ObservedYes PublishedYes Published
CerebrasYes PublishedYes PublishedYes ObservedPartly PublishedYes Published
MistralYes PublishedYes PublishedNo ObservedNot stated PublishedNot stated Published
Z.ai (GLM)Partly PublishedObservedNot stated PublishedPartly PublishedYes PublishedNot stated Published

Published Published: quoted from the provider’s documentation, with a link and the date we read it. Observed Observed: our own test call, with its date. Unknown Unknown: not stated in the documentation we read.

Strict JSON schemas

The answer, or a tool call’s arguments, is guaranteed to match the JSON Schema you send. What breaks: Code that parses answers without checks starts failing where a provider promises only valid JSON, not your schema.

ProviderSupportIn the provider’s words, or in our test call
AnthropicYes
  • Published Yes — The schema goes in output_config.format with type “json_schema”. “Structured outputs guarantee schema-compliant responses through constrained decoding:” provider documentation, read
  • Published Yes — “The request carries the schema in output_config.format with type: "json_schema". SDK helpers set this for you.” provider documentation, read
  • Published Yes · Claude Haiku 5.5 — From the list of supported models on the page. “claude-opus-4-5-20251101 - claude-haiku-5-5 - claude-haiku-4-5-20251001” provider documentation, read
  • Observed Yes · claude-haiku-5-5 — Our test call on : the API accepted a JSON Schema output format and the answer matched the schema. One call shows what the API did that day, not a guarantee.
  • Published Yes — Strict schema for tool arguments. “Setting strict: true on a tool definition guarantees Claude's tool inputs match your JSON Schema by constraining the model's token sampling to schema-valid outputs (a technique called grammar-constrained sampling).” provider documentation, read
OpenAIYes
  • Published Yes — “Structured Outputs is a feature that ensures the model will always generate responses that adhere to your supplied JSON Schema” provider documentation, read
  • Observed Yes · gpt-5.4-mini — Our test call on : the API accepted a strict JSON Schema response format and the answer matched the schema. One call shows what the API did that day, not a guarantee.
Google GeminiYes
  • Published Yes — “You can configure Gemini models to generate responses that adhere to a provided JSON Schema.” provider documentation, read
  • Published Yes — Strict schema together with tools. “Gemini 3 lets you combine Structured Outputs with built-in tools, including Grounding with Google Search , URL Context , Code Execution , File Search , and Function Calling .” provider documentation, read
  • Observed Yes · gemini-3.8-flash — Our test call on : the API accepted a JSON Schema response format and the answer matched the schema. One call shows what the API did that day, not a guarantee.
DeepSeekPartly
  • Published Partly — JSON mode (json_object); the page does not describe a JSON Schema response format. “DeepSeek provides JSON Output to ensure the model outputs valid JSON strings.” provider documentation, read
  • Observed No · deepseek-flash — Our test call on : the API rejected a JSON Schema response format with HTTP 400 (“This response_format type is unavailable now”); JSON mode is what remains. One call shows what the API did that day, not a guarantee.
  • Published Yes — Strict schema for tool arguments (strict mode, marked Beta). “In strict mode, the model strictly adheres to the format requirements of the Function's JSON schema when outputting a tool call, ensuring that the model's output complies with the user's definition. It is supported by both thinking and non-thinking mode.” provider documentation, read
Alibaba Cloud (Qwen)Partly
  • Published Partly — “Usage Structured output supports two modes: JSON Object and JSON Schema.” provider documentation, read
  • Published Partly — Columns of the table: JSON Object mode, JSON Schema mode. “Strictly follows schema No Yes Supported models Most Qwen models Only selected qwen-plus models” provider documentation, read
  • Observed Yes · qwen3.8-max — Our test call on : qwen3.8-max accepted a strict JSON Schema response format and answered to the schema, although the provider’s own table lists JSON Schema mode only for selected qwen-plus models. One call shows what the API did that day, not a guarantee.
xAIYes
  • Published Yes — “By setting response_format.type to "json_schema" and providing your schema under response_format.json_schema , you can define exactly what structured output the model should return.” provider documentation, read
  • Published Yes — Tool arguments are always strict; the strict flag is implied. “When you define tools, [xAI] models will always generate tool call arguments that strictly conform to the tool’s input JSON Schema (the strict flag is implicitly always true ).” provider documentation, read ; provider name corrected in brackets
GroqYes
  • Published Yes — “Guarantee model responses strictly conform to your JSON schema for reliable, type-safe data structures.” provider documentation, read
  • Published Yes — “With strict: true, the model uses constrained decoding to guarantee that the output will always match your schema exactly.” provider documentation, read
CerebrasYes
  • Published Yes — “strict: true uses constrained decoding to guarantee that output conforms to schemas in the supported JSON Schema subset.” provider documentation, read
  • Published Yes · gpt-oss-120b — Columns: text, JSON object, JSON Schema, strict, availability. “gpt-oss-120b · Yes · Yes · Yes · Yes · Shared Inference” provider documentation, read
MistralYes
  • Published Yes — “We offer a reliable method to obtain structured output in your desired format. Our system includes a built-in mode for JSON output, along with the capability to use custom structured outputs.” provider documentation, read
Z.ai (GLM)Partly
  • Published Partly — The page describes only JSON mode (json_object). “Structured output (JSON mode) ensures that AI returns JSON data conforming to predefined formats, providing reliable guarantees for programmatic processing of AI outputs.” provider documentation, read
  • Observed Yes · glm-5.3 — Our test call on : glm-5.3 accepted a strict JSON Schema response format and answered to the schema; the documentation describes only JSON mode. One call shows what the API did that day, not a guarantee.

Parallel tool calls

The model can ask for several tool calls in one turn. What breaks: An agent built around several calls per turn gets one call per turn: more round trips, more input tokens, slower runs.

ProviderSupportIn the provider’s words, or in our test call
AnthropicYes
  • Published Yes — “By default, Claude may call multiple tools in a single response.” provider documentation, read
OpenAIYes
  • Published Yes — “On supported models beginning with GPT-5, functions can be called in parallel when built-in tools are also available.” provider documentation, read
  • Published Yes — Parallel calls are on by default; this switches them off. “You can prevent this by setting parallel_tool_calls to false, which ensures exactly zero or one tool is called.” provider documentation, read
Google GeminiYes
  • Published Yes — “The model supports calling multiple functions in a single turn ( parallel function calling ) and in sequence ( compositional function calling ).” provider documentation, read
DeepSeekNot stated
  • Unknown Not stated — The Tool Calls and Chat Completion pages do not mention parallel tool calls, and a test call cannot force the model to make two calls.
Alibaba Cloud (Qwen)Yes
  • Published Yes — “you can set the parallel_tool_calls request parameter to true when you make a Function Calling . Note Parallel tool calling is suitable for tasks that have no dependencies.” provider documentation, read
xAIYes
  • Published Yes — Parallel calls are on by default; this switches them off. “Disable with parallel_tool_calls: false in your request.” provider documentation, read
GroqPartly
  • Published No · gpt-oss-120b — Columns: tool use, parallel tool use, JSON mode, built-in tools. No parallel calls for this model. “openai/gpt-oss-120b · Yes · No · Yes · Yes” provider documentation, read
  • Published Yes · qwen3.8-27b — Columns: tool use, parallel tool use, JSON mode, built-in tools. “qwen/qwen3.8-27b · Yes · Yes · Yes · No” provider documentation, read
CerebrasYes
  • Published Yes — “Strict mode works with parallel tool calling.” provider documentation, read
  • Published Yes · gpt-oss-120b — Columns: tool_choice, strict mode, parallel calls, multi-turn calling, availability. “gpt-oss-120b · none, auto, required, named function · Yes · Yes · Yes · Shared Inference” provider documentation, read
MistralYes
  • Published Yes — “And parallel_tool_calls to specify whether parallel tool calling is allowed. - true: default mode. The model decides if it uses parallel tool calls or not.” provider documentation, read
Z.ai (GLM)Not stated
  • Published Not stated — The page does not mention parallel calls. “tool_choice: Controls function calling strategy, default is auto (only supports auto)” provider documentation, read

Streamed tool arguments

Tool-call arguments arrive in pieces while the model writes them. What breaks: An interface that shows arguments as they are written sees nothing until the whole call is ready.

ProviderSupportIn the provider’s words, or in our test call
AnthropicYes
  • Published Yes — Arguments arrive as input_json_delta events, one whole key and value at a time. “Note: Current models only support emitting one complete key and value property from input at a time.” provider documentation, read
OpenAIYes
  • Published Yes — “Streaming can be used to surface progress by showing which function is called as the model fills its arguments, and even displaying the arguments in real time.” provider documentation, read
Google GeminiYes
  • Published Yes — “Tool arguments can be streamed as partial arguments using arguments . You must aggregate these deltas to reconstruct the complete tool calls” provider documentation, read
DeepSeekYes
  • Observed Yes · deepseek-flash — Our test call on : the tool-call arguments arrived in 33 pieces in the stream. One call shows what the API did that day, not a guarantee.
Alibaba Cloud (Qwen)Yes
  • Observed Yes · qwen3.8-max — Our test call on : the tool-call arguments arrived in 14 pieces in the stream. One call shows what the API did that day, not a guarantee.
xAINo
  • Published No — “With streaming, the function call is returned in whole in a single chunk, not streamed across chunks.” provider documentation, read
GroqNo
  • Observed No · gpt-oss-120b — Our test call on : the arguments (about 60 characters) arrived in one piece. One call shows what the API did that day, not a guarantee.
CerebrasYes
  • Observed Yes · gpt-oss-120b — Our test call on : the tool-call arguments arrived in 3 pieces in the stream. One call shows what the API did that day, not a guarantee.
MistralNo
  • Observed No · mistral-large-4-0 — Our test call on : the arguments (about 60 characters) arrived in one piece. One call shows what the API did that day, not a guarantee.
Z.ai (GLM)Partly
  • Published Partly — Switched on with the tool_stream parameter. “Streaming output for tool call responses allows developers to stream tool usage parameters without buffering or JSON validation when calling chat.completions, reducing call latency and providing better user experience.” provider documentation, read
  • Published Partly · glm-5.3 — The page limits tool_stream to glm-5 and does not mention glm-5.3. “limited to glm-5” provider documentation, read

Reasoning with tools

Thinking or reasoning works in the same request as tool calls. What breaks: Switching reasoning on can rule out some tool settings or output formats, or the other way round.

ProviderSupportIn the provider’s words, or in our test call
AnthropicYes
  • Published Yes — “Interleaved thinking lets Claude think between tool calls within a single assistant turn, reasoning about each tool result before determining what to do next.” provider documentation, read
OpenAIYes
  • Published Yes — “Our reasoning models like gpt-5.5 and gpt-5.4 support interleaved thinking, where the model is able to generate visible output tokens before and in between thinking, and is able to think in between tool calls.” provider documentation, read
Google GeminiYes
  • Published Yes — “Function calling with thinking models Gemini 3 series models use an internal "thinking" process that improves function calling.” provider documentation, read
DeepSeekYes
  • Published Yes — “From DeepSeek-V3.2, the API supports tool use in the thinking mode.” provider documentation, read
Alibaba Cloud (Qwen)Yes
  • Published Yes — Tools work in thinking mode; tool_choice “required” does not. “cannot guarantee that a tool is always called, and in thinking mode "required" is not supported” provider documentation, read
xAIYes
  • Published Yes — Reasoning cannot be switched off on grok-4.7; low effort is the recommended setting for tool calls. “"low" Uses some reasoning tokens, but still fast Latency-sensitive agentic use and simple tool calling.” provider documentation, read
GroqYes
  • Published Yes — Reasoning and tools work together; the raw reasoning format is not allowed with tools. “Must be set to either parsed or hidden when using tool calling or JSON mode.” provider documentation, read
CerebrasPartly
  • Published Partly — The pages do not say directly that reasoning works with tools; the raw reasoning format does not work with strict schemas. “reasoning_format: "raw" is incompatible with json_object and json_schema response formats.” provider documentation, read
MistralNot stated
  • Published Not stated — The page does not say whether reasoning works together with tools; for agent tasks it recommends reasoning_effort “high”. “mistral-large-4-0: Supports adjustable reasoning via the reasoning_effort parameter.” provider documentation, read
Z.ai (GLM)Yes
  • Published Yes — “Stream Tool Call is a unique feature of Z.ai's latest model, allowing real-time access to reasoning processes, response content, and tool call information during tool invocation” provider documentation, read

Cache covers tool definitions

The prompt cache includes the tool definitions, which matters with a long list of tools. What breaks: Where the cache does not cover tool definitions, a long tool list is paid as fresh input on every request.

ProviderSupportIn the provider’s words, or in our test call
AnthropicYes
  • Published Yes — “Prompt caching references the entire prompt: tools, system, and messages (in that order), up to and including the block designated with cache_control.” provider documentation, read
OpenAIYes
  • Published Yes — “OpenAI caches the model's full rendered context including OpenAI-provided instructions, developer messages, tool definitions” provider documentation, read
Google GeminiNot stated
  • Published Not stated — The page does not say whether tool definitions are part of the cached prefix. “Implicit caching Implicit caching is enabled by default for all Gemini 2.5 and newer models.” provider documentation, read
DeepSeekNot stated
  • Published Not stated — Automatic prefix cache; the page does not mention tool definitions. “The DeepSeek API Context Caching on Disk Technology is enabled by default for all users, allowing them to benefit without needing to modify their code.” provider documentation, read
Alibaba Cloud (Qwen)Not stated
  • Published Not stated — The page does not mention tool definitions. “Context Cache reduces redundant computation by caching the common prefix of these requests.” provider documentation, read
xAINot stated
  • Unknown Not stated — We found no page on caching together with tools. xAI’s rate-limit page says cached prompt tokens still count toward its tokens-per-minute limit.
GroqYes
  • Published Yes — “Prefixes can include system prompts, tool definitions, few-shot examples, and more.” provider documentation, read
CerebrasYes
  • Published Yes — “This includes system prompts, tool definitions, and few-shot examples.” provider documentation, read
MistralNot stated
  • Published Not stated — Cache by prompt_cache_key; the page does not mention tool definitions. “Prompt caching lets you reuse previously computed prompt tokens when requests share the same prefix, meaning the same beginning of the prompt.” provider documentation, read
Z.ai (GLM)Not stated
  • Published Not stated — Implicit cache; the page does not mention tool definitions. “Context caching functionality significantly reduces token consumption and response latency by caching repeated context content.” provider documentation, read

69 statements: 56 quoted from provider documentation read , 11 from our own single test calls, 2 not stated anywhere we looked. A provider can change a feature without notice; a test call shows one day, not a promise. Prices for the same models: API pricing.

All API prices · Cheapest per task · Long-context cliff · Caching and batch · Rate limits by tier · Rate limit planner · Task cost calculator · All models on OpenRouter · How we check prices

Explore the numbers

Published · provider documentation

Strict JSON schemas

ProviderSupportEvidence
AnthropicYesPublished
OpenAIYesPublished
Google GeminiYesPublished
DeepSeekPartlyPublished
Alibaba Cloud (Qwen)PartlyPublished
xAIYesPublished
GroqYesPublished
CerebrasYesPublished
MistralYesPublished
Z.ai (GLM)PartlyPublished

Read the documentation and switch implications.

Only provider documentation is compared here. A single observed request does not establish published performance. Not stated is not the same as No.

Published · provider documentation

Parallel tool calls

ProviderSupportEvidence
AnthropicYesPublished
OpenAIYesPublished
Google GeminiYesPublished
DeepSeekNot statedUnknown
Alibaba Cloud (Qwen)YesPublished
xAIYesPublished
GroqPartlyPublished
CerebrasYesPublished
MistralYesPublished
Z.ai (GLM)Not statedPublished

Read the documentation and switch implications.

Only provider documentation is compared here. A single observed request does not establish published performance. Not stated is not the same as No.

Published · provider documentation

Streamed tool arguments

ProviderSupportEvidence
AnthropicYesPublished
OpenAIYesPublished
Google GeminiYesPublished
DeepSeekNot statedUnknown
Alibaba Cloud (Qwen)Not statedUnknown
xAINoPublished
GroqNot statedUnknown
CerebrasNot statedUnknown
MistralNot statedUnknown
Z.ai (GLM)PartlyPublished

Read the documentation and switch implications.

Only provider documentation is compared here. A single observed request does not establish published performance. Not stated is not the same as No.

Published · provider documentation

Reasoning with tools

ProviderSupportEvidence
AnthropicYesPublished
OpenAIYesPublished
Google GeminiYesPublished
DeepSeekYesPublished
Alibaba Cloud (Qwen)YesPublished
xAIYesPublished
GroqYesPublished
CerebrasPartlyPublished
MistralNot statedPublished
Z.ai (GLM)YesPublished

Read the documentation and switch implications.

Only provider documentation is compared here. A single observed request does not establish published performance. Not stated is not the same as No.

Published · provider documentation

Cache covers tool definitions

ProviderSupportEvidence
AnthropicYesPublished
OpenAIYesPublished
Google GeminiNot statedPublished
DeepSeekNot statedPublished
Alibaba Cloud (Qwen)Not statedPublished
xAINot statedUnknown
GroqYesPublished
CerebrasYesPublished
MistralNot statedPublished
Z.ai (GLM)Not statedPublished

Read the documentation and switch implications.

Only provider documentation is compared here. A single observed request does not establish published performance. Not stated is not the same as No.

Sources: this page; published model prices (data (JSON)); task assumptions (data (JSON)). Published prices · Observed responses · Calculated scenarios · Assumptions stated with each chart.