API addresses and protocols
Choose the correct API base URL, version path, and protocol for the overseas site.
Addresses for this site
| Purpose | Address |
|---|---|
| API root | https://api.nexrouter.ai |
| OpenAI SDK / compatible Base URL | https://api.nexrouter.ai/v1 |
| Full Chat Completions endpoint | https://api.nexrouter.ai/v1/chat/completions |
| Full Responses endpoint | https://api.nexrouter.ai/v1/responses |
| Full Anthropic Messages endpoint | https://api.nexrouter.ai/v1/messages |
Use an overseas-site API key with these addresses. Domestic and overseas accounts, balances, and keys are separate. The marketing website URL is not an inference endpoint.
When to include /v1
- OpenAI Python / TypeScript SDK: use
https://api.nexrouter.ai/v1. The SDK appends/chat/completionsor/responses. - Claude Code
ANTHROPIC_BASE_URL: use the roothttps://api.nexrouter.ai. The client appends/v1/messages; do not add another/v1. - Other clients: follow the client-specific guide. Some fields expect a root, others a versioned base. Do not paste a full endpoint into a base URL field.
Paths containing /v1/v1/ or /chat/completions/chat/completions indicate duplicate path segments.
Match the protocol to the model
Chat Completions, Responses, and Anthropic Messages are different protocols. An endpoint existing does not mean every model, account group, or client feature supports it. Confirm the exact model ID, permitted group, and capabilities such as tool calling before connecting.
Start with a minimal text request. Add streaming, tools, images, or a larger context only after the basic request works. Do not send one protocol's request body to another endpoint.
Prepare three values
- The base URL required by your client.
- An API key from this site's console.
- An exact model ID, not a display name or another provider's alias.
See Troubleshooting if the request fails. Never include your real key in documentation feedback.