Documentation
One key, two compatible wire protocols, 15 frontier models. Read the quickstart or explore the API reference.
Coding agents · CCSwitch
CCSwitch
CCSwitch is a GUI tool for managing multiple provider configs for Codex and Claude Code. Add Selora as a provider, then run the Selora setup script to fix the config it generates — CCSwitch has known bugs that break Codex.
Create an API key on the API Keys page and export it as $SELORA_API_KEY before continuing.
Add Selora as a provider
Open CCSwitch → Edit Provider. Set the API Request URL to the gateway endpoint and paste your Selora API key. For Codex, select "Responses (native)" as the Upstream Format — the gateway serves /v1/responses.
Provider Name: Selora
API Request URL: https://api.selora.lol/v1
API Key: sk-gw-...
Upstream Format: Responses (native) ← for Codex
Default Model: gpt-6-astraRun the Selora setup script (recommended)
CCSwitch writes an incomplete config.toml (missing the required "name" field) and stores your key in auth.json while the config points at a nonexistent env var. The setup script fixes both in one command — it patches ~/.codex/config.toml with the correct provider block and writes your key to ~/.codex/auth.json. Safe to run multiple times; it only touches the Selora provider block.
# Windows PowerShell
iwr https://selora.lol/selora-setup.mjs -OutFile $env:TEMP\selora-setup.mjs
node $env:TEMP\selora-setup.mjs --key sk-gw-...
# macOS / Linux
curl -fsSL https://selora.lol/selora-setup.mjs -o /tmp/selora-setup.mjs
node /tmp/selora-setup.mjs --key sk-gw-...Use --wire chat to target /v1/chat/completions instead of /v1/responses. Use --dry-run to preview changes without writing. If CCSwitch re-saves the provider later, just run the script again.
Manual fix (if you prefer not to run the script)
Open ~/.codex/config.toml and make sure the [model_providers.selora] block has these exact fields. CCSwitch omits "name" (causing "provider name must not be empty") and adds "env_key" (causing "Missing environment variable: SELORA_API_KEY") — both are wrong.
[model_providers.selora]
name = "Selora"
base_url = "https://api.selora.lol/v1"
wire_api = "responses"
env_key = "SELORA_API_KEY"
requires_openai_auth = falseenv_key tells Codex to read your key from the SELORA_API_KEY environment variable. Set it permanently: on Windows run [System.Environment]::SetEnvironmentVariable("SELORA_API_KEY", "sk-gw-...", "User") in PowerShell; on macOS/Linux add export SELORA_API_KEY="sk-gw-..." to your shell profile. Do NOT use requires_openai_auth = true — that triggers OpenAI OAuth, not API key auth.
Run Codex
Launch Codex — it will pick up the Selora provider and your key from auth.json automatically.
codexThe ChatGPT desktop app ("Work on your computer") shares the same Codex runtime and config, so fixing the config fixes both.