Skip to main content
HTTP 413 Content Too Large
The request body exceeds the server's size limit.
4xx · Client error✗ not retryable — fix the request instead
In AI APIs specifically
Hit by oversized image payloads, giant tool results, or batch files over the per-file cap. Distinct from context-window overflow, which is usually a 400.
Fix checklist
- Check the provider's documented payload limits.
- Resize/compress images before base64-encoding.
- Split batch files into smaller chunks.
Spec: RFC reference
Related status codes
400 Bad Request
The server cannot process the request due to a client error — malformed JSON, invalid parameters, or schema violations..
401 UnauthorizedAuthentication is missing or invalid for this request..
402 Payment RequiredThe request requires payment — billing is not set up or a balance is exhausted..
403 ForbiddenThe server understood the request but refuses to authorize it — valid credentials, insufficient permission..