Codex

Codex

Codex can connect to bus4ai through OpenAI-compatible settings, so development-time model calls can share one Base URL and API Key.

Prerequisites

Create a dedicated Codex API Key in the bus4ai Console (opens in a new tab).

Environment Variables

PowerShell:

$env:OPENAI_API_KEY="your bus4ai API Key"
$env:OPENAI_BASE_URL="https://bus4ai.com/v1"

Bash or Zsh:

export OPENAI_API_KEY="your bus4ai API Key"
export OPENAI_BASE_URL="https://bus4ai.com/v1"

If your Codex client automatically appends /v1, set the Base URL to:

https://bus4ai.com

Verify

Start Codex and run a simple prompt, such as asking it to explain your project structure. Then check the bus4ai console for the corresponding usage record.

Troubleshooting

  • 401 or authentication error: check whether the API Key was copied fully
  • 404 or endpoint error: check whether /v1 was duplicated
  • No usage record: confirm the client is reading environment variables from the current terminal