Cline API Errors — API Request Failed, 401, 429, Context Limit
Cline shows most failures as an "API Request Failed" banner with the provider's response underneath. The banner itself is not the diagnosis — the status and error.type in the body are. The pages below map each body to its fix.
| Error | Meaning |
|---|---|
API Request Failed | Cline's API Request Failed banner is a wrapper around the provider's response. How to read the status and error.type underneath and route yourself to the actual fix. |
{"type":"error","error":{"type":"authentication_error","message"… | Cline returns 401 invalid x-api-key when the Anthropic-compatible endpoint rejects the key: wrong base URL field, whitespace in the key, or a revoked key. The fix checklist. |
{"type":"error","error":{"type":"rate_limit_error","message":"Th… | Cline agent runs burn per-minute token budgets quickly and then loop on 429 retries. Why agent workloads trigger rate limits and how to get a run through. |
input length and `max_tokens` exceed context limit: 199999 + 819… | The 400 input length and max_tokens exceed context limit appears when Cline's accumulated task context plus the output reservation no longer fit the model's window. How to recover. |
Cline API Request Failed — Diagnosing the Real Error
Cline's API Request Failed banner is a wrapper around the provider's response. How to read the status and error.type underneath and route yourself to the actual fix.
Cline 401 invalid x-api-key (Anthropic) — Fix
Cline returns 401 invalid x-api-key when the Anthropic-compatible endpoint rejects the key: wrong base URL field, whitespace in the key, or a revoked key. The fix checklist.
Cline 429 rate_limit_error — Stop the Retry Loop
Cline agent runs burn per-minute token budgets quickly and then loop on 429 retries. Why agent workloads trigger rate limits and how to get a run through.
Cline: input length and max_tokens exceed context limit — Fix
The 400 input length and max_tokens exceed context limit appears when Cline's accumulated task context plus the output reservation no longer fit the model's window. How to recover.