Create chat completion
Send chat messages and get the model's reply; supports streaming, model fallback and your own upstream keys.
/model/v1/chat/completions● SupportedRequest parameters
X-OpenRouter-Metadatastring可选○ Currently ignoredheader: OpenRouter-style request header that asks for routing metadata in the response. It is accepted for compatibility and has no effect: the routing metadata is not returned.
Accepted but currently has no effect; the requested routing metadata is not returned.
modelstring必填Model to use for completion
Primary model; optional when a nonempty models list supplies the first candidate.
messagesarray必填◐ Partially supportedList of messages for the conversation
Text, roles, history and tool round trips work. Images have model-specific size limits. file_id accepts user_data images, text and PDF; see the [file reference guide](/en/docs/cloud/services/model/guides/files) for model support and failure handling.
▸ 展开子字段(12)
元素按 role 区分(assistant / developer / system / tool / user),此处展开其中一种的形状
configuration_updateobject可选OpenRouter extension. Same as the system message `configuration_update`: changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns.
contentstring | array可选Tool response content
namestring可选Optional name for the assistant
rolestring可选Role of the message author; always tool.
audioobject可选Audio output data or reference
imagesarray可选Generated images from image generation models
modelstring必填Model that generated this assistant message
reasoningstring可选Reasoning output
reasoning_detailsarray可选Reasoning details for extended thinking models
refusalstring可选Refusal message if content was refused
tool_callsarray可选Tool calls made by the assistant
tool_call_idstring可选ID of the assistant message tool call this message responds to
max_tokensinteger可选◐ Partially supportedMaximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.
Works on deepseek-v4-flash and glm-5.3-flash; small budgets may not take effect on qwen3.8-flash. Takes precedence over max_completion_tokens.
streamboolean可选◐ Partially supportedEnable streaming response
Content and tool deltas stream; gemini-2.5-flash may omit the end sentinel and budget exhaustion may report an incorrect finish_reason.
temperaturenumber可选◐ Partially supportedSampling temperature (0-2)
An effect was observed on deepseek-v4-flash via /openai; sampling effects on other models remain unobservable.
top_pnumber可选◐ Partially supportedNucleus sampling parameter (0-1)
An effect was observed only on glm-5.3-flash via /model; other tested models or faces accepted it without an observed effect.
toolsarray可选Available tools for function calling
Verified to take effect.
tool_choicestring | object可选◐ Partially supportedTool choice configuration
auto works. deepseek-v4-flash ignores none/required/named functions; qwen3.8-flash rejects required/named functions in thinking mode; named selection on glm-5.3-flash is inconsistent.
▸ 展开子字段(2)
functionobject必填The function the model must call.
typestring必填OpenRouter server-tool type to force (e.g. `openrouter:web_search`, `web_search`, `web_search_preview`).
response_formatobject可选◐ Partially supportedResponse format configuration
json_object works. json_schema works on deepseek-v4-flash and qwen3.8-flash but was not honored by glm-5.3-flash.
▸ 展开子字段(3)
按 type 区分(grammar / json_object / json_schema / python / text),此处展开其中一种的形状
typestring必填Always `python`. Discriminator that marks this object as a ChatFormatPythonConfig in a `type`-tagged union.
json_schemaobject必填JSON Schema configuration object
grammarstring必填Custom grammar for text generation
▸ 更多参数(49)
promptstring可选○ Currently ignoredAccepted and ignored; Chat still requires messages and this field does not replace them.
cache_controlobject可选Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
▸ 展开子字段(2)
ttlstring可选Lifetime of an Anthropic-style cache breakpoint.
typestring必填Always `ephemeral`. Discriminator that marks this object as a AnthropicCacheControlDirective in a `type`-tagged union.
debugobject可选Debug options for inspecting request transformations (streaming only)
▸ 展开子字段(1)
echo_upstream_bodyboolean可选○ Currently ignoredIf true, includes the transformed upstream request body in a debug chunk at the start of the stream. Only works with streaming mode.
Accepted but currently has no effect. Streaming requests do not echo the upstream request body.
frequency_penaltynumber可选◐ Partially supportedFrequency penalty (-2.0 to 2.0)
Some requests take effect on deepseek-v4-flash and glm-5.3-flash; qwen3.8-flash rejects some values or faces with 400.
image_configobject可选Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
logit_biasobject可选Token logit bias adjustments
logprobsboolean可选◐ Partially supportedReturn log probabilities
Works on qwen3.8-flash; deepseek-v4-flash works only via /openai and glm-5.3-flash differs between faces. gemini-2.5-flash returns 400.
max_completion_tokensinteger可选◐ Partially supportedMaximum tokens in completion
Works on deepseek-v4-flash and glm-5.3-flash; small budgets on qwen3.8-flash may be ineffective or exceed limits.
metadataobject可选Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
min_pnumber可选○ Currently ignoredMinimum probability threshold relative to the most likely token. Tokens with probability below min_p * (probability of top token) are filtered out. Not all providers support this parameter.
Accepted but currently has no effect.
modalitiesarray可选Output modalities for the response. Supported values are "text", "image", and "audio".
modelsarray可选Models to use for completion
Ordered fallback on an unknown primary, unavailable same-protocol line or upstream failure. models alone is accepted; response model and cost belong to the model that completes the request.
parallel_tool_callsboolean可选◐ Partially supportedWhether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response.
false works on qwen3.8-flash, is ignored by deepseek-v4-flash, and differs between faces on glm-5.3-flash.
pluginsarray可选◐ Partially supportedPlugins you want to enable for this request, including their settings.
Supports file-parser (pdf.engine native, mistral-ocr mapped to ocr, ocr, auto) and platform guardrails. Requests override account defaults but preserve locked settings. Unsupported plugins such as web, unknown engines and malformed configurations return 400 naming the field.
▸ 展开子字段(27)
元素按 id 区分(auto-beta-router / auto-router / context-compression / file-parser / fusion / moderation / pareto-router / response-healing / web / web-fetch),此处展开其中一种的形状
allowed_modelsarray可选List of model patterns to filter which models the auto-beta-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). Up to 1024 patterns, each at most 1024 characters, with 65536 total characters across all patterns. When not specified, every model ranked for the classified task type is a candidate, falling back to a default model set when rankings are unavailable.
cost_quality_tradeoffinteger可选Deprecated: Use cost_tier instead. Balances routing between cost and quality on a 0-10 scale. The auto-beta-router ranks models for the classified task type by community spend share, then filters candidates by their average cost per generation for that task. Higher values favor cheaper models: 10 keeps only models around the cheapest 10th percentile, while 0 permits models up to the 90th percentile for cost. Defaults to 9 when no cost setting is provided. It remains supported and retains ceiling behavior, but cost_tier takes precedence when both are provided.
cost_tierstring可选Named cost/quality setting. For auto-beta-router, tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided.
enabledboolean可选Set to false to disable Fusion configuration for a run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. Defaults to true.
excluded_modelsarray可选List of model patterns to exclude from auto-beta-router selection. Supports wildcards (e.g., "meta-llama/*" excludes all Llama models). Up to 1024 patterns, each at most 1024 characters, with 65536 total characters across all patterns. Applied after allowed_models, so an excluded pattern always wins over an allowed one.
idstring可选Plugin id; always fusion.
pin_modelboolean可选When true, reuses the model from the most recent assistant message's `model` attribute for subsequent turns. Defaults to false.
enginestring可选The compression engine to use. Defaults to "middle-out".
exclude_domainsarray可选A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog").
include_domainsarray可选A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog").
max_resultsinteger可选Maximum number of search results to use.
max_usesinteger可选Maximum number of web fetches per request. Once exceeded, the tool returns an error.
modestring可选Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.
search_promptstring可选Prompt that introduces the search results to the model.
user_locationobject可选Approximate user location for location-biased search results.
allowed_domainsarray可选Only fetch from these domains.
blocked_domainsarray可选Never fetch from these domains.
max_content_tokensinteger可选Maximum content length in approximate tokens. Content exceeding this limit is truncated.
pdfobject可选Options for PDF parsing.
max_pricenumber可选Maximum input price in USD per million tokens. When set, quality-tier selection (min_coding_score) is bypassed: the router computes the Pareto frontier over the top coding models and routes to the best-scoring frontier model priced at or below this cap, falling back through cheaper frontier models, then non-frontier models. Enforced against the price source given by price_source. Returns 404 when no candidate satisfies the cap.
min_coding_scorenumber可选Minimum coding quality score between 0 and 1. Maps to internal quality tiers: >= 0.66 → high (top coding models), >= 0.33 → medium (strong modern flagships), < 0.33 → low (capable coders above the median). Omit to default to the highest tier (equivalent to >= 0.66). Not used when max_price is set (price-based selection takes over).
price_sourcestring可选Price source for the Pareto frontier cost axis and for enforcing max_price. "prompt" uses catalog list price (endpoint.pricing.prompt). "weighted_avg" uses traffic-weighted effective input price from ClickHouse, falling back to prompt price for models without traffic data. Defaults to "prompt".
analysis_modelsarray可选For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-sol-latest, ~google/gemini-pro-latest).
max_tool_callsinteger可选For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 4. Capped at 16.
modelstring必填For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.
presetstring可选Configuration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.
toolsarray可选For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only).
predictionobject可选Static predicted output content. Supported models can use this to reduce latency when much of the response is known in advance.
▸ 展开子字段(2)
contentstring | array必填Predicted output: a string or an array of text parts.
typestring必填Always `content`. Discriminator that marks this object as a Prediction in a `type`-tagged union.
presence_penaltynumber可选◐ Partially supportedPresence penalty (-2.0 to 2.0)
An effect was observed on deepseek-v4-flash via /openai; some qwen3.8-flash requests return 400 and other effects are unobservable.
prompt_cache_keystring可选Caller-chosen key that groups requests with a long shared prefix so that they can reuse the provider's prompt cache; null for none.
prompt_cache_optionsobject可选Request-level prompt-cache controls. `mode: "explicit"` disables OpenAI-managed breakpoints so only blocks marked with `prompt_cache_breakpoint` are cached. Only supported by OpenAI GPT-5.6 and newer.
▸ 展开子字段(2)
modestring必填Prompt cache mode; explicit caches only the blocks marked with prompt_cache_breakpoint.
ttlstring可选Lifetime of cache entries, for example 30m; null leaves the provider default.
providerobject可选◐ Partially supportedWhen multiple model providers are available, optionally indicate your routing preference.
Only supplier choice (order / only / ignore) is BYOK-only and returns 400; require_parameters is honoured and other options are accepted no-ops.
▸ 展开子字段(13)
allow_fallbacksboolean可选○ Currently ignoredWhether to allow backup providers to serve requests - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider. - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
Accepted but currently has no effect (not supplier choice; available with platform credentials).
data_collectionstring可选○ Currently ignoredData collection setting. If no available model provider meets the requirement, your request will return an error. - allow: (default) allow providers which store user data non-transiently and may train on it - deny: use only providers which do not collect user data.
Accepted but currently has no effect (not supplier choice; available with platform credentials).
enforce_distillable_textboolean可选Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
ignorearray可选○ UnsupportedList of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
Choosing suppliers (order / only / ignore) is BYOK-only; with platform credentials it returns 400 PROVIDER_SELECTION_NOT_ALLOWED.
max_priceobject可选○ Currently ignoredThe object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
Accepted but currently has no effect (not supplier choice; available with platform credentials).
onlyarray可选○ UnsupportedList of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
Choosing suppliers (order / only / ignore) is BYOK-only; with platform credentials it returns 400 PROVIDER_SELECTION_NOT_ALLOWED.
orderarray可选○ UnsupportedAn ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
Choosing suppliers (order / only / ignore) is BYOK-only; with platform credentials it returns 400 PROVIDER_SELECTION_NOT_ALLOWED.
preferred_max_latencynumber | object可选Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
preferred_min_throughputnumber | object可选Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
quantizationsarray可选○ Currently ignoredA list of quantization levels to filter the provider by.
Accepted but currently has no effect (not supplier choice; available with platform credentials).
require_parametersboolean可选Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.
Routes only to lines that can express every parameter; available with platform credentials.
sortstring | object可选○ Currently ignoredThe sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
Accepted but currently has no effect (not supplier choice; available with platform credentials).
zdrboolean可选○ Currently ignoredWhether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
Accepted but currently has no effect (not supplier choice; available with platform credentials).
reasoningobject可选Configuration options for reasoning models
▸ 展开子字段(2)
effortstring可选◐ Partially supportedConstrains effort on reasoning for reasoning models
none reliably disables thinking only on qwen3.8-flash; deepseek-v4-flash and glm-5.3-flash do not honor it.
summarystring可选○ Currently ignoredHow detailed the reasoning summary should be.
Accepted but currently has no effect. deepseek-v4-flash did not return the requested summary.
reasoning_effortstring可选◐ Partially supportedShorthand for setting reasoning effort. Equivalent to setting reasoning.effort. Cannot be used simultaneously with reasoning.effort if they differ.
none disables thinking on qwen3.8-flash; deepseek-v4-flash still thinks and glm-5.3-flash effort levels do not behave as expected.
repetition_penaltynumber可选Penalizes tokens based on how much they have already appeared in the text. A value of 1.0 means no penalty. Values above 1.0 penalize repeated tokens more strongly. Not all providers support this parameter.
routestring可选**DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").
seedinteger可选○ Currently ignoredRandom seed for deterministic outputs
Accepted but currently has no effect. The same seed did not reproduce outputs on deepseek-v4-flash, glm-5.3-flash or qwen3.8-flash.
service_tierstring可选The service tier to use for processing this request. `fast` is accepted as an alias for `priority`.
session_idstring可选A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
stopstring | array可选◐ Partially supportedStop sequences (up to 4)
Works on qwen3.8-flash; deepseek-v4-flash and glm-5.3-flash may stop during reasoning and return empty content.
stop_server_tools_whenarray可选Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. When a condition fires while the model is still emitting tool calls, the pending tool calls are executed and one final turn is made with tool calls disabled so the response ends with a natural-language answer instead of an unfinished tool call.
▸ 展开子字段(6)
元素按 type 区分(finish_reason_is / has_tool_call / max_cost / max_tokens_used / step_count_is),此处展开其中一种的形状
step_countinteger可选Number of steps after which the loop stops.
typestring可选Always `finish_reason_is`. Discriminator that marks this object as a StopServerToolsWhenFinishReasonIs in a `type`-tagged union.
tool_namestring可选Name of the tool whose call stops the loop.
max_tokensinteger可选Cumulative token count after which the loop stops.
max_cost_in_dollarsnumber可选Cumulative cost in USD after which the loop stops.
reasonstring可选Finish reason that stops the loop.
stream_optionsobject可选Streaming configuration options
▸ 展开子字段(1)
include_usageboolean可选○ Currently ignoredDeprecated: This field has no effect. Full usage details are always included.
Accepted but currently has no effect. Usage is returned at the end whether true, false or omitted.
top_anumber可选○ Currently ignoredConsider only tokens with "sufficiently high" probabilities based on the probability of the most likely token. Not all providers support this parameter.
Accepted but currently has no effect.
top_kinteger可选◐ Partially supportedLimits the model to choose from the top K most likely tokens at each step. A value of 1 means the model will always pick the most likely next token. Not all providers support this parameter.
No sampling effect was observed on tested models; deepseek-v4-flash via /model returns an error.
top_logprobsinteger可选◐ Partially supportedNumber of top log probabilities to return (0-20)
Requires logprobs=true; support follows logprobs and the selected model.
traceobject可选Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
▸ 展开子字段(5)
generation_namestring可选Name of this generation in the trace.
parent_span_idstring可选Id of the parent span in the trace.
span_namestring可选Name of this request's span in the trace.
trace_idstring可选Id that groups several requests into one trace.
trace_namestring可选Name of the trace.
userstring可选Per-end-user identifier for abuse isolation. Use a stable ID, hash, or pseudonym. When a provider requires a user identity, OpenRouter folds it into the hashed identity sent upstream and never forwards it raw. If omitted, requests use an account-level identity, so provider policy blocks can affect the whole account.
storeboolean可选○ Currently ignoredAccepted but currently has no effect. This applies to Chat Completions only.
max_output_tokensinteger可选○ Currently ignoredAccepted but currently has no effect. This applies to Chat Completions only.
thinkingobject可选○ Currently ignoredAccepted but currently has no effect. This applies to Chat Completions only.
web_search_optionsobject可选○ Currently ignoredAccepted but currently has no effect. This applies to Chat Completions only.
functionsarray可选○ Currently ignoredAccepted but currently has no effect. This applies to Chat Completions only.
audioobject可选○ Currently ignoredAccepted but currently has no effect. This applies to Chat Completions only.
ninteger可选◐ Partially supportedWorks on glm-5.3-flash; accepted but ignored on deepseek-v4-flash; qwen3.8-flash errors.
usageobject可选○ Currently ignoredAccepted and ignored; usage is always returned, regardless of include.
transformsarray可选○ Currently ignoredAccepted and ignored; no middle-out or other message transformation is performed.
deferred_toolsobject可选○ Currently ignoredAccepted and ignored; the OpenRouter deferred-tool protocol is not implemented.
structured_outputsboolean可选○ Currently ignoredAccepted and ignored; configure structured output with response_format, subject to its documented support.
include_reasoningboolean可选○ Currently ignoredAccepted and ignored legacy alias; use reasoning subject to its documented support.
safe_promptboolean可选○ Currently ignoredAccepted and ignored; the Mistral safe_prompt switch is not implemented.
raw_modeboolean可选○ Currently ignoredAccepted and ignored; the Hyperbolic raw_mode switch is not implemented.
providerOptionsobject可选◐ Partially supportedproviderOptions.praxis.models uses the same ordered fallback as models. order/only require existing request-level BYOK credentials; non-BYOK requests return 400.
▸ 展开子字段(1)
praxisobject必填Platform options: ordered model fallback, request-level BYOK credentials and credential-gated provider selection.
Returns
200 chat.completion
With stream=true the reply streams as server-sent events (text/event-stream).
Unknown top-level fields are forwarded unchanged to same-protocol upstream providers, which decide whether to accept them. Declared fields still undergo type and range validation; invalid values return 400 naming the field.
Platform errors (auth, rate limits, validation) and OCR errors use problem+json; other model call errors follow the endpoint's own format (OpenAI or Anthropic) — see error codes
Response
HTTP 200
Chat completion (application/json) or streamed chunks (text/event-stream)
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Id of the completion. |
| object | string | Object type; always `chat.completion`. |
| created | number | Unix time in seconds at which the completion was created. |
| model | string | Model that produced the completion; with fallback this is the model that finally answered. |
| choices | array<object> | Completion choices; one entry per generated answer. |
| choices[].index | number | Zero-based index of the choice. |
| choices[].message | object | The message the model generated. |
| choices[].finish_reason | string | null | Why generation stopped, for example `stop`, `length` or `tool_calls`; null while a stream is still generating. |
| choices[].logprobs | any | null | Log probabilities of the output tokens, when requested; null otherwise. |
| usage | object | Token usage of the request. |
| usage.prompt_tokens | number | Number of tokens in the prompt. |
| usage.completion_tokens | number | Number of tokens in the completion. |
| usage.total_tokens | number | Prompt plus completion tokens. |
| usage.prompt_tokens_details | object | Breakdown of the prompt tokens. |
| usage.completion_tokens_details | object | Breakdown of the completion tokens. |
| usage.prompt_cache_hit_tokens | number | Prompt tokens served from the cache, as reported by providers that use this DeepSeek-style counter. |
| usage.prompt_cache_miss_tokens | number | Prompt tokens not served from the cache, as reported by providers that use this DeepSeek-style counter. |
| system_fingerprint | string | null | Backend fingerprint; always null on this face. |
| service_tier | string | null | Service tier the provider used; null when not reported. |
| providerMetadata | object | Platform metadata of the call. |
| providerMetadata.praxis | object | Platform metadata of the call: generation id, cost, credential kind and serving model. |
text/event-stream — chunk / event object
| Name | Type | Description |
|---|---|---|
| id | string | Optional id of the server-sent event. |
| event | string | Name of the server-sent event. |
| data | object | string | Payload of the server-sent event. |
| data.id | string | Id of the completion; every chunk of one stream carries the same id. |
| data.object | string | Object type; always `chat.completion.chunk`. |
| data.created | number | Unix time in seconds at which the completion was created. |
| data.model | string | Model that produced the completion; with fallback this is the model that finally answered. |
| data.choices | array<object> | Completion choices of the chunk. |
| data.providerMetadata | object | Platform metadata of the call. |