Troubleshooting

AI Coding Tool Errors — Claude Code, Cursor, Codex, opencode, Cline, Zed

Pick the tool that is failing. Every page quotes the exact text the tool prints, explains what produced it, and gives the shortest path to a working setup. For the API-level reference organized by status code, see the API error codes page.

Claude Code errors

Fixes for the errors Claude Code prints while it runs GPT and Gemini models through apiToken.sale: API Error 429 rate_limit_error, 401 authentication_error, 402 insufficient balance and 529 Overloaded. Exact output, cause and fix.

Cursor errors

Fixes for Cursor errors with a custom OpenAI base URL and API key: unable to reach model provider, invalid API key on verify, 401 from the provider and rate limits. Cause and fix for each.

Codex CLI errors

Fixes for Codex CLI failures with a custom model provider: Missing OPENAI_API_KEY, config.toml profile mistakes, auth.json login state and stream error: unexpected status 401.

opencode errors

Fixes for opencode failures on a custom provider: AI_APICallError, models missing from the provider list, API keys that are not picked up, and silently dropped image attachments.

Cline errors

Fixes for Cline errors with the OpenAI Compatible provider: the API Request Failed banner, 401 invalid API key, 429 rate_limit_error retry loops and the context_length_exceeded 400. Cause and fix for each.

Zed errors

Fixes for Zed assistant errors on GPT and Gemini models through the OpenAI provider: 401 invalid API key, 429 rate limits and custom api_url configuration, including the missing /v1 404.

API error codes

The API-level reference: every status code and verbatim response body, organized by code rather than by tool.

Skip the broken setup

apiToken.sale serves GPT and Gemini models through OpenAI-compatible, Messages (Anthropic format) and native Gemini endpoints — standard SDKs, one key, one prepaid balance. Point your tool's base URL at it, and the config on this page works as written.