When coding integrations with ChatGPT, Claude, or Gemini, the most maddening thing isn’t that the model isn’t smart—it’s that it won’t respond at all: 401, 403, 429 taking turns. The following checklist is what I use most often, and it basically pulls “API not working” out of the realm of mysticism and back into reality.
Category 1 errors: 401 invalid key or bad signature
If you see invalid_api_key or Unauthorized, don’t question your life choices—most likely you copied an extra space, missed a prefix, or stuffed a test-environment key into production.
- Confirm the key comes from the correct platform: don’t mix up OpenAI, Anthropic, and Google
- Check the request headers: is the Bearer format written correctly?
- Validate with a minimal request first—don’t start by sending a pile of parameters
Category 2 errors: 429 rate limiting or quota exhausted
429 looks like a network issue, but it’s more like “you’re using it too aggressively.”
- Limit concurrency and implement exponential backoff retries
- Verify billing and quota—don’t pick the wrong project/organization for Gemini and Claude
- Split long texts when possible, and keep prompts KISS: simpler is often more stable
Category 3 errors: 403 region restrictions or risk-control blocking
Most of the time, 403 isn’t about lacking permission—it’s the platform thinking you look “suspicious.” Corporate intranets, data center IPs, and frequently switching nodes can all trigger it.


