Codex CLI
Run OpenAI Codex CLI against Top Billing models.
Codex CLI talks the OpenAI Responses API, which Top Billing serves at https://api.topbilling.in/v1/responses. The quickest setup:
npx @topbilling/cli --tools codex
Or add this to ~/.codex/config.toml yourself:
model = "<model-id>"
model_provider = "topbilling"
[model_providers.topbilling]
name = "Top Billing"
base_url = "https://api.topbilling.in/v1"
wire_api = "responses"
env_key = "TOPBILLING_API_KEY" # export TOPBILLING_API_KEY=tb_live_...
What to expect
Every Top Billing model that speaks the OpenAI-compatible API works with Codex, billed per request like any other call. Codex sends the whole conversation each turn, so nothing is stored between requests. Hosted tools such as web search are not available through Top Billing; Codex's own shell and file tools work normally.
When your balance runs out, Codex sees
429 insufficient_quota and stops instead of retrying. Top up, then continue the session.