OpenAI Codex
Configure OpenAI Codex to use the Skytells API — route agentic coding requests through any supported model with full usage visibility.
OpenAI Codex is OpenAI's agentic coding tool. You can configure it to use the Skytells API as its model provider, giving you access to any model in the Skytells catalog while keeping request traffic, usage metrics, and spend visible in the Skytells Console.
By pointing Codex at Skytells, you can:
- Route requests through any model supported by Skytells — OpenAI, Anthropic, Google, and more
- Monitor traffic and token consumption in the Skytells Console
- Switch between models without touching your application code
- Use a single API key across all your agentic tools
Configure OpenAI Codex
1. Install OpenAI Codex CLI
Follow the installation instructions on the OpenAI Codex repository to install the Codex CLI tool.
2. Configure your environment variable
Set your Skytells API key in your shell configuration file:
export SKYTELLS_API_KEY="your-skytells-api-key"After adding the variable, reload your shell configuration:
source ~/.zshrc # or source ~/.bashrcNever commit your API key to version control or embed it in client-side code. Store it securely using your shell profile or a secrets manager.
3. Set up the Codex config file
Open ~/.codex/config.toml and add the following configuration:
[model_providers.skytells]
name = "Skytells AI"
base_url = "https://api.skytells.ai/v1"
env_key = "SKYTELLS_API_KEY"
wire_api = "responses"
[profiles.skytells]
model_provider = "skytells"
model = "openai/gpt-5.3-codex"This configuration:
- Registers a model provider named
skytellspointing to the Skytells API - Reads your
SKYTELLS_API_KEYenvironment variable for authentication - Creates a
skytellsprofile that uses this provider - Sets
openai/gpt-5.3-codexas the default model for this profile - Uses
wire_api = "responses"to match the OpenAI Responses API wire format, which Skytells fully supports
4. Run Codex
Start Codex with the skytells profile:
codex --profile skytellsAll requests are routed through the Skytells API. You can monitor usage and request traces from the Skytells Console.
5. (Optional) Use a different model
To switch models, update the model field in your profile:
[profiles.skytells]
model_provider = "skytells"
model = "anthropic/claude-sonnet-4.6"Any model available through the Skytells API can be used here. Refer to the Models reference for the full list.
6. (Optional) Define multiple profiles
You can define several profiles in the same config file and switch between them at runtime:
[model_providers.skytells]
name = "Skytells AI"
base_url = "https://api.skytells.ai/v1"
env_key = "SKYTELLS_API_KEY"
wire_api = "responses"
[profiles.skytells]
model_provider = "skytells"
model = "openai/gpt-5.3-codex"
[profiles.fast]
model_provider = "skytells"
model = "openai/gpt-4o-mini"
[profiles.reasoning]
model_provider = "skytells"
model = "openai/o3"
[profiles.claude]
model_provider = "skytells"
model = "anthropic/claude-sonnet-4.6"
# Or try other models:
# model = "google/gemini-3-flash"
# model = "openai/o3"Switch between profiles using the --profile flag:
codex --profile skytells # default Codex model
codex --profile fast # lightweight, low-latency
codex --profile reasoning # extended reasoning
codex --profile claude # Anthropic ClaudeNotes
When using non-OpenAI models through the Skytells API, Codex may emit warnings about model metadata not being recognized locally. These warnings are safe to ignore — Skytells handles model routing and capability negotiation transparently.
How is this guide?