Inferway
Back to client guides
Client guides

Codex

Prepare a Codex custom-provider configuration for Inferway.

Not available yet

Codex needs the Responses API, which Inferway does not currently provide. Use Pi or Hermes to connect now.

Use the existing API

Configuration reference for when the interface opens

Before you start

Install the named client using its official instructions. Pi here means the pi-mono coding agent; Hermes means Nous Research's Hermes Agent.

Once your Inferway account is activated, create a key under Console → API Keys. Use a dedicated key for this client; a project's monthly budget caps what it can spend. Both live and test prefixes use the same inference and billing path; test is an environment label, not a free or simulated inference mode.

Use an Inferway key for Inferway's endpoint. An OpenRouter key belongs to OpenRouter and cannot authenticate to this address.

Keep the key in the client's credential store or your local environment. Do not paste it into a prompt, screenshot, or committed configuration. These examples use bash/zsh on macOS or Linux.

Make the key available to this terminal

The prompt below hides your input and keeps the key out of shell history. Start the client from this same terminal; a separately opened app may not inherit this variable.

INFERWAY_API_KEYbash
printf 'Inferway API key: '
IFS= read -r -s INFERWAY_API_KEY
printf '\n'
export INFERWAY_API_KEY

Save the custom-provider template

Merge this into your user-level ~/.codex/config.toml, preserving other settings. Place model and model_provider at the top level before any table header; update existing keys instead of duplicating them. This selects Inferway as your default provider. Do not put provider settings in a repository's .codex/config.toml.

base_url ends in /v1 once. env_key is the environment variable name without a dollar sign. Current Codex supports only wire_api = "responses"; changing it to chat does not enable Chat Completions.

~/.codex/config.tomltoml
model = "inferway/mimo-v2.6-flash"
model_provider = "inferway"

[model_providers.inferway]
name = "Inferway"
base_url = "https://api.inferway.ai/v1"
env_key = "INFERWAY_API_KEY"
wire_api = "responses"
requires_openai_auth = false

Launch Codex CLI

Start from the terminal containing INFERWAY_API_KEY. The custom provider uses your Inferway credential; it does not require an OpenAI login. This command starts the CLI; separately launched desktop apps may not inherit the variable.

Codex CLIbash
codex

Verify after Responses is available

Once Inferway supports Responses, confirm the provider and model in /status, then test a short reply and one read-only tool.