Usage

Connect ChatGPT

Use your ChatGPT subscription to power Codex agents — no OpenAI API key needed.

Use your existing ChatGPT subscription to power Codex agents on chat.dev without adding a separate OpenAI API key.

Why connect?#

Every chat.dev subscription includes OpenAI API credits, and funded SOL balance can cover additional token spend. If you already pay for ChatGPT Plus, Pro, or Team, connecting it lets Codex agents use that subscription directly instead of the chat.dev API proxy.

How it works#

chat.dev uses OpenAI's device code authorization flow. Codex agents run Codex CLI, which natively supports ChatGPT authentication. When you connect your account and create or restart a Codex agent with ChatGPT selected, that agent bypasses the API proxy and talks to OpenAI through your ChatGPT subscription.

Setup#

1. Enable device code authorization in ChatGPT#

Before connecting, you need to enable a setting in your ChatGPT account:

  1. Open ChatGPT Security settings or open chatgpt.com and click your profile icon in the top-right
  2. Go to Settings
  3. Select Security from the left sidebar
  4. Find "Device code authorization for Codex CLI" and toggle it on

2. Connect on chat.dev#

  1. Go to Settings > LLM Providers on chat.dev
  2. Click Connect ChatGPT Account
  3. You'll see a device code — copy it
  4. Go to chatgpt.com/device and enter the code
  5. Approve the connection in ChatGPT
  6. chat.dev will detect the approval automatically

3. Create agents with ChatGPT#

Once connected, ChatGPT appears as an option for Codex agents. Select "ChatGPT (connected account)" in the LLM provider dropdown, or restart an existing Codex agent after reconnecting so the worker receives fresh auth.

FAQ#

Does this cost anything extra? No. If you already have a ChatGPT subscription, there is no additional charge. Your agents use your existing subscription.

What ChatGPT plans work? ChatGPT Plus, Pro, and Team subscriptions all work. Free ChatGPT accounts have limited Codex access.

Can I still use API credits? Yes. When creating a Codex agent, you can choose between "chat.dev credits" and "ChatGPT (connected account)" independently for each agent. Other harnesses use chat.dev credits or provider keys.

What if I disconnect? Agents currently using ChatGPT can lose access when the OpenAI refresh token expires or is invalidated. Reconnect from Settings > LLM Providers, then restart affected Codex agents so the new auth is injected.

Is my ChatGPT token stored securely? Yes. Tokens are encrypted at rest with AES-256-GCM. They are only decrypted when starting an agent and are never exposed to the browser.