Quickstart
Create an account, add credits, make a key and send your first request to the Nexrouting API.
De documentatie is in het Engels.
Nexrouting gives you one API for models from OpenAI, Anthropic, Google, xAI and other providers. It speaks the OpenAI format (/v1/chat/completions, /v1/responses, /v1/embeddings) and the Anthropic format (/v1/messages), so the SDK you already use works. You change two things: the base URL and the key.
1. Create an account and add credits
Create an account with your email address, Google or GitHub. Then add credits on Credits. You pay in euros, from €10; your balance is kept in US dollars and you see the amount before you pay. Every request is paid from that balance, per token.
2. Create an API key
Open API keys and choose New key. The key starts with nr-v1- and is shown once, so copy it right away. Keep it in an environment variable, not in your code:
export NEXROUTING_API_KEY="nr-v1-…"3. Send your first request
Point your SDK at https://api.nexrouting.com/v1 and choose a model by its ID.
import osfrom openai import OpenAI client = OpenAI( base_url="https://api.nexrouting.com/v1", api_key=os.environ["NEXROUTING_API_KEY"],) reply = client.chat.completions.create( model="openai/gpt-6-astra", messages=[{"role": "user", "content": "Hello"}],)print(reply.choices[0].message.content)IDs look like provider/model, for example anthropic/claude-sonnet-5.5. Add :eco for the cheaper Eco lane where a model has one. See Models & lanes, or call GET /v1/models.
4. Read the response
The response has the shape of the endpoint you called. model holds the model's public ID and usage the token counts we bill on. Every response, errors included, has an x-request-id header: mention it when you contact support.
{ "id": "chatcmpl-8f1c2e9a", "object": "chat.completion", "created": 1795075200, "model": "openai/gpt-6-astra", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Hello! How can I help you today?" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 9, "completion_tokens": 10, "total_tokens": 19 }}5. Check usage and balance
Each request shows up under Usage with its model, tokens, latency and cost. You can filter by model or key and export to CSV. From code, GET /v1/credits returns your balance.
Next steps
- AuthenticationSend your key as a bearer token, limit keys with a budget, a model list and an expiry date, and revoke a key that leaked.
- Models & lanesHow model IDs work, what the Standard and Eco lanes are, how fallback between routes works, and how to list every model.
- StreamingStream tokens as server-sent events on every chat endpoint, get usage at the end of a stream, and handle errors mid-stream.
- ErrorsEvery error the Nexrouting API returns: HTTP status, code, what it means and what to do, plus the error shapes and when to retry.