Run7 AIGet an API key ↗
RUN7 / LEARN & BUILD

AI API errors: fix 401, 404, 429 and timeouts

By Run7 AI · Updated: 2026-11-17

Start with the HTTP status and request route. Authentication errors, model permissions, rate limits and browser CORS failures have different remedies; repeating the same request is not a diagnosis.

Read the status before changing the key

ResultPossible causeNext action
400 / 422Invalid body or unsupported parameterCheck protocol, required fields and output-limit parameter
401Missing, invalid or expired credentialCheck the header and key locally
403Permission or policy restrictionConfirm model access; do not assume it only means insufficient balance
404Wrong route or unavailable resourceCheck /v1 duplication and exact model ID
429Rate limit or quota conditionInspect the error and Retry-After if available
5xxService or gateway failureUse a bounded retry and preserve the request ID

Providers can map errors differently. A status alone cannot identify every cause. Never paste a complete key into a public support report.

Network error is not an authentication verdict

A browser can block a response because the endpoint does not allow cross-origin requests. DNS, TLS, browser extensions and connectivity can also cause fetch to fail without an accessible HTTP status. Run the same minimal call locally with cURL to separate browser restrictions from API failure.

Do not disable browser security or certificate checks. The browser checker reports an inconclusive network/CORS result instead of calling a key invalid.

Retry only when useful

For a transient service failure or rate limit, wait, respect Retry-After when supplied, and cap attempts. Use increasing delays with jitter in production. Stop retrying invalid authentication or malformed requests until the configuration is corrected. A timed-out request may still have generated a response and a charge.

What to send to support

Start with the setup checklist if you have not yet completed a minimal call.

Keep learning

All guides · API checker

Sources and scope

Based on public protocol references. Delivered model permissions, rates and capabilities govern actual use. This is not a compatibility guarantee for every client version.