Skip to Content
DocsAdvancedProvider Routing

Provider Routing

A model is often served by more than one provider — bytedance/seedance-2.0, for example, comes from both volcengine and byteplus. ofox selects a provider automatically; provider.type pins the request to a specific one.

Default routing behaviour

When no provider field is sent, ofox distributes the request by weight across the channels currently serving that model. Which provider serves any single request is not predictable.

Pinning a provider

Pass the provider name in the type field. The field is located differently for each model type:

Model typeField path
Chat modelsextra_body.provider.type
Video modelsprovider.type

The Gemini native protocol ignores extra_body.provider in the body — the request succeeds and the constraint simply does not apply, with no error. On that protocol use the X-OfoxAI-Provider-Type header instead. The per-protocol field contract is in API · Provider routing.

Terminal
curl https://api.ofox.run/v1/chat/completions \ -H "Authorization: Bearer $OFOX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "anthropic/claude-sonnet-5", "messages": [{ "role": "user", "content": "..." }], "extra_body": { "provider": { "type": "bedrock" } } }'

With the official OpenAI SDKs, extra_body must be present as a literal key in the request body. The TypeScript SDK sends it as written in the params object. The Python SDK’s extra_body= argument merges its contents into the top level of the body, so the key must be nested one level deeper, or passed as a request header instead.

Available providers

The providers currently supported by ofox are listed below. Short names, shown in parentheses, are equivalent to the full name; either may be used:

ProviderDescription
openaiOpenAI :official API for the GPT family
anthropicAnthropic :official API for the Claude family
geminiGoogle AI :official API for the Gemini family
azure_foundry (foundry)Azure AI Foundry :model hosting platform on Microsoft Azure
aws_bedrock (bedrock)Amazon Bedrock :model hosting service on AWS
google_vertex (vertex)Vertex AI :model hosting platform on Google Cloud
aliyunAlibaba Cloud Bailian :Alibaba Cloud’s model service platform
volcengineVolcengine Ark :ByteDance’s platform for mainland China
byteplusBytePlus :ByteDance’s platform for markets outside mainland China
deepseekDeepSeek :official API for the DeepSeek family
moonshotMoonshot AI :official API for the Kimi family
zhipuZhipu AI :official API for the GLM family
minimaxMiniMax :official API for the MiniMax family
grokxAI :official API for the Grok family
jinaJina AI :embedding and rerank models
tencentTencent Cloud Hunyuan :Tencent Cloud’s model service platform

Not every provider serves every model. Which providers serve a given model — and which protocols each of them supports — is shown on that model’s page in the model catalog . The same data is available programmatically as provider_cards[] from GET /v2/models/catalog/{provider}/{slug}?include=provider_price.

Chat models

Chat models are spread across most of the providers above. The exact mapping and protocol support are given on each model’s page.

Video models

The bytedance/seedance-* family is served by the two providers below, whose content policies differ:

ProviderDescriptionContent policy
volcengineVolcengine Ark, ByteDance’s platform for mainland ChinaStandard moderation
byteplusBytePlus, ByteDance’s platform for markets outside mainland ChinaAllows not-for-all-audiences (NSFW) content

byteplus allows seedance to generate not-for-all-audiences (NSFW) content, while volcengine applies standard moderation. provider.type: "byteplus" must be set explicitly when such content is required; otherwise the weighted distribution may route the request to volcengine, where moderation will reject it.

Common errors

error.typeTrigger
invalid_provider_typeThe value is not in the provider enum: a misspelled name, or a retired spelling.
provider_type_unavailableThe provider exists but does not serve this model. For chat models the error message also lists the providers that do.
Last updated on