Documentation

Everything you need for Claude Code, Codex and Kimi CLI. Guides, errors, models and pricing — in one place.

Start with your CLI

Relé is intended for Claude Code CLI, Codex CLI and Kimi CLI. Other applications and SDK integrations are outside the supported product scope.

  1. Create an account. Your first API key is generated automatically — copy it from the keys page.
  2. Check your balance and choose a model for your CLI configuration.
  3. Use your Relé deployment’s base URL ending in /v1. Replace the example URL, model ID and key below with your own values.
You can copy your key again from the dashboard. Do not commit it to a repository.

Claude Code CLI

Use an Anthropic route configured by your administrator. Set the gateway base URL without /v1; the CLI appends /v1/messages. A catalog entry alone does not guarantee an active route.

# macOS / Linux
export ANTHROPIC_BASE_URL="https://YOUR_RELE_HOST"
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
export ANTHROPIC_MODEL="MODEL_ID_FROM_CATALOG"
claude

# PowerShell
$env:ANTHROPIC_BASE_URL="https://YOUR_RELE_HOST"
$env:ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
$env:ANTHROPIC_MODEL="MODEL_ID_FROM_CATALOG"
claude
Messages and token counting are available for native Anthropic routes. Verify your selected model with the administrator before using it.
Official Claude Code gateway guide ↗

Codex CLI

Add a custom provider to your user configuration at ~/.codex/config.toml. Provider settings belong in the user configuration, not a project’s .codex folder.

model = "MODEL_ID_FROM_CATALOG"
model_provider = "rele"

[model_providers.rele]
name = "Relé"
base_url = "https://YOUR_RELE_HOST/v1"
env_key = "RELE_API_KEY"
wire_api = "responses"

Set RELE_API_KEY in the terminal where you launch Codex. Choose the command for your shell, then run codex.

# PowerShell
$env:RELE_API_KEY = "YOUR_API_KEY"
codex

# macOS / Linux
export RELE_API_KEY="YOUR_API_KEY"
codex
Official Codex configuration ↗

Kimi CLI

Edit ~/.kimi/config.toml and configure Relé as an openai_legacy provider. Copy the model ID and context size from the catalog.

default_model = "rele"

[providers.rele]
type = "openai_legacy"
base_url = "https://YOUR_RELE_HOST/v1"
api_key = "YOUR_API_KEY"

[models.rele]
provider = "rele"
model = "MODEL_ID_FROM_CATALOG"
# Replace 32768 with the model's catalog context size.
max_context_size = 32768

Save the file and launch kimi. Keep this configuration private because it contains your key. Built-in web search and fetch may require separate Kimi services.

Official Kimi provider guide ↗

Get back on track

401

Check your key. It may be missing, revoked or copied incorrectly.

402

Check your balance and the key’s daily, monthly and total spending limits.

403

The model or your IP is not allowed by this key. Check its restrictions.

404

Copy the exact model ID from the catalog. Also check the base URL.

429

Too many requests. Wait before retrying and reduce concurrency.

400

Check the configuration. If the context is too long, start a new session or reduce the input.

5xx

The model is temporarily unavailable. Wait a little and try again.

Avoid automatically replaying requests that can execute tools. Check the request history first to prevent duplicate actions or charges.

Choose your model

The live catalog lists model IDs, context windows and support for tools, images and reasoning. Use the exact ID in your CLI and check that your key permits it.

Browse models

Pay for what you use

Prices are in rubles per one million tokens, separately for input, cached input and output. Before a request, an estimated amount is reserved; after completion, actual usage is charged and the rest is released.

Review costs and transactions in your dashboard. Select the model in your CLI configuration.

View pricing