OpenAI Codex logo
Coding agents

Use TokenBazaar with OpenAI Codex

Use Codex CLI or its editor extension through a TokenBazaar custom provider.

Before you start

  • Codex CLI or the Codex editor extension
  • A TokenBazaar API key saved as TOKENBAZAR_API_KEY

Step-by-step setup

  1. 1

    Install Codex with npm install -g @openai/codex.

  2. 2

    Save your TokenBazaar key in the TOKENBAZAR_API_KEY environment variable.

  3. 3

    Open ~/.codex/config.toml and add the configuration below.

  4. 4

    Keep wire_api set to responses and use the exact provider name tokenbaazar in both places.

  5. 5

    Open your project folder and run codex, or select the same provider in the Codex editor extension.

Configuration

toml
# ~/.codex/config.toml
model = "openai/gpt-6-astra"
model_provider = "tokenbaazar"

[model_providers.tokenbaazar]
name = "TokenBazaar"
base_url = "https://tokenbazaar.in/api/public/v1"
env_key = "TOKENBAZAR_API_KEY"
wire_api = "responses"

Verify the connection

Ask Codex a simple repository question and confirm the GPT model request appears in your Dashboard.