UpgradeMajor upgrade underway: a new video studio, with more models coming soon. Stay tuned.
Inferway
Back to client guides
Client guides

Codex

Connect Codex to Inferway with a custom-provider configuration.

Available

Codex uses the Responses API, which Inferway serves at /v1/responses. Add the custom provider below, then start Codex from a terminal that has your API key.

Current Inferway catalog

Context window1,048,576
Sample max tokens131,000

No verification record exists for z-ai/glm-5.3-flash in this client; the configuration below is a reference.

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. model_context_window tells Codex this model's context size, because Codex has no built-in metadata for it.

~/.codex/config.tomltoml
model = "z-ai/glm-5.3-flash"
model_provider = "inferway"
model_context_window = 1048576

[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 the connection

Run the one-line check below from the same terminal. A reply of ok confirms the provider, the key and the model id.

Codex prints "Model metadata for ... not found" for model ids it does not know. This is expected and the request still completes.

Codex CLIbash
codex exec --skip-git-repo-check "Reply with exactly: ok"

Verification status

There is no verification record for this model in this client: the recipe below is a configuration reference, not a tested integration for that model.