relay.fast
Codex setup

Use a compatible API in Codex-style developer tools

Point a client that supports a custom OpenAI-compatible endpoint at relay.fast, then validate the model, responses format, streaming, and tool permissions used by your version.

Start with relay.fast Read the API docs Русская версия

Core settings

Test before automation

Start with read-only or sandboxed tasks. Check diff quality, tool-call behavior, token usage, and failure recovery before allowing writes, shell commands, or unattended CI actions.

Configuration example

Add a provider to ~/.codex/config.toml:

model = "gpt-6.1-sol"
model_provider = "relayfast"

[model_providers.relayfast]
name = "relay.fast"
base_url = "https://relay.fast/v1"
env_key = "RELAY_FAST_API_KEY"
wire_api = "responses"
requires_openai_auth = false

Keep the key in the environment variable the provider names:

# macOS and Linux
export RELAY_FAST_API_KEY=sk-your-api-key

# Windows (PowerShell), then open a new terminal
setx RELAY_FAST_API_KEY sk-your-api-key

A profile selected with codex --profile can override the provider, so check it after a restart.

One-command setup

The script configures Codex for relay.fast. It adds the provider, stores the key in the RELAY_FAST_API_KEY variable and checks that requests reach relay.fast. It asks for the API key inside the script, so the key never appears in the command or shell history. Every downloaded file is checked against a published SHA-256 checksum, and running it again can restore the previous settings.

Windows (PowerShell):

powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://relay.fast/downloads/setup/install-codex-en.ps1 | iex"

macOS and Linux:

curl -fsSL https://relay.fast/downloads/setup/install-codex-en.sh | bash

You can read the script before running it by opening the same URL in a browser.

Current prices of models for coding agents

Prices checked from the live catalog. "From" is the lowest price among the relay.fast sources that currently serve the model. The price you pay depends on the source your request uses and can change on any day. The pricing page always shows current values.

ModelModel IDOfficial input / output per 1M tokensrelay.fast from, input / outputCache read fromContext
Claude Sonnet 5.5claude-sonnet-5-5$2 / $10$0.238 / $1.19 (−88%)$0.02381M
Claude Opus 5.5claude-opus-5-5$4 / $20$0.111 / $0.556 (−97%)$0.005561M
GPT-6.1 Sol
requests above 272K input tokens cost more
gpt-6.1-sol$2 / $10$0.03 / $0.15 (−98%)$0.00151.05M
GLM-5.3glm-5.3$1.4 / $4.4$0.035 / $0.11 (−97%)$0.00651M
Kimi K3kimi-k3$3 / $15$0.15 / $0.75 (−95%)$0.0151.05M
DeepSeek V4.1 Flash
price depends on the time of day; the peak-hours price is shown
deepseek-v4.1-flash$0.3 / $1.2$0.03 / $0.12 (−90%)$0.00061M

Frequently asked questions

Is Codex the same as the OpenAI API?

Codex-style clients and the OpenAI API are related but client capabilities differ. Follow the client version's endpoint and responses requirements.

Can I use the chat completions endpoint?

Use the endpoint supported by your client. relay.fast documents both compatible request families where enabled; verify the current model catalog.

How should CI keys be handled?

Use a dedicated least-privilege key in the CI secret store, never in repository files or logs.