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 type | Field path |
|---|---|
| Chat models | extra_body.provider.type |
| Video models | provider.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.
Chat models
cURL
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:
| Provider | Description |
|---|---|
openai | OpenAI :official API for the GPT family |
anthropic | Anthropic :official API for the Claude family |
gemini | Google 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 |
aliyun | Alibaba Cloud Bailian :Alibaba Cloud’s model service platform |
volcengine | Volcengine Ark :ByteDance’s platform for mainland China |
byteplus | BytePlus :ByteDance’s platform for markets outside mainland China |
deepseek | DeepSeek :official API for the DeepSeek family |
moonshot | Moonshot AI :official API for the Kimi family |
zhipu | Zhipu AI :official API for the GLM family |
minimax | MiniMax :official API for the MiniMax family |
grok | xAI :official API for the Grok family |
jina | Jina AI :embedding and rerank models |
tencent | Tencent 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:
| Provider | Description | Content policy |
|---|---|---|
volcengine | Volcengine Ark, ByteDance’s platform for mainland China | Standard moderation |
byteplus | BytePlus, ByteDance’s platform for markets outside mainland China | Allows 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.type | Trigger |
|---|---|
invalid_provider_type | The value is not in the provider enum: a misspelled name, or a retired spelling. |
provider_type_unavailable | The provider exists but does not serve this model. For chat models the error message also lists the providers that do. |