- OpenAI Unified Format:
POST https://api.xroute.ai/v1/chat/completions - Anthropic Unified Format:
POST https://api.xroute.ai/v1/messages - Provider Native Formats:
POST https://api.xroute.ai/{Provider}/...(Supporting native protocols for OpenAI, Anthropic, Google, Byteplus, Deepseek, GLM, etc.)
- Text Models: Support all 3 calling formats (OpenAI / Anthropic / Native).
- Image Models: Native format only (e.g.
https://api.xroute.ai/OpenAI/images/generations,https://api.xroute.ai/Byteplus/images/generations). - Video Models: Native asynchronous task format only (e.g. Byteplus and WAN task creation and polling endpoints).
1. OpenAI Unified Invocation
Standard OpenAI-compatible request payloads and authorization headers. Compatible with all text generation models.- Endpoint:
POST https://api.xroute.ai/v1/chat/completions - Auth Header:
Authorization: Bearer <XROUTE_API_KEY>
2. Anthropic Unified Invocation
Standard Anthropic Messages protocol. The gateway translates payloads across underlying model providers.- Endpoint:
POST https://api.xroute.ai/v1/messages - Auth Header:
x-api-key: <XROUTE_API_KEY> - Protocol Header:
anthropic-version: 2023-06-01
3. Provider Native Invocation
Directly interface with native vendor endpoints and protocols via the{Provider} routing prefix.
Google Gemini Native
- Endpoint:
POST https://api.xroute.ai/Google/models/{model_id}:generateContent - Streaming:
POST https://api.xroute.ai/Google/models/{model_id}:streamGenerateContent?alt=sse
Byteplus Native
- Endpoint:
POST https://api.xroute.ai/Byteplus/chat/completions
Python (Byteplus Ark SDK)
Deepseek & GLM Native (DashScope Protocol)
- Endpoint:
POST https://api.xroute.ai/{Provider}/services/aigc/text-generation/generation
cURL

