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

# Troubleshooting

> Fix common Floodgate agent and API configuration problems.

## 401 Unauthorized

* Confirm the API key is active in your Floodgate dashboard.
* Make sure the key has no extra spaces or quotation marks.
* Use `Authorization: Bearer YOUR_API_KEY`.
* Open a new terminal if you configured environment variables in shell profile files (`~/.bashrc`, `~/.zshrc`).

## 404 Not Found

Check how your client handles the base URL path:

* Codex, OpenCode, Pi, Grok Build, Aider, and OpenAI SDKs use `https://api.floodgate.dev/v1`.
* Claude Code uses `https://api.floodgate.dev` because it appends `/v1/messages` automatically.

## Model not found

Use the exact model ID:

```text theme={null}
gpt-6-sol
claude-opus-5-5
deepseek-v4.1-flash
grok-4.7
```

Confirm which models are enabled for your key:

```bash theme={null}
curl "https://api.floodgate.dev/v1/models" \
  -H "Authorization: Bearer $FLOODGATE_API_KEY"
```

## The CLI still uses its original provider

* **Codex**: run `/status` and confirm `model_provider` is `floodgate`.
* **Claude Code**: run `/status` and confirm the Anthropic base URL points to `https://api.floodgate.dev`.
* **OpenCode**: run `/models` and select a model under **Floodgate**.
* **Pi**: run `/model` and select a model under **floodgate**.
* **Grok Build**: run `grok inspect` and check `~/.grok/config.toml`.
* **Aider**: confirm both `OPENAI_API_BASE` and `OPENAI_API_KEY` are exported.

## Tool calls fail

Try the recommended frontier model for your agent harness:

| Harness | Recommended model |
| :- | :- |
| Codex | `gpt-6-sol` |
| Claude Code | `claude-opus-5-5` |
| Grok Build | `grok-4.7` |
| OpenCode, Pi, Aider | `gpt-6-sol` or `claude-opus-5-5` |

Different models can vary in tool-calling schema strictness and reasoning behavior.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.