- OpenAI Unified Format:
POST https://api.xroute.ai/v1/chat/completions - Anthropic Unified Format:
POST https://api.xroute.ai/v1/messages - Provider Native Direct Format:
POST https://api.xroute.ai/{Provider}/...
Supported Text Models
1. OpenAI Unified Invocation
Call any text model using the standard OpenAI Chat Completions schema. Simply setbase_url="https://api.xroute.ai/v1" and authenticate with your XRoute API key.
- Endpoint:
POST https://api.xroute.ai/v1/chat/completions - Header:
Authorization: Bearer $XROUTE_API_KEY
2. Anthropic Unified Invocation
Route requests across any provider using the Anthropic Messages schema. Compatible with Claude Code and tools built around/v1/messages.
- Endpoint:
POST https://api.xroute.ai/v1/messages - Headers:
x-api-key: $XROUTE_API_KEYanthropic-version: 2023-06-01
3. Provider Native Invocation
Directly communicate with vendor-specific APIs and SDKs by targeting the{Provider} routing namespace.
- Google Gemini Native
- Byteplus Ark Native
- Deepseek / GLM Native
Endpoint:
POST https://api.xroute.ai/Google/models/{model_id}:generateContentcURL
Python (google-genai SDK)

