Skip to content

Codex and Claude Code

Configure Codex for the CHUA ONE Responses endpoint and Claude Code for the CHUA ONE Messages endpoint without storing a project key in source control.

Codex

With a Codex CLI that supports profile files, save this as ~/.codex/chua-one.config.toml. Set CHUA_API_KEY in your shell or secret manager, then run codex -p chua-one.

model = "gpt-5.4"
model_provider = "chua_one"
model_reasoning_effort = "none"
web_search = "disabled"

[features]
apps = false
plugins = false
multi_agent = false
multi_agent_v2 = false

[model_providers.chua_one]
name = "CHUA ONE"
base_url = "https://chuaone.si/v1"
env_key = "CHUA_API_KEY"
wire_api = "responses"
requires_openai_auth = false
supports_websockets = false
request_max_retries = 0
stream_max_retries = 0

base_url includes /v1 because Codex appends /responses. wire_api selects the Responses request and event format. WebSockets are disabled because CHUA ONE publishes this route over HTTP and SSE.

The dedicated profile uses HTTP streaming and the basic function tools accepted by this model route. Keep reasoning effort at none, and use this profile with app, plugin, and multi-agent tools disabled to avoid unsupported tool payloads.

If you see TOOL_TYPE_UNSUPPORTED, check which extra MCP tools the session loads, then remove incompatible tools from the session. This profile sets automatic retries to zero. After an interruption, check the original request before trying again.

Windows PowerShell

$env:CHUA_API_KEY = 'YOUR_CHUA_ONE_PROJECT_KEY'
codex -p chua-one

Use only a model returned by GET /v1/models for the same key and verify it supports the tools your Codex session needs.

Claude Code

CHUA ONE publishes Claude models through POST /v1/messages. For a one-session setup, export the values before starting Claude Code:

export CHUA_API_KEY='YOUR_CHUA_ONE_PROJECT_KEY'
export ANTHROPIC_BASE_URL='https://chuaone.si'
export ANTHROPIC_API_KEY="$CHUA_API_KEY"
export ANTHROPIC_MODEL='claude-haiku-5.5'
claude

Windows PowerShell

$env:CHUA_API_KEY = 'YOUR_CHUA_ONE_PROJECT_KEY'
$env:ANTHROPIC_BASE_URL = 'https://chuaone.si'
$env:ANTHROPIC_API_KEY = $env:CHUA_API_KEY
$env:ANTHROPIC_MODEL = 'claude-haiku-5.5'
claude

ANTHROPIC_BASE_URL is the site origin without /v1 because Claude Code appends /v1/messages. ANTHROPIC_API_KEY sends x-api-key, which CHUA ONE accepts together with anthropic-version.

You may keep the non-secret values in .claude/settings.local.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://chuaone.si",
    "ANTHROPIC_MODEL": "claude-haiku-5.5"
  }
}

Keep ANTHROPIC_API_KEY outside the file. Use a published Claude slug such as claude-haiku-5.5. Anthropic does not support routing Claude Code to non-Claude models through a gateway, and CHUA ONE does not promise that configuration.

Preflight

  1. Confirm the key can see the exact model with GET /v1/models. This list request does not run a paid generation.
  2. Confirm the model supports tools and streaming before using an agent loop. Check the capability matrix.
  3. Set a project budget and request limits, then begin with a small task. Coding tools can issue multiple billable requests from one instruction.

Related guides

Authentication · Chat Completions · Responses · Messages · Errors and retries