# AI API error fixes

> Fixes for common AI API errors in Claude Code, SillyTavern, Janitor AI, OpenCode and Gemini CLI: 429, 401, 404, bad request and context length.

These pages fix the errors people hit most when they connect an app to an AI API: rate limits (429), invalid keys (401), wrong model IDs or paths (404), bad requests and context length. Each one gives the likely cause, the fix in order and a copy-paste config for Outrun's base URLs, https://api.outrun.to/v1 and https://api.outrun.to.

## Which error do you see?

Pick the message closest to yours.

- [Claude Code 429 Too Many Requests](https://outrun.to/fix/claude-code-429-too-many-requests)
- [Anthropic base URL not working](https://outrun.to/fix/anthropic-base-url-not-working)
- [SillyTavern: API returned an error (Bad Request)](https://outrun.to/fix/sillytavern-api-returned-an-error-bad-request)
- [Janitor AI API not ready](https://outrun.to/fix/janitor-ai-api-not-ready)
- [Where is opencode.json?](https://outrun.to/fix/opencode-json-location)
- [Gemini base URL](https://outrun.to/fix/gemini-base-url)
- [401 Invalid API key in an OpenAI-compatible app](https://outrun.to/fix/openai-compatible-401-invalid-api-key)
- [Model not found (404)](https://outrun.to/fix/model-not-found-404)
- [Context length exceeded](https://outrun.to/fix/context-length-exceeded)
- [Claude Code usage limit reached](https://outrun.to/fix/claude-code-usage-limit-reached)

## Error fix questions

### Where is the full list of Outrun error codes?

The troubleshooting page in the docs lists every error, its likely cause and the fix.

### Which base URL do I use?

https://api.outrun.to/v1 for OpenAI-compatible apps, https://api.outrun.to for Claude Code and Anthropic SDKs, and https://api.outrun.to/v1/gemini-cli for Gemini CLI.

### Should I retry a failed paid request?

Check Activity first. If the request was interrupted or its outcome is unclear, don't repeat it automatically.

### Does Outrun keep my prompts or outputs?

Outrun does not store your prompts, images or outputs unless you choose to save them.

## Related pages

- [Troubleshooting](https://outrun.to/docs/troubleshooting)
- [Setup guides](https://outrun.to/guides)
- [OpenAI-compatible API](https://outrun.to/openai-compatible-api)
- [Support](https://outrun.to/docs/support)
- [Get your API key](https://outrun.to/overview)

[Get your API key](https://outrun.to/key) [See all models and prices](https://outrun.to/pricing)
