Getting started

Quickstart

Get a key, set one environment variable and send your first request to Claude, GPT or Gemini through the Kontinent AI API.

Or let your agent do it

Paste the prompt into your coding agent. The agent writes the configuration and tests it.

Kontinent AI gives you Claude, GPT and Gemini models through one API at https://api.kontinentai.com. The API accepts three request formats: OpenAI chat completions, Anthropic Messages and OpenAI Responses. Thus, the OpenAI and Anthropic SDKs work with a new base URL and a new key.

1. Get an API key

  1. Sign in with Google or with a link that we send to your email.
  2. Open API keys in the dashboard.
  3. Create a key. Copy it immediately. We show the key one time only.

A key starts with sk-kont-. If you lose a key, revoke it and create a new key.

2. Set the key in your shell

export KONTINENT_API_KEY="sk-kont-..."

The samples on this page and on the setup pages read the key from this variable.

3. Send a request

curl https://api.kontinentai.com/v1/chat/completions \
  -H "Authorization: Bearer $KONTINENT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-haiku-4-5-20251001",
    "messages": [{"role": "user", "content": "What is the capital of Kenya? One sentence."}]
  }'
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["KONTINENT_API_KEY"],
    base_url="https://api.kontinentai.com/v1",
)

response = client.chat.completions.create(
    model="claude-haiku-4-5-20251001",
    messages=[{"role": "user", "content": "What is the capital of Kenya? One sentence."}],
)

print(response.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.KONTINENT_API_KEY,
  baseURL: "https://api.kontinentai.com/v1",
});

const response = await client.chat.completions.create({
  model: "claude-haiku-4-5-20251001",
  messages: [{ role: "user", content: "What is the capital of Kenya? One sentence." }],
});

console.log(response.choices[0].message.content);

The Python sample needs pip install openai. The Node sample needs npm install openai.

The response:

{
  "id": "chatcmpl-8f2a1c",
  "object": "chat.completion",
  "created": 1791331200,
  "model": "claude-haiku-4-5-20251001",
  "choices": [
    {
      "index": 0,
      "message": { "role": "assistant", "content": "The capital of Kenya is Nairobi." },
      "finish_reason": "stop"
    }
  ],
  "usage": { "prompt_tokens": 21, "completion_tokens": 8, "total_tokens": 29 },
  "kontinent": { "request_id": "req_8f2a1c", "cost_micros": 13, "cost_usd": 0.000013, "list_price_usd": 0.000061, "saved_usd": 0.000048 }
}

The kontinent block shows the cost of the request in US dollars. list_price_usd is the cost of the same tokens at the official price of the maker. saved_usd is the difference. An OpenAI client ignores this block.

The starter balance

A new account gets a starter balance of $0.02. Until you add balance, you can use it on these models only: claude-haiku-4-5-20251001 (/v1/messages, /v1/chat/completions); gemini-3.5-flash (/v1/chat/completions).

On the starter balance, these limits also apply:

  • A request can write a maximum of 4,096 output tokens.
  • A prompt can have a maximum of 40,000 characters.
  • An account can send a maximum of 5 requests a minute.

A request for a different model gets a 403 error with the code STARTER_BALANCE_ONLY. We do not charge for that request. In GET /v1/models, each starter model has "starter": true.

Get more balance

To get balance, top up on the balance page, in US dollars or in your own currency. A top-up starts at $1 by mobile money or bank transfer, and at $3 by card. You can also enter a redemption code there. The balance is in US dollars and it does not expire.

Next steps