> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/Soju06/codex-lb/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get Codex-LB running and make your first proxied request in under 2 minutes

## Get started in 3 steps

This guide will get you from zero to making your first proxied ChatGPT request through Codex-LB.

<Steps>
  <Step title="Run Codex-LB with Docker">
    The fastest way to get started is with Docker. Run these commands to launch Codex-LB:

    ```bash theme={null}
    # Create a volume for persistent data
    docker volume create codex-lb-data

    # Run Codex-LB
    docker run -d --name codex-lb \
      -p 2455:2455 -p 1455:1455 \
      -v codex-lb-data:/var/lib/codex-lb \
      ghcr.io/soju06/codex-lb:latest
    ```

    <Info>
      **Ports:**

      * `2455` — Main API and dashboard
      * `1455` — OAuth callback endpoint (required for account linking)
    </Info>

    Verify it's running:

    ```bash theme={null}
    curl http://localhost:2455/health
    ```

    You should see:

    ```json theme={null}
    {"status":"ok"}
    ```
  </Step>

  <Step title="Add a ChatGPT account">
    Open the dashboard and add your first account:

    1. Navigate to [http://localhost:2455](http://localhost:2455)
    2. Click **Accounts** in the sidebar
    3. Click **Add Account**
    4. Complete the OAuth flow to link your ChatGPT account

    <Tip>
      You'll be redirected to OpenAI for authentication. After signing in, you'll be redirected back to the dashboard.
    </Tip>

    Once added, your account will appear in the accounts list with its current status and usage stats.
  </Step>

  <Step title="Make your first request">
    Now test the proxy with a simple request:

    ```bash theme={null}
    curl http://localhost:2455/v1/chat/completions \
      -H "Content-Type: application/json" \
      -d '{
        "model": "gpt-5.3-codex",
        "messages": [
          {"role": "user", "content": "Say hello!"}
        ]
      }'
    ```

    <Note>
      API key authentication is **disabled by default**. To enable it, go to **Settings → API Key Auth** in the dashboard.
    </Note>

    You should receive a response from ChatGPT proxied through Codex-LB. Check the **Request Logs** page in the dashboard to see your request details.
  </Step>
</Steps>

## What just happened?

You've successfully:

* ✅ Deployed Codex-LB with Docker
* ✅ Linked a ChatGPT account via OAuth
* ✅ Proxied a request through Codex-LB
* ✅ Tracked usage in the dashboard

## Next steps

<CardGroup cols={2}>
  <Card title="Configure a client" icon="plug" href="/clients/overview">
    Set up Codex CLI, OpenCode, or another OpenAI-compatible client
  </Card>

  <Card title="Create API keys" icon="key" href="/guides/managing-api-keys">
    Enable authentication and create API keys with rate limits
  </Card>

  <Card title="Add more accounts" icon="users" href="/guides/adding-accounts">
    Pool multiple ChatGPT accounts for higher capacity
  </Card>

  <Card title="Advanced installation" icon="gear" href="/installation">
    Explore uvx, local development, and production deployment options
  </Card>
</CardGroup>

## Try with the OpenAI SDK

If you have the OpenAI Python SDK installed, you can test Codex-LB immediately:

```python theme={null}
from openai import OpenAI

client = OpenAI(
    base_url="http://127.0.0.1:2455/v1",
    api_key="any-string-works",  # auth disabled by default
)

response = client.chat.completions.create(
    model="gpt-5.3-codex",
    messages=[{"role": "user", "content": "Hello!"}],
)

print(response.choices[0].message.content)
```

<Tip>
  Replace `"any-string-works"` with a real API key from the dashboard if you enable API key authentication.
</Tip>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Port already in use">
    If port 2455 or 1455 is already taken, map to different ports:

    ```bash theme={null}
    docker run -d --name codex-lb \
      -p 3000:2455 -p 2000:1455 \
      -v codex-lb-data:/var/lib/codex-lb \
      ghcr.io/soju06/codex-lb:latest
    ```

    <Warning>
      Port 1455 is used for OAuth callbacks. If you change it, you must update `CODEX_LB_OAUTH_CALLBACK_PORT` in your environment variables.
    </Warning>
  </Accordion>

  <Accordion title="Account link failed">
    If OAuth fails:

    1. Verify port 1455 is accessible
    2. Check that your firewall allows connections to localhost:1455
    3. Try accessing [http://localhost:1455/auth/callback](http://localhost:1455/auth/callback) directly (should return 404 if reachable)
  </Accordion>

  <Accordion title="No models available">
    Models are fetched from your linked ChatGPT accounts. If no models appear:

    1. Ensure at least one account is successfully linked
    2. Wait a moment for the model sync to complete
    3. Check the account status in the dashboard
  </Accordion>
</AccordionGroup>

<Card title="Need more help?" icon="question" href="/guides/troubleshooting">
  Visit our full troubleshooting guide for common issues and solutions
</Card>
