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

# OpenAI

> Sign in to use OpenAI models via the codex provider.

goldengoose uses OpenAI through the `codex` provider.

Most of the time, authentication is automatic: if you already have working Codex credentials on this machine, gg will reuse them. When you don’t, gg also has a built-in “sign in” flow so you’re not stuck bouncing between tools.

## Sign in options

* **Reuse existing Codex credentials (default)**\
  If you’ve used the Codex CLI in your terminal, gg will read the same credentials file. As a rule of thumb: if Codex works in your terminal, gg can usually use the same login.

* **Sign in with ChatGPT (in-app)**\
  In **Preferences → OpenAI**, click **Sign in with ChatGPT**. This opens a browser OAuth flow and connects your ChatGPT account. If you already pay for ChatGPT and your plan includes access to the models you want, this is often the quickest path to “working.”

* **API key (in-app)**\
  In **Preferences → OpenAI**, switch the method to **API Key** and paste your key.

## Usage and limits (5-hour + weekly)

Once you’re signed in, gg also shows **real-time usage** for OpenAI rate limits inside **Preferences → OpenAI**:

* a **5-hour window**
* a **weekly window**

These two numbers answer the practical question you actually have during a long coding session: “am I out of quota, or am I just waiting for a reset?”

## Troubleshooting + advanced

* If gg says you’re not signed in but your terminal is, use **Refresh** in Preferences → OpenAI.
* If you keep multiple OpenAI accounts, remember that CLI auth is tied to your OS user and config directory; ChatGPT OAuth and API-key auth are explicit and are usually easier to reason about.
* If your Codex CLI uses a non-default config location, set `CODEX_HOME` before launching goldengoose so it can find your existing login.
