NovitàCorsia Eco ora su 91 modelli: lo stesso modello a un prezzo più basso

Valuta

Ricarichi sempre in euro. Le altre valute sono indicate al tasso BCE del giorno. Tassi di riferimento BCE

AccediInizia

Documentazionev1

Menu della documentazioneQuickstart

Quickstart

Create an account, add credits, make a key and send your first request to the Nexrouting API.

La documentazione è in inglese.

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:

Shell
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)
Model IDs

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.

Response
{  "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