API Reference
Use the API Reference to look up exact methods, paths, field types, and response schemas. For workflows and complete examples, use the API Guides.
Before you start
Authentication depends on the protocol: OpenAI-compatible endpoints use a Bearer token, Anthropic Messages uses x-api-key, and Gemini-compatible endpoints use x-goog-api-key or ?key=. Copy an exact model ID from the live Models page.
Basics
OpenAI SDK / Chat Completions / Responses
Base URL
https://getrouter.ai/v1Authentication
Authorization: Bearer YOUR_API_KEYAnthropic SDK / Messages
Base URL
https://getrouter.aiAuthentication
x-api-key: YOUR_API_KEYGemini-compatible
Base URL
https://getrouter.aiAuthentication
x-goog-api-key: YOUR_API_KEYQuery parameter alternative:
?key=YOUR_API_KEYDirect HTTP and provider task APIs
Service root
https://getrouter.aiAppend the full Path shown on the operation page; use the authentication shown there.
Full OpenAPI: Open API Explorer
Browse by API group
Models
2 public endpoints.
Chat Completions
1 public endpoint.
Responses
2 public endpoints.
Claude Messages
1 public endpoint.
Gemini API
2 public endpoints.
POST /v1beta/models/{model}:generateContent— Generate Gemini contentPOST /v1/engines/{model}/embeddings— Create Gemini embeddings
Embeddings
1 public endpoint.
Rerank
1 public endpoint.
Completions
1 public endpoint.
Image Generation
2 public endpoints.
Audio
3 public endpoints.
POST /v1/audio/transcriptions— Transcribe audioPOST /v1/audio/translations— Translate audioPOST /v1/audio/speech— Generate speech
Video Generation
10 public endpoints.
POST /v1/videos— Create a videoGET /v1/videos/{task_id}— Retrieve a video taskGET /v1/videos/{task_id}/content— Download video contentPOST /kling/v1/videos/text2video— Create a Kling text-to-video taskGET /kling/v1/videos/text2video/{task_id}— Retrieve a Kling text-to-video taskPOST /kling/v1/videos/image2video— Create a Kling image-to-video taskGET /kling/v1/videos/image2video/{task_id}— Retrieve a Kling image-to-video taskPOST /jimeng/— Create a Jimeng video taskPOST /v1/video/generations— Create a video generation taskGET /v1/video/generations/{task_id}— Retrieve a video generation task
Moderations
1 public endpoint.
Realtime
1 public endpoint.
