API Reference
Every endpoint the nRouter gateway serves, with request and response shapes
nRouter exposes an OpenAI- and Anthropic-compatible API at https://api.nrouter.ai.
Any SDK that talks to either provider works by changing the base URL and the key.
Try any endpoint from its page
Every endpoint page below carries a live request panel — set your key, send a real request, read the cost straight off the response headers.
Endpoints
| Endpoint | Method | What it does |
|---|---|---|
/v1/chat/completions | POST | Chat completions (OpenAI-compatible) |
/v1/completions | POST | Legacy text completions |
/v1/responses | POST | OpenAI Responses API |
/v1/messages | POST | Messages (Anthropic-compatible) |
/v1/messages/count_tokens | POST | Count tokens before spending |
/v1/embeddings | POST | Embedding vectors |
/v1/models | GET | List available models |
/v1/models/{model_id} | GET | Retrieve one model |
/v1/images/generations | POST | Image generation |
/v1/audio/speech | POST | Text to speech |
/v1/audio/transcriptions | POST | Speech to text |
/v1/audio/translations | POST | Translate speech to English |
/v1/videos | POST | Start a video job |
/v1/videos/{id} | GET | Poll job status (free) |
/v1/videos/{id}/content | GET | Download the video (free) |
Video creation is billed; polling and download are not — you are charged once, when the job starts.
Authentication
Every request takes your virtual key as a bearer token:
curl https://api.nrouter.ai/v1/chat/completions \
-H "Authorization: Bearer $NROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o","messages":[{"role":"user","content":"Hello!"}]}'Guides
Start with Chat Completions — streaming, function calling, and the request shape in full.
Was this page helpful?