CloseRouter

API reference

Base URL, authentication and available API endpoints.

Connection

Base URL: https://api.closerouter.dev/v1

Send Authorization: Bearer <key>. Compatible Anthropic clients can also use x-api-key.

For JSON requests, set Content-Type: application/json.

Models and routing

GET /models
Model catalog, pricing, modalities, and supported endpoints.
GET /models/count
Available model count.
GET /model-authors
Compact developer list with visible model counts.
GET /models/{developer}/{model}/endpoints
Parameters and streaming support for one model.
GET /providers
Models and available provider options for each model.
PATCH /providers
Save the default provider for a model.

Inference and media

POST /chat/completions
OpenAI-style Chat Completions.
POST /responses
OpenAI Responses API.
POST /messages
Anthropic-style Messages API.
POST /audio/speech
Speech synthesis: completed MP3 or PCM response bytes.
POST /images/generations
Image generation.
POST /images/edits
Image editing.
POST /videos
Create a video task.
GET /videos/{task_id}
Check video task status.
GET /videos/models
Video model capabilities.
POST /videos/quote
Video price quote.
GET /media/models
Image operations and schemas.
POST /media/quote
Reservation quote.
GET /media/requests/{id}
Unfinished task status.

Keys and usage

GET /credits
Current account credits and total usage.
GET /requests/{request_id}
Cost and usage for one inference request.
GET /requests
The account's latest requests with filters and pagination.
GET /usage
Period spend statistics by day, model, provider and key.
POST /keys
Create an account API key.
GET /keys
List active account keys.
PATCH /keys/{key_id}/limit
Update spend limits and key-wide or per-model maximum prices.
DELETE /keys/{key_id}
Revoke an account key.

Details