OpenAI provides developer APIs for GPT models. Codex supports ChatGPT sign-in for subscription access or API key sign-in for usage-based access. Codex cloud requires ChatGPT sign-in.
Best for: direct API access and usage-based billing. Get your API key from the OpenAI dashboard.
coderclaw onboard --auth-choice openai-api-key
# or non-interactive
coderclaw onboard --openai-api-key "$OPENAI_API_KEY"
{
env: { OPENAI_API_KEY: "sk-..." },
agents: { defaults: { model: { primary: "openai/gpt-5.1-codex" } } },
}
Best for: using ChatGPT/Codex subscription access instead of an API key. Codex cloud requires ChatGPT sign-in, while the Codex CLI supports ChatGPT or API key sign-in.
# Run Codex OAuth in the wizard
coderclaw onboard --auth-choice openai-codex
# Or run OAuth directly
coderclaw models auth login --provider openai-codex
{
agents: { defaults: { model: { primary: "openai-codex/gpt-5.3-codex" } } },
}
provider/model (see /concepts/models).