Quickstart
Follow these steps to start calling the KOPRouter API.
Before making any API request, make sure you have:
- An active KOPRouter account
- A valid API key prefixed with
sk-, created in the console’s API Keys page
Save this key securely — it authenticates all API requests (see Authentication in the Overview):
<span class="field-row"><code>Authorization: Bearer sk-...</code></span>
```bash
curl https://koprouter.kopglobal.com/v1/chat/completions \
-H "Authorization: Bearer sk-..." \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_ID",
"messages": [
{ "role": "user", "content": "Hello!" }
]
}'
```
<Tip>
Replace `sk-...` with your actual API key and `MODEL_ID` with a model ID returned by `/v1/models`. A successful response returns a chat completion matching your input.
</Tip>
* Read the per-endpoint docs for request parameters, response formats, and error handling.
* Integrate advanced features like streaming responses and tool calling.
* Point the OpenAI SDK, Claude Code, Codex, and other tools at KOPRouter — see the Integration section.
* If your network (e.g. mainland China) cannot reach KOPRouter directly, set up a VPN or proxy first — see Network & Proxy.