A real API key
Create a key under API keys in the workspace. Open Configure your client and reveal that key. Demo keys cannot make real model requests.
Teapot Router / GETTING STARTED
No extra configuration app is required. Prepare a key, enter the right endpoint, make one request, and verify it in your workspace.
Open workspaceCreate a key under API keys in the workspace. Open Configure your client and reveal that key. Demo keys cannot make real model requests.
Use the address shown in the setup dialog. Claude Code uses the gateway root without /v1; OpenAI-compatible clients use a Base URL ending in /v1. Your website URL is not the API endpoint.
When signed in, copy a model ID from the available list below and check your account balance. If the list is empty, ask an administrator to enable a channel. A price listing alone does not prove a channel is ready.
Loaded from the gateway connected to this Teapot Router account. Copy the one for your client; your API key stays in the workspace.
Sign in to a connected workspace to see your actual API addresses. Do not use an example URL.
Treat your API key as a password. Never put it in a chat, screenshot, document, or public repository. Paste it only into a client you trust.
Open a separate bash, zsh, or Windows PowerShell terminal and use the generated Codex CLI command through Teapot Router. First confirm an enabled Responses channel, model, and account balance.
Do not paste the command into Codex Settings. Run it in a new terminal: only that new CLI process uses Teapot Router. It does not edit ~/.codex/config.toml, replace your sign-in, or switch an existing Codex conversation. You can keep choosing Teapot Router per session; only an intentional global default change affects plain codex launches.
Choose an existing key and model to prepare a command for this test.
The system only changes command syntax. Override it when copying the command to another computer.
Install a separate Teapot Router profile. Launch it later with its own command; your Codex default stays as it is.
(
printf 'OpenAI Base URL (ends in /v1): '
IFS= read -r RELAY_BASE
printf 'Responses model ID: '
IFS= read -r RELAY_MODEL
printf 'Teapot Router API Key: '
IFS= read -r -s RELAY_KEY_FOR_CODEX
printf '\n'
export RELAY_KEY_FOR_CODEX
codex -m "$RELAY_MODEL" \
-c 'model_provider="relay"' \
-c "model_providers.relay={name=\"Teapot Router\",base_url=\"$RELAY_BASE\",env_key=\"RELAY_KEY_FOR_CODEX\",wire_api=\"responses\",requires_openai_auth=false}"
)One-session mode only affects the current terminal. Persistent mode creates a separate Teapot Router profile and leaves your existing Codex settings untouched; Windows stores the key with the current user's DPAPI and macOS/Linux use the system keychain or a separate profile. The complete copied command may remain in your clipboard and shell history; use a private terminal and clear them after testing. For 401, check the key; for model/channel errors, check NEW-API channels.
Test credit and paymentsUse this path for Claude Code in a terminal. The commands below affect only your current terminal session and do not overwrite your existing client settings.
export ANTHROPIC_BASE_URL="<TEAPOT_API_BASE_URL>"
printf 'Teapot Router API Key: '
read -rs ANTHROPIC_AUTH_TOKEN
printf '
'
export ANTHROPIC_AUTH_TOKEN
export ANTHROPIC_MODEL="<CLAUDE_MODEL_ID>"
export ANTHROPIC_DEFAULT_SONNET_MODEL="$ANTHROPIC_MODEL"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="$ANTHROPIC_MODEL"
export ANTHROPIC_DEFAULT_OPUS_MODEL="$ANTHROPIC_MODEL"
claude$env:ANTHROPIC_BASE_URL = "<TEAPOT_API_BASE_URL>"
$secret = Read-Host "Teapot Router API Key" -AsSecureString
$env:ANTHROPIC_AUTH_TOKEN = [System.Net.NetworkCredential]::new("", $secret).Password
$env:ANTHROPIC_MODEL = "<CLAUDE_MODEL_ID>"
$env:ANTHROPIC_DEFAULT_SONNET_MODEL = $env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL = $env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_OPUS_MODEL = $env:ANTHROPIC_MODEL
claudeThese variables last only for this terminal session. For a persistent setup, use a configuration method supported by Claude Code and back up any existing settings before editing them.
Use this path for a chat app with a custom OpenAI provider or an application using the OpenAI SDK. Menu names vary, but the three values are the same.
| Client field | What to enter |
|---|---|
| Base URL / API URL | The Teapot Router gateway root plus /v1. Copy it from the setup dialog. |
| API Key | The real key you created and revealed in Teapot Router. |
| Model | The complete model ID available to this key, preserving its spelling and punctuation. |
If you do not have a graphical client, install the openai Python package and run this script. It prompts for your endpoint, key, and model without putting the key into source code.
# First run: python3 -m pip install openai
from getpass import getpass
from openai import OpenAI
base_url = input("Teapot Router Base URL (ends in /v1): ").strip()
model = input("Model ID: ").strip()
client = OpenAI(base_url=base_url, api_key=getpass("Teapot Router API Key: "))
result = client.chat.completions.create(
model=model,
messages=[{"role": "user", "content": "Reply with OK."}],
)
print(result.choices[0].message.content)Copying values or clicking “I've configured my client” does not prove a client request succeeded. Verify one real request.
Use a real key from this account and check that it is enabled and unexpired. Make sure the API URL is not the website URL.
The model must be enabled and available to the key's group. Ask your administrator to check the upstream channel. Adding balance cannot fix a missing channel.
Check account balance under Billing. If the key has its own cap, check its remaining quota too.
Refresh Usage and the overview. Confirm you used the same account; first-call progress follows account request records.
Still stuck? Share your client name, the error text, and the time with support. Never send your full API key.