Quickstart

Follow these steps to start calling the KOPRouter API.

**Prerequisites**

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
Sign up for a new account, or log in to an existing one. From the console you can manage API keys, channels, top-ups, and usage details. In the console's API Keys page, click Create to generate an API key:
Save this key securely — it authenticates all API requests (see Authentication in the Overview):

<span class="field-row"><code>Authorization: Bearer sk-...</code></span>
Below is a sample request to create a chat completion using `curl` (you can also use Postman, Python requests, or other HTTP clients):
```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>
After your first request, continue exploring:
* 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.