Guides

Switch from another provider

Move code from the Anthropic API, OpenRouter or a different relay. What to change, what stays the same, and how we select a supply route.

The API uses the formats of OpenAI and Anthropic. Thus, if your code uses the OpenAI SDK or the Anthropic SDK, you change only the base URL, the key and, sometimes, the model id.

From the Anthropic API

  1. Set the base URL to https://api.kontinentai.com. Do not add /v1.
  2. Use your Kontinent AI key in place of your Anthropic key.
  3. Keep your model ids. We use the Anthropic ids, for example claude-sonnet-5-5.

See Anthropic SDK and Claude Code.

From OpenRouter or a different relay

  1. Set the base URL to https://api.kontinentai.com/v1.
  2. Use your Kontinent AI key.
  3. Change the model ids. OpenRouter puts the maker before the model, for example anthropic/.... We use the id without the maker. GET /v1/models gives each id, and it needs no key.

An unknown id gets a 404 error. We never send your request to a different model.

How we select a supply route

Each model has more than one supply route. If a route fails before the answer starts, we send the request to the next route for the same model. We do not send it to a different model. See Reliability.

You cannot select the route. On /v1/chat/completions, the OpenRouter fields provider, models and route get a 400 error that names the field. We do not ignore them in silence.

Payment

We use a balance in US dollars that you get before you use the API. There is no monthly payment and no monthly minimum. You add balance with a top-up from $1, or with a redemption code. See Prices and charges.

Three checks before you move traffic

  1. Each model id that you use exists here. GET /v1/models needs no key, so a short script can do this check.
  2. Each model works on your endpoint. See Supported endpoints.
  3. Your error code reads error.type. A low balance is a 402 error with the type insufficient_quota (or billing_error on /v1/messages), not a 429 error.