Codex CLI
Use the CC Switch import when possible. For a manual setup, create a separate provider that uses the Responses wire protocol.
Set the key
bash
# The variable name must match env_key in the TOML configuration.
export SPRELAY_API_KEY="sk-your-key"powershell
# Codex started from this PowerShell can read the value.
$env:SPRELAY_API_KEY = "sk-your-key"Add the provider
toml
# Use an exact model ID that supports Responses in the selected group.
model = "gpt-5.6-sol"
# This name points to the provider section below.
model_provider = "sprelay"
[model_providers.sprelay]
# Human-readable label used in logs and UI.
name = "Sprelay API"
# Codex appends /responses, so stop the base URL at /v1.
base_url = "https://sprelaytoken.com/v1"
# Read the secret from the environment instead of storing it in this file.
env_key = "SPRELAY_API_KEY"
# Codex uses the Responses protocol for this provider.
wire_api = "responses"First verify the Responses request, then launch Codex, confirm that sprelay is selected, and run a small read-only task. A 404 usually means the base URL contains /responses or /v1 twice.
