Docs

Codex CLI

Use the OpenAI Codex CLI with Odin v1 over the Responses API.

The Codex CLI uses the Responses API, which InterOdin serves at https://api.interodin.com/v1/responses.

1. Export your key

Keep the key out of config.toml; env_key names the environment variable Codex reads it from. Export it in your shell:

export INTERODIN_API_KEY="io-sk-your-key"

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

model = "odin-v1"
model_provider = "interodin"
model_context_window = 1000000

[model_providers.interodin]
name = "InterOdin"
base_url = "https://api.interodin.com/v1"
wire_api = "responses"
env_key = "INTERODIN_API_KEY"

env_key is the name of the environment variable, not the key itself.

model_context_window tells Codex how large Odin v1's context is, so it knows when to compact the conversation. Use the context size on the Odin v1 page.

3. Run it

codex

For scripts and CI, use codex exec "your task".

Keep OpenAI as your default

To switch providers per run instead, put the settings in a profile in the same ~/.codex/config.toml:

[model_providers.interodin]
name = "InterOdin"
base_url = "https://api.interodin.com/v1"
wire_api = "responses"
env_key = "INTERODIN_API_KEY"

[profiles.odin]
model = "odin-v1"
model_provider = "interodin"
model_context_window = 1000000
codex --profile odin

Good to know

  • Stateless. InterOdin never stores responses, so Codex sends the full conversation with every request. This is automatic and needs no setting. Requests that depend on previous_response_id fail with 400 unsupported_parameter. Prompt caching keeps the repeated history cheap.
  • Hosted tools. Web search works and is billed per search on top of the tokens (see Web search). Other hosted tools are removed from the request without an error, so they never run. Function and custom tools pass through. Codex's local tools (shell, file edits, patches) are expected to work, but this hasn't been confirmed against a real Codex run yet.
  • Reasoning effort. Codex's reasoning effort setting only switches reasoning on or off. none turns it off on Odin Flash. On Odin v1 it has no effect, and low, medium and high behave the same on both models. See Reasoning control.
  • Images and documents. Odin v1 is text-only. An image in the newest message fails with 400 image_input_not_supported, and a file input fails with 400 unsupported_content. Images and files that came from tool output or earlier turns are replaced by a text note.
  • Where settings live. Define model_provider, model_providers, profile and profiles in your user config, ~/.codex/config.toml. A project-local .codex/config.toml ignores them. CLI flags such as --profile override the user config. If Codex ignores the provider, check that it is defined in ~/.codex/config.toml and that a flag or profile you passed isn't selecting another provider.

On this page