Connect your tools

Codex CLI

Add Kontinent AI to the Codex CLI as a model provider in config.toml. Choose a GPT model and make sure that the connection works.

Or let your agent do it

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

The Codex CLI sends OpenAI Responses requests. Kontinent AI serves that format at https://api.kontinentai.com/v1/responses. You add Kontinent AI to Codex as a model provider.

Before you start, make sure that you have:

  • The Codex CLI, installed.
  • A Kontinent AI key. See Quickstart.
  • Balance from a top-up or a redemption code. The GPT models are not starter models.

1. Set the key

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

Put this line in your shell profile, for example ~/.zshrc, so that each new shell has the key.

2. Add the provider

Open ~/.codex/config.toml. Add these lines:

model = "gpt-5.5"
model_provider = "kontinent"

[model_providers.kontinent]
name = "Kontinent AI"
base_url = "https://api.kontinentai.com/v1"
env_key = "KONTINENT_API_KEY"
wire_api = "responses"
KeyWhat it does
modelThe model that Codex uses. Select one from the list on this page
model_providerSelects the provider table below it
base_urlOur API. Codex adds /responses to it
env_keyThe name of the environment variable that holds your key. Codex sends the key in Authorization: Bearer
wire_apiThe request format. responses is the only value that Codex supports

3. Make sure that the connection works

Send one small request with curl:

curl -sS -w '\n%{http_code}\n' https://api.kontinentai.com/v1/responses \
  -H "Authorization: Bearer $KONTINENT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-5.5", "input": "Say OK.", "max_output_tokens": 256}'

A JSON response that ends with 200 shows that the key and the URL are correct. Then run Codex:

codex exec "Say OK."

Codex prints the answer of the model.

Models

These models work on the Responses endpoint. This list comes from our model catalogue:

  • gpt-5.5
  • gpt-6.1-sol
  • gpt-5

To use a different model for one session, run codex --model gpt-5.

Costs and limits

  • Codex streams its responses. A streamed Responses response does not include our kontinent cost block. We record the cost of each request, and the dashboard shows it.
  • The GPT models think before they answer, and we charge for that output as output tokens.
  • Each request counts toward the limit of 60 requests a minute for each key.

Problems

ProblemWhat to do
401Make sure that the shell that starts Codex has KONTINENT_API_KEY
402Your balance is too low. Top up on the balance page
400 that says is not served on /v1/responsesSelect a model from the list on this page
404Make sure that base_url ends with /v1 and not with /v1/responses

The Codex documentation for model providers is at learn.chatgpt.com.