Connect your tools
OpenClaw
Add Kontinent AI to OpenClaw as a custom provider in openclaw.json. Use Claude, GPT and Gemini models through the chat completions endpoint.
Or let your agent do it
Paste the prompt into your coding agent. The agent writes the configuration and tests it.
OpenClaw can send OpenAI chat completions requests to a custom provider. Kontinent AI serves that
format at https://api.kontinentai.com/v1/chat/completions, for Claude, GPT and Gemini models.
Before you start, make sure that you have:
- OpenClaw, installed.
- A Kontinent AI key. See Quickstart.
- Balance from a top-up or a redemption code. OpenClaw sends prompts that are too long for the starter balance.
1. Set the key
Put the key in ~/.openclaw/.env. If the file does not exist, create it:
KONTINENT_API_KEY=sk-kont-...
OpenClaw reads this file when the Gateway starts. The Gateway can run as a background service, so a key in your shell profile is not enough.
2. Add the provider
Open ~/.openclaw/openclaw.json. If the file does not exist, create it. Add the kontinent
provider and set the default model:
{
models: {
mode: "merge",
providers: {
kontinent: {
baseUrl: "https://api.kontinentai.com/v1",
apiKey: "${KONTINENT_API_KEY}",
api: "openai-completions",
models: [
{ id: "claude-sonnet-5-5", name: "Claude Sonnet 5.5", input: ["text", "image"], contextWindow: 200000, maxTokens: 16000 },
{ id: "claude-opus-5-5", name: "Claude Opus 5.5", input: ["text", "image"], contextWindow: 200000, maxTokens: 16000 },
{ id: "claude-haiku-4-5-20251001", name: "Claude Haiku 4.5", input: ["text", "image"], contextWindow: 200000, maxTokens: 16000 },
{ id: "gpt-5.5", name: "GPT-5.5", input: ["text", "image"], contextWindow: 1000000, maxTokens: 16000 },
{ id: "gemini-3.1-pro-preview", name: "Gemini 3.1 Pro", input: ["text", "image"], contextWindow: 1048576, maxTokens: 16000 },
],
},
},
},
agents: {
defaults: {
model: { primary: "kontinent/claude-sonnet-5-5" },
},
},
}
If the file has other content, add the models and agents keys to it. Do not replace the other
keys.
| Key | What it does |
|---|---|
baseUrl | Our API. OpenClaw adds /chat/completions to it |
apiKey | ${KONTINENT_API_KEY} reads the key from the environment |
api | openai-completions sends OpenAI chat completions requests |
models | The models that OpenClaw can use. Each id must be a model id from the list on this page |
input | ["text", "image"] lets OpenClaw send images. All the models on this page accept images |
contextWindow | The context window of the model. The context_window field of GET /v1/models gives this value |
maxTokens | The output limit for each request. Without it, the limit is 16,000 tokens, our default |
agents.defaults.model.primary | The model that OpenClaw uses, as provider/model |
You can also edit the configuration with openclaw config set. Run openclaw config validate after
you edit the file. OpenClaw refuses a configuration that has an unknown key.
3. Make sure that the connection works
Send one small request with curl:
export KONTINENT_API_KEY="sk-kont-..."
curl -sS -w '\n%{http_code}\n' 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", "max_tokens": 16, "messages": [{"role": "user", "content": "Say OK."}]}'
A JSON response that ends with 200 shows that the key and the URL are correct. Then do these steps:
- Run
openclaw models list --provider kontinent. OpenClaw shows the models from your file. - Run
openclaw models status. The default model iskontinent/claude-sonnet-5-5. - Run
openclaw agent exec "Say OK." --model kontinent/claude-haiku-4-5-20251001. OpenClaw prints the answer.
Models
These models work on the chat completions endpoint. This list comes from our model catalogue. You
can add each of them to the models array:
claude-opus-5-5claude-opus-5claude-sonnet-5-5claude-sonnet-5claude-haiku-4-5-20251001claude-fable-5-1gpt-5.5gpt-6.1-solgpt-5gemini-3.1-pro-previewgemini-3.5-flashglm-5.3qwen3.8-maxdeepseek-v4.1-flash
All of these models accept tools, and an agent needs tools. For most agent work, use
claude-sonnet-5-5. For long and difficult tasks, use claude-opus-5-5, gpt-5.5 or
gemini-3.1-pro-preview. For quick tasks at a lower cost, use claude-haiku-4-5-20251001.
Costs and limits
- OpenClaw streams its responses. We record the cost of each request, and the dashboard shows it.
- OpenClaw can send requests without a message from you, for example from scheduled jobs. Each request costs money.
- Each request counts toward the limit of 60 requests a minute for each key.
Problems
| Problem | What to do |
|---|---|
401 | Make sure that ~/.openclaw/.env has KONTINENT_API_KEY. Then restart the Gateway |
402 | Your balance is too low. Top up on the balance page |
400 that says is not served on /v1/chat/completions | Remove that model from the models array |
404 that names a model | Make sure that each id in models is a model id from the list on this page |
The OpenClaw documentation for custom providers is at docs.openclaw.ai.