Providers

Quantized routes each request to a provider based on the endpoint and your configuration. You don’t need to manage separate API keys or accounts for each provider.

Supported providers

Provider Slug Capabilities
OpenRouter openrouter Chat completions, Responses, Embeddings
OpenAI Direct openai Chat completions, Responses, Embeddings, Image generation (gpt-image-*)
Anthropic anthropic Chat completions
CheaperInference cheaperinference Chat completions, Responses
DeepInfra deepinfra Chat completions (open-weight models, plus partner models such as Claude)
Novita novita Chat completions (open-weight models)
Parasail parasail Chat completions (open-weight models)
Relace relace Chat completions (open-weight models)
Together AI together Chat completions (open-weight models)
AWS Bedrock bedrock Chat completions, Responses, Bedrock-native embeddings
Google Gemini gemini Gemini-native embeddings, Image generation (Gemini Flash Image, Imagen 4)
Exa exa Web search, Content fetch
Tavily tavily Web search, Content fetch
Consensus consensus Academic web search (peer-reviewed papers)

GET /v1/models is not served by a provider. It lists the catalog models your license type can reach, so X-Quantized-Provider has no effect on it.

How a provider is chosen

Without an X-Quantized-Provider header, the router picks among the providers that can
serve the endpoint and carry the requested model in the catalog. It prefers your
institution’s own provider keys, then the providers marked as default for your
institution, and picks randomly among ties. A model id the catalog does not know is sent to
any provider that serves the endpoint, ranked the same way. There is no hard-wired
default per endpoint.

Endpoint Eligible providers
Chat completions Those that carry the model: OpenRouter, OpenAI, Anthropic, AWS Bedrock, CheaperInference, DeepInfra, Novita, Parasail, Relace, Together AI
Responses Those that carry the model: OpenRouter, OpenAI, AWS Bedrock, CheaperInference
Embeddings (/v1/embeddings) Those that carry the model: OpenRouter, OpenAI
Bedrock-native embeddings (/v1/aws-bedrock/embeddings) AWS Bedrock (only)
Gemini-native embeddings (/v1/gemini/embeddings) Google Gemini (only)
Image generation (/v1/images/generations) Resolved per model: OpenAI or Gemini
Web search Exa or Tavily — or Consensus with type: "academic"
Content fetch Exa or Tavily
Pin the provider when you need repeatability

When several providers carry a model and tie on rank, the choice between them is not
deterministic. The same is true of web search and content fetch, where Exa and Tavily
tie unless your institution marks one as default. Providers can differ in what they
charge and how they word their errors.

Pin X-Quantized-Provider whenever you need a repeatable provider, price or error
message.

To search academic papers, send type: "academic" on /v1/web-search, which routes the
search to Consensus.

Your license type can also restrict which providers (or connections) serve each endpoint
or model. Those rules apply before the header: a pin outside what your license allows
returns 400 rather than falling back to another provider.

Choosing a provider

Use the X-Quantized-Provider header to pin a provider by slug:

# Use Anthropic directly
curl -X POST https://api.quantized.us/v1/chat/completions \
  -H "Authorization: Bearer sk-quantized-YOUR-KEY" \
  -H "X-Quantized-Provider: anthropic" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-4",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
# Use Tavily for web search
curl -X POST https://api.quantized.us/v1/web-search \
  -H "Authorization: Bearer sk-quantized-YOUR-KEY" \
  -H "X-Quantized-Provider: tavily" \
  -H "Content-Type: application/json" \
  -d '{"query": "latest AI news"}'

The header also accepts <provider>/<connection> (e.g. openai/default) to pin one
specific connection of that provider. The pin narrows the providers your license allows
and never widens them. A malformed value (an empty part or more than one /) or a
provider your license cannot reach returns 400.

Model naming

All models use the author/model format (e.g., openai/gpt-4.1-mini, anthropic/claude-sonnet-4). Use the Models endpoint to list available model IDs.

A provider’s own model name (e.g. Bedrock’s amazon.nova-micro-v1:0) is accepted too. It
routes the request to that provider when the provider serves the endpoint.

Capability matrix

Endpoint OpenAI OpenRouter Anthropic Bedrock Gemini CheaperInference Open-weight hosts Exa Tavily Consensus
POST /v1/chat/completions Yes Yes Yes Yes — Yes Yes — — —
POST /v1/responses Yes Yes — Yes — Yes — — — —
POST /v1/embeddings Yes Yes — — — — — — — —
POST /v1/aws-bedrock/embeddings — — — Yes (only) — — — — — —
POST /v1/gemini/embeddings — — — — Yes (only) — — — — —
POST /v1/images/generations Yes — — — Yes — — — — —
POST /v1/web-search — — — — — — — Yes Yes Yes (type: "academic")
POST /v1/fetch — — — — — — — Yes Yes —

Open-weight hosts are DeepInfra, Novita, Parasail, Relace, Together AI.

Chat-completions modalities

Not every provider accepts every content part on POST /v1/chat/completions. Requests are additionally gated by the target model’s declared modalities — see the Models endpoint for per-model input_modality flags.

Content part OpenAI OpenRouter Anthropic Bedrock
text Yes Yes Yes Yes
image_url Yes Yes Yes —
input_audio — Yes — —
video_url — Yes — —
file (PDF) — Yes (universal — works on all models via OpenRouter’s PDF parser) — —

Sending an unsupported modality returns 404 model_not_found with a descriptive error message (e.g. "No available provider for model 'openai/gpt-4.1-nano' supports audio input") before the request reaches the provider. The message names providers rather than the model because a model’s hosts can differ on what they accept: the router skips a provider that cannot serve the request and only fails when every reachable one refuses.

Anthropic-specific behavior

When routing through X-Quantized-Provider: anthropic, the router adapts OpenAI-shaped requests to Anthropic’s native /v1/messages format:

response_format — JSON output normalization

Anthropic’s API does not natively support the response_format parameter. The router emulates it by injecting a system-prompt instruction telling the model to return raw JSON. Some Claude models (notably Claude Haiku 4.5) still wrap their output in ```json ... ``` markdown fences despite this instruction.

To uphold the response_format contract — “callers asking for JSON get parseable JSON” — the router strips a single wrapping markdown fence from the response content when:

  • the request specified response_format: {"type": "json_object" | "json_schema"}, and
  • the response content is wrapped entirely in ```json ... ``` or ``` ... ``` (a fence embedded inside prose is not stripped).

This stripping is only applied to the Anthropic provider path — OpenRouter responses are forwarded as-is because OpenRouter handles response_format server-side.

Out-of-scope content parts

Anthropic’s chat endpoint currently receives only text and image_url content parts from the router. Requests containing input_audio, video_url, or file parts are accepted by the router’s serializer but would fail upstream if routed to Anthropic. Pin OpenRouter (X-Quantized-Provider: openrouter) for these modalities.

OpenAI Direct (Chat Completions)

Sending X-Quantized-Provider: openai on POST /v1/chat/completions routes the request to OpenAI’s first-party API (https://api.openai.com/v1/chat/completions), bypassing OpenRouter’s margin. Clients don’t need their own OpenAI account — billing is unified through Quantized’s per-key credit balance.

# Call OpenAI directly
curl -X POST https://api.quantized.us/v1/chat/completions \
  -H "Authorization: Bearer sk-quantized-YOUR-KEY" \
  -H "X-Quantized-Provider: openai" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o-mini",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

The catalog id (openai/gpt-4o-mini) is rewritten to OpenAI’s bare model name (gpt-4o-mini) for the upstream call, then the public id is restored on the response. Without the header, any provider that carries the id may serve it (see “How a provider is chosen” above).

Models in scope

Any model with an openai row in the catalog is routable through this header: OpenAI’s first-party chat models. The open-weight gpt-oss models are not served by OpenAI’s API and stay OpenRouter-only.

A model with X-Quantized-Provider: openai that has no openai row in the catalog is still sent to OpenAI, which rejects ids it does not know with a 400/404.

Billing

OpenAI’s chat response does not include a per-call cost (unlike OpenRouter). credits_used is computed from the model’s per-token rates for OpenAI in the catalog, multiplying prompt/completion tokens (and cached input tokens, when reported) by the model’s catalog rates. Streaming bills the same way once the final usage chunk arrives.

Request handling

The router forwards a standard OpenAI-compatible body, with two adjustments versus the OpenRouter path:

  • Reasoning. Quantized accepts reasoning: {"effort": "..."} or the flat reasoning_effort, normalizes both to a reasoning object, then converts it back to OpenAI’s top-level reasoning_effort string for the native call (OpenAI’s chat endpoint does not accept the nested object OpenRouter uses).
  • repetition_penalty is an OpenRouter extension. It is dropped on the native OpenAI route, since OpenAI’s API rejects unknown parameters.
o-series token cap

OpenAI’s reasoning models (o4-mini, and the gpt-5 family for reasoning) reject max_tokens upstream. You do not have to care: the router sends max_completion_tokens on this route regardless, so either field works from a client’s point of view. Leave enough budget for the internal reasoning tokens reported under usage.completion_tokens_details.reasoning_tokens.

Responses API

X-Quantized-Provider: openai works on POST /v1/responses too, routing to OpenAI’s first-party /v1/responses. The same first-party models, alias rewriting, and catalog-rate billing apply. Two differences from the chat route:

  • Reasoning is passed as an object, not translated. OpenAI’s Responses API takes reasoning: {"effort": "..."} directly (the same shape OpenRouter uses), so there’s no reasoning_effort conversion here. Use max_output_tokens (not max_tokens) and leave room for reasoning tokens.
  • No [DONE] sentinel when streaming. The responses stream is a sequence of typed event: <type> / data: {...} pairs (response.created … response.completed); it ends on response.completed rather than a data: [DONE] line.

frequency_penalty / presence_penalty are not accepted by OpenAI’s Responses endpoint, so they are dropped on this route (they remain available via OpenRouter).

OpenAI Direct (Embeddings)

OpenRouter and OpenAI Direct both serve OpenAI’s embedding models on POST /v1/embeddings. OpenAI Direct calls OpenAI’s /v1/embeddings natively, which avoids OpenRouter’s margin; pin it with X-Quantized-Provider: openai. Clients don’t need their own OpenAI account; billing is unified through Quantized’s per-key credit balance.

Models in scope

Model id Native dimension Public list rate
text-embedding-3-small 1536 $0.02 / 1M tokens
text-embedding-3-large 3072 $0.13 / 1M tokens
text-embedding-ada-002 1536 $0.10 / 1M tokens

Embeddings are billed at the catalog’s input rate for the model on the provider that served the request. Model ids with no catalog rate fall back to a conservative default rate so the router never bills at $0 on a misconfigured request.

OpenRouter passthrough

X-Quantized-Provider: openrouter routes the same request through OpenRouter, which exposes OpenAI’s embedding models with an openai/ prefix. OpenRouter’s embedding response does not include a per-call cost, so the request is billed at the catalog rate for the model on OpenRouter.

CheaperInference

CheaperInference is an OpenAI-compatible marketplace that serves catalog models below list
price. It serves POST /v1/chat/completions and POST /v1/responses.

To send a request to CheaperInference specifically, pin it with
X-Quantized-Provider: cheaperinference:

curl -X POST https://api.quantized.us/v1/chat/completions \
  -H "Authorization: Bearer sk-quantized-YOUR-KEY" \
  -H "X-Quantized-Provider: cheaperinference" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4.1-mini",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
  • Responses are stateless. CheaperInference keeps no conversation state, so a
    POST /v1/responses request with previous_response_id returns 400. Send the full
    conversation in input instead.
  • Reasoning. On chat completions, reasoning is sent as a top-level reasoning_effort
    string, as on the OpenAI Direct chat route.
  • Billing. credits_used comes from the amount CheaperInference bills for the call.
    Streamed calls report no billed amount and are billed at the model’s catalog rate for
    CheaperInference.
  • Unknown models. A model CheaperInference does not serve returns 404.

Open-weight model hosts

DeepInfra, Novita, Parasail, Relace, Together AI serve open-weight models (Llama, Qwen, DeepSeek, GLM, Kimi, …) on
POST /v1/chat/completions. They aren’t marked as default, so the router sends a model to
one of them only when you pin it or when no default provider carries that model. Pin one
with its slug (deepinfra, novita, parasail, relace, together):

curl -X POST https://api.quantized.us/v1/chat/completions \
  -H "Authorization: Bearer sk-quantized-YOUR-KEY" \
  -H "X-Quantized-Provider: deepinfra" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek/deepseek-v3.2",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
  • Models. Each host serves the catalog models it has a row for in
    GET /v1/models. DeepInfra also serves partner models it proxies to
    their makers, such as Claude.
  • Reasoning. Reasoning is sent as a top-level reasoning_effort string, as on the
    OpenAI Direct chat route.
  • Billing. None of them report a per-call cost, so requests are billed at the model’s
    catalog rate for that provider.

Bedrock-specific behavior

When routing through X-Quantized-Provider: bedrock, the router calls AWS Bedrock’s Converse API on Quantized’s AWS account. Clients don’t need their own AWS credentials — billing is unified through Quantized’s per-key credit balance.

Model resolution

Models with a bedrock row in the catalog carry the full Bedrock model id in that row’s alias (e.g., amazon.nova-micro-v1:0); clients can use either that or the canonical Quantized id (e.g., amazon/nova-micro-v1:0).

A model with no Bedrock row is not rejected up front. The pin is honoured, the request goes to AWS as sent, and AWS answers:

{
  "error": {
    "message": "The provided model identifier is invalid.",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_request",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}

That is a 400 invalid_request, not a 404 model_not_found — see Who validates the model. GET /v1/models does not currently expose which provider serves a model, so there is no way to filter the list for Bedrock-eligible ids from the API alone.

Model access gates

Some Bedrock model families require AWS-side approval before they can be invoked, even when the catalog has a bedrock row for them:

Family Bedrock model id prefix AWS-side approval
Amazon Nova amazon.nova-* None — invokable immediately
Meta Llama, Mistral, Cohere meta.*, mistral.*, cohere.* One-line click-through, instant
Anthropic Claude anthropic.claude-* Use-case form (5 fields, manual approval)

If the AWS account behind the router lacks access for a model, you’ll see a 404 model_not_found with a message like "Model use case details have not been submitted for this account..." — that’s AWS, not the router. The fix is operator-side: enable the model in the AWS Console under Bedrock → Model access for the region. Until that’s done, route the same call to OpenRouter (X-Quantized-Provider: openrouter) or pick a Nova model — Amazon’s own family has no gating.

Request translation

OpenAI field Bedrock Converse field
messages (with role: "system") Split — system text becomes top-level system: [{"text": "..."}]; user/assistant stay in messages
max_tokens / max_completion_tokens inferenceConfig.maxTokens
temperature inferenceConfig.temperature
top_p inferenceConfig.topP
stop (string or array) inferenceConfig.stopSequences (always a list — must be non-whitespace, see below)
tools + tool_choice toolConfig.tools (toolSpec) + toolConfig.toolChoice
Assistant messages with tool_calls[] Assistant content with toolUse blocks
role: "tool" (with tool_call_id) User content with a toolResult block
reasoning / reasoning_effort additionalModelRequestFields, translated to the model’s native reasoning object (e.g. Claude’s thinking with a token budget)

Streaming (stream: true) is supported on both chat completions and responses, through Bedrock’s ConverseStream API.

Stop-sequence quirk

Bedrock rejects whitespace-only stop sequences with 400 The stop sequence value at inferenceConfig.stopSequences.0 is blank. Other providers (OpenRouter, Anthropic native) accept them. If you need a request body that works across all providers, use printable stop sequences such as "###", "END", or "---" instead of "\n\n".

Out-of-scope today

The following are accepted by the router but are not forwarded to Bedrock — they will produce unexpected behavior or no-ops on this provider path. Pin OpenRouter (X-Quantized-Provider: openrouter) when you need them:

  • Vision / multimodal content parts (image_url, input_audio, video_url, file) — even when the underlying model supports them
  • response_format — JSON-mode emulation is not implemented for Bedrock; the parameter is silently dropped
  • frequency_penalty / presence_penalty / repetition_penalty / seed / logprobs / top_logprobs / logit_bias — Bedrock’s Converse API doesn’t accept them; silently dropped

Bedrock-native Embeddings

POST /v1/aws-bedrock/embeddings is a native-shape passthrough — distinct from the OpenAI-compatible /v1/embeddings. It uses bedrock-runtime.invoke_model (NOT Converse — embedding models don’t speak Converse) and preserves Bedrock’s request/response shape byte-for-byte. See the full reference at AWS Bedrock Embeddings.

Models in scope

Model id Vendor Native dimension Public list rate
amazon.titan-embed-text-v2:0 Amazon Titan 256, 512, 1024 $0.02 / 1M tokens
cohere.embed-english-v3 Cohere 1024 $0.10 / 1M tokens
cohere.embed-multilingual-v3 Cohere 1024 $0.10 / 1M tokens

The endpoint accepts two distinct request bodies discriminated by the model prefix:

  • amazon.titan-* → { model, inputText, dimensions?, normalize?, embeddingTypes? }
  • cohere.* → { model, texts, input_type, embedding_types?, truncate? }

Mismatching the body shape and the model prefix (e.g. Cohere fields on a Titan model id) is rejected with 400 invalid_request before reaching upstream.

Token estimation for Cohere

Cohere’s response does not include a token count. The router estimates input tokens at ~4 chars per token (floored at 1) — conservative and rarely under-bills natural-language input. Titan returns inputTextTokenCount directly and is billed against the upstream count.

Google Gemini (Embeddings)

POST /v1/gemini/embeddings is a native-shape passthrough to Google’s generativelanguage.googleapis.com/v1beta endpoints. Clients don’t need their own Gemini API key — billing is unified through Quantized’s per-key credit balance. See the full reference at Gemini Embeddings.

Single vs batch routing

The router picks the upstream endpoint based on the cardinality of contents:

  • 1 content → :embedContent ($0.15 per 1M tokens)
  • N > 1 contents → :batchEmbedContents ($0.075 per 1M tokens — half-priced)

The endpoint field in the response confirms which upstream URL was used.

The silent-concatenation trap

Sending multi-part content.parts to :embedContent (Gemini’s single-content endpoint) makes Gemini silently concatenate the parts into one string and return ONE vector for the concatenation — no error, 200 OK, wrong shape. The router always dispatches multi-content requests to :batchEmbedContents to avoid this. Treat any unexpected endpoint value as a router bug.

Models in scope

Model id Native dimension Truncatable to
gemini-embedding-001 3072 768

Token estimation

Gemini’s embedding endpoints do not return token counts. Same heuristic as Cohere (~4 chars/token, floored at 1).

Image Generation

POST /v1/images/generations is a unified endpoint — there are no native passthroughs (no /v1/aws-bedrock/images/generations, no /v1/gemini/images/generations). All providers adapt to the same OpenAI-shape request/response.

Provider matrix

Provider Models Native body shape Transport
OpenAI Direct gpt-image-2, gpt-image-1.5, gpt-image-1-mini, chatgpt-image-latest OpenAI /v1/images/generations REST
Google Gemini — Flash Image gemini-3-pro-image, gemini-3.1-flash-image, gemini-3.1-flash-lite-image, gemini-2.5-flash-image :generateContent with responseModalities: [TEXT, IMAGE] Chat-style
Google Gemini — Imagen imagen-4.0-fast-generate-001 :predict with instances + parameters REST

Only these two providers carry the image_generation capability. AWS Bedrock does not, so X-Quantized-Provider: bedrock is not usable on this endpoint.

Imagen needs a paid Google project

imagen-4.0-fast-generate-001 is in the catalog and routes correctly, but Gemini’s :predict endpoint is not available on a free-tier API key. Until the project is upgraded, requests for it come back 404 from Google. The Flash Image models are unaffected.

Output transport

Forced to b64_json for every provider. Read images from data[].b64_json. There is no data[].url field — a URL transport would expire and need a CDN rehost subsystem.

Provider-specific field handling

Field gpt-image-* Gemini Flash Image Imagen
prompt Yes Yes (chat-style) Yes
n 1 only 1 only 1–4
size up to 3840px (dropped — no aspect-ratio parameter) mapped to aspectRatio + imageSize
quality low, medium, high, auto — —
style (stripped) (stripped) (stripped)
background transparent, opaque, auto (stripped) (stripped)
output_format png, jpeg, webp (stripped) (stripped)
seed (stripped) (stripped) (stripped)
negative_prompt (stripped) (stripped) (stripped)

size is accepted on every model, including the ones that have nowhere to put it, so one request body works across providers. It is dropped rather than rejected.

Pricing

Model Pricing model
gpt-image-2, gpt-image-1.5, gpt-image-1-mini Token-priced — $5/M input + $40/M output tokens
gemini-2.5-flash-image $0.039 per image (flat)
gemini-3-pro-image, gemini-3.1-flash-image, gemini-3.1-flash-lite-image $0.040 per image (flat)
imagen-4.0-fast-generate-001 $0.020 per image (flat)

Image pricing is a per-provider table rather than a single catalog rate, so the adapter computes the dollar cost per call and the response reports it as usage.credits_used. Read that field rather than deriving cost from the table above.

Watermarking

The unified response includes a watermark enum on each data[] entry:

  • c2pa — the gpt-image-* family (always)
  • synthid — Gemini Flash Image and Imagen (always)
  • provenance — reserved for Amazon Titan / Nova, not currently routable
  • none — no provenance metadata embedded

Consumers targeting education customers should consider rendering a disclosure when watermark != "none".

Content moderation

OpenAI returns a standard error response on a moderation block (400 with the upstream message), which the router returns as 400 invalid_request with OpenAI’s message.

Gemini may return fewer images than requested (possibly none) with a 200. Check len(data) / usage.images rather than assuming you got n images. The response schema also carries data[].flagged, but it is always false today; don’t rely on it to detect a block.

Consensus indexes peer-reviewed research papers rather than the general web. It serves
POST /v1/web-search only — it has no content-fetch capability, so
X-Quantized-Provider: consensus on POST /v1/fetch fails resolution with a 400
rather than reaching the provider.

Reaching it

Consensus is never a default. It answers only when the request pins it, either way:

# By intent — the router picks Consensus for you
curl -X POST https://api.quantized.us/v1/web-search \
  -H "Authorization: Bearer sk-quantized-YOUR-KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "does caffeine improve memory", "type": "academic"}'
# By name — equivalent, and works without `type`
curl -X POST https://api.quantized.us/v1/web-search \
  -H "Authorization: Bearer sk-quantized-YOUR-KEY" \
  -H "X-Quantized-Provider: consensus" \
  -H "Content-Type: application/json" \
  -d '{"query": "does caffeine improve memory"}'

Prefer type: "academic". It says what you want rather than who should serve it, so it
keeps working if the academic provider changes.

Response differences

The response shape is identical to a general search, so the same client code reads both.
Five fields carry different content:

Field On academic
results[].url The paper’s page on consensus.app, not the publisher or DOI link
results[].id The paper’s DOI, or null when it has none
results[].text The paper’s abstract, capped at max_characters. include_text changes nothing, since Consensus has no full text
results[].score Always null — Consensus has no relevance score
usage.search_time Always null — Consensus does not report one

Academic metadata that Consensus returns but this endpoint does not expose today —
journal name, citation count, study type — is dropped to keep one response shape
across providers.

One search at a time

Consensus serves roughly one in-flight search per account. Searches issued in parallel
fail with a retryable error; issued one after another they succeed.
Each search also takes several seconds, noticeably longer than a general web search.

If you are fanning out academic searches, run them sequentially or retry with backoff.
Failed searches are not billed.

Provider errors

When the upstream provider fails, Quantized answers with a status and code that say what kind of failure it was, not which provider had it:

Provider failure You receive
5xx, a body that isn’t JSON, an error mid-stream, or dropped connection 502 provider_error
Rate limited 429 rate_limit_exceeded, with retry-after when the provider sent one
Timed out, or answered 408 504 upstream_timeout
Rejected our credentials (401, 403), or our credit, quota or plan limit with it ran out (402, 429 insufficient_quota) 503 provider_misconfigured, with x-should-retry: false
{
  "error": {
    "message": "The upstream provider returned an error",
    "type": "server_error",
    "param": null,
    "code": "provider_error",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}

The message of a 5xx is always ours: provider names, messages, and infrastructure details are masked. A provider’s rejection of the request itself (400 invalid_request, 404 model_not_found) keeps the provider’s message. See How provider errors are mapped and the Error reference for every error the router returns.