Workspace

Teapot Router / GETTING STARTED

Connect Teapot Router to your client

No extra configuration app is required. Prepare a key, enter the right endpoint, make one request, and verify it in your workspace.

Open workspace
01 / Before you start

Get these three things ready

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.

The right API endpoint

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.

An available model and balance

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.

Your current API addresses

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.

02 / Codex CLI

Codex CLI: make your first request

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.

Will this affect my current Codex session?

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.

  1. Sign in to a real Teapot Router account and prepare a usable API key. Demo keys cannot call a model.
  2. Ask an administrator for a small test credit, either through an enabled redemption code or an admin quota adjustment. Confirm the increased balance under Billing.
  3. Ask the administrator to enable a real Responses-compatible upstream channel and model. A balance alone cannot make an unavailable channel work.
  4. Choose your operating system, an existing key, a model, and either persistent or one-session mode. Copy the generated command and paste it into a matching bash/zsh or Windows PowerShell terminal, not Codex Settings. The preview hides the key; the copied command includes it.
  5. Ask the new Codex CLI to reply OK, then check the request under Usage. Exit this test CLI when done; your original session remains available.

Build your Codex test command

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.

Loading…

Alternative: enter URL, model, and key manually
(
  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 payments
03 / Claude Code

Claude Code

Use 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.

  1. If Claude Code is not installed, install it using its official instructions and confirm that the claude command starts.
  2. In the Teapot Router workspace, open Configure your client → Claude Code. Copy the gateway root URL, reveal your key, and copy a Claude model ID from Before you start on this page.
  3. Open a terminal. Replace <TEAPOT_API_BASE_URL> and <CLAUDE_MODEL_ID> below with your actual values. Run the commands, then paste the key when prompted and press Enter. The key will not appear as you type.
  4. Send a short message such as “Reply with OK” in Claude Code. Then check the corresponding request under Usage in Teapot Router.

macOS / Linux (bash, zsh)

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

Windows PowerShell

$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
claude

These 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.

04 / OpenAI-compatible client

OpenAI-compatible client

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.

  1. Open your client's provider or API settings. Choose OpenAI compatible, Custom OpenAI, or a custom endpoint.
  2. Set Base URL to the address under OpenAI-compatible in Teapot Router's setup dialog; it must end in /v1. Set API Key to the real key you revealed.
  3. Enter the full model ID enabled for your key. Save, send a short message, and verify the request under Usage in Teapot Router.
Client fieldWhat to enter
Base URL / API URLThe Teapot Router gateway root plus /v1. Copy it from the setup dialog.
API KeyThe real key you created and revealed in Teapot Router.
ModelThe complete model ID available to this key, preserving its spelling and punctuation.
For developers: a minimal Python test

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)
05 / Verify the connection

Verify the connection

Copying values or clicking “I've configured my client” does not prove a client request succeeded. Verify one real request.

  1. Your client shows a model reply, not just a “settings saved” message.
  2. Under Usage in Teapot Router, find the request with the matching time, model, and key.
  3. Click Check request on the workspace overview. If this was the account's first request, the third step updates. Refresh and check the account if it does not.
Verify the connection
06 / Troubleshooting

Troubleshooting

401 / invalid key

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.

Model not found / no channel

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.

Insufficient balance or key quota

Check account balance under Billing. If the key has its own cap, check its remaining quota too.

The client replied but onboarding did not update

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.