API reference

For your own code or other tools. The API follows the OpenAI and Anthropic formats, so their official SDKs work by changing the base URL.

Base URLs

全球 / Globalhttps://nekorouter.cc/v1

默认端点,经 Cloudflare,全球可用

俄罗斯加速 / Russiahttps://ru.nekorouter.cc/v1

俄罗斯用户推荐;首字等待超过 100 秒的长推理请求也请用这个端点

Authentication

Send your key as Authorization: Bearer YOUR_API_KEY. Anthropic-format requests may use x-api-key instead.

Endpoints

PathFormat
/v1/chat/completionsOpenAI Chat Completions
/v1/responsesOpenAI Responses
/v1/messagesAnthropic Messages
/v1/modelsOpenAI

Example

curl https://nekorouter.cc/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_NAME",
"messages": [{ "role": "user", "content": "Hello" }]
}'

Errors

Errors use the OpenAI error shape. Each response carries an X-Request-Id header; include it when you contact support.