API Overview
WRouter speaks the industry's mainstream LLM protocols in parallel — pick whichever you want.
Base URL
https://wrouter.aiAll endpoints are HTTPS only.
Protocol compatibility
| Protocol | Base path | Notes |
|---|---|---|
| OpenAI-style | /v1/* | The industry's most common protocol format — official and community SDKs work as drop-in |
| Anthropic-style | /v1/messages | Messages protocol format, for SDKs and clients that speak it |
| Gemini-style | /v1beta/models/{model}:generateContent | Generative AI protocol format |
Point your SDK's base_url at WRouter, leave the model ID and request body as-is, and WRouter routes to the right upstream.
Endpoints
Chat
- Chat Completions —
POST /v1/chat/completions(OpenAI) - Messages —
POST /v1/messages(Anthropic) - Responses —
POST /v1/responses(OpenAI Agentic) POST /v1/responses/compact— Compact a Responses session- Completions (legacy) —
POST /v1/completions
Retrieval
- Embeddings —
POST /v1/embeddings - Rerank —
POST /v1/rerank
Images
- Images Generations —
POST /v1/images/generations - Images Edits —
POST /v1/images/edits
Audio
- Speech (TTS) —
POST /v1/audio/speech - Transcriptions (STT) —
POST /v1/audio/transcriptions - Translations —
POST /v1/audio/translations(any language → English)
Video
- Video generation —
POST /v1/videosand vendor-specific Kling / Pixverse / Seedance / Veo3 / Wanx / Jimeng entries - Task lookup —
GET /v1/videos/{task_id},GET /v1/videos/{task_id}/content
Safety
- Moderations —
POST /v1/moderations
Realtime
- Realtime —
GET /v1/realtime(WebSocket upgrade)
Metadata
- Models —
GET /v1/models,GET /v1beta/models
Conventions
- Auth — All requests need
Authorization: Bearer sk-.... See Authentication. - Content type — JSON requests are
application/json; charset=utf-8except file uploads. - Errors — Standard RESTful codes. See Errors.
- Streaming — Every chat endpoint accepts
stream: true(Server-Sent Events). - Rate limits — Per-token by default; configurable in the console.
- Timeouts — Set client timeout ≥ 600 s; long generations may exceed 5 minutes.