Base URL and authentication

What to put in base_url, and Bearer vs x-api-key.

Base URL

Always https://api.router.ai/v1. Mind the trailing /v1 — omitting it returns 404, and doubling it (/v1/v1) does too.

Authentication

The standard header is:

Authorization: Bearer sk-your-token

Some Anthropic-ecosystem clients send x-api-key instead; we accept both. If a client sends both headers, we use whichever carries the sk- prefix.

Where to configure it

Related articles

Blog