> ## Documentation Index
> Fetch the complete documentation index at: https://docs.equa.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Openai

# OpenAI

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, while
the Codex CLI supports either sign-in method. The Codex CLI caches login details in
`~/.codex/auth.json` (or your OS credential store), which Equabot can reuse.

## Option A: OpenAI API key (OpenAI Platform)

**Best for:** direct API access and usage-based billing.
Get your API key from the OpenAI dashboard.

### CLI setup

```bash theme={null}
equabot onboard --auth-choice openai-api-key
# or non-interactive
equabot onboard --openai-api-key "$OPENAI_API_KEY"
```

### Config snippet

```json5 theme={null}
{
  env: { OPENAI_API_KEY: "sk-..." },
  agents: { defaults: { model: { primary: "openai/gpt-5.2" } } }
}
```

## Option B: OpenAI Code (Codex) subscription

**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.

Equabot can reuse your **Codex CLI** login (`~/.codex/auth.json`) or run the OAuth flow.

### CLI setup

```bash theme={null}
# Reuse existing Codex CLI login
equabot onboard --auth-choice codex-cli

# Or run Codex OAuth in the wizard
equabot onboard --auth-choice openai-codex
```

### Config snippet

```json5 theme={null}
{
  agents: { defaults: { model: { primary: "openai-codex/gpt-5.2" } } }
}
```

## Notes

* Model refs always use `provider/model` (see [/concepts/models](/concepts/models)).
* Auth details + reuse rules are in [/concepts/oauth](/concepts/oauth).
