Tool setup guides

Codex CLI Integration

Configure Codex CLI with a Halfbill provider, connect your API key, and verify file edits and test execution.

Codex CLI can connect to Halfbill through a custom provider using the Responses API.

Install

pnpm add -g @openai/codex
codex --version

Configure Halfbill

Create a key in your dashboard and export it in the terminal where you launch Codex:

export HALFBILL_API_KEY="your_api_key"

Merge these settings into ~/.codex/config.toml:

model = "gpt-5.5"
model_provider = "halfbill"
model_reasoning_effort = "low"
web_search = "disabled"

[model_providers.halfbill]
name = "Halfbill"
base_url = "https://api.halfbill.uk/v1"
env_key = "HALFBILL_API_KEY"
wire_api = "responses"

The named provider reads your Halfbill key from the environment. You can keep your existing ChatGPT login. Current Codex versions use responses; changing an environment variable cannot switch them to Chat Completions.

Web search is disabled because Halfbill does not provide native web search through the API.

Start coding

cd your-project
codex

For a scripted task:

codex exec --sandbox workspace-write "Fix the failing test and run it again"

Verify the connection

Open a small project and ask the agent to read a file, make a change, and run its tests. Review the diff and test output, then check the request in your Halfbill dashboard. Choose other models from the catalogue.

Troubleshooting

  • Authentication fails: check that model_provider matches the provider table and that HALFBILL_API_KEY is exported in the same shell.
  • Native web search is unsupported: set web_search = "disabled", then start a new session.
  • Model metadata or catalogue refresh warning: some Codex versions warn about missing metadata or the model-list response format. Use an explicit model ID and verify the actual request result.
  • Wrong endpoint: the provider's base_url must end in /v1.

See OpenAI's custom-provider configuration for configuration profiles and other options.

How is this guide?

On this page