---
meta:
  title: Understanding common errors with Generative APIs
  description: This page explains how to understand errors with Generative APIs
content:
  h1: Understanding common errors with Generative APIs
  paragraph: This page explains how to understand errors with Generative APIs
tags: generative-apis ai-data understanding-data
dates:
  validation: 2025-05-12
  posted: 2024-09-02
---

Scaleway uses conventional HTTP response codes to indicate the success or failure of an API request. 
In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error caused by the information provided, and codes in the 5xx range show an error from Scaleway servers.

If the response code is not within the 2xx range, the response will contain an error object structured as follows:

```
{
  "error": string,
  "status": number,
  "message": string
}
```

Below are usual HTTP error codes:

- 400 - **Bad Request**: The format or content of your payload is incorrect. The body may be too large, or fail to parse, or the content-type is mismatched.
- 401 - **Unauthorized**: The `authorization` header is missing. Find required headers in [this page](/generative-apis/api-cli/using-generative-apis/)
- 403 - **Forbidden**: Your API key does not exist or does not have the necessary permissions to access the requested resource. Find required permission sets in [this page](/generative-apis/api-cli/using-generative-apis/)
- 404 - **Route Not Found**: The requested resource could not be found. Check your request is being made to the correct endpoint.
- 422 - **Model Not Found**: The `model` key is present in the request payload, but the corresponding model is not found.
- 422 - **Missing Model**:  The `model` key is missing from the request payload.
- 429 - **Too Many Requests**: You are exceeding your current quota for the requested model, calculated in requests per minute. Find rate limits on [this page](/generative-apis/reference-content/rate-limits/)
- 429 - **Too Many Tokens**: You are exceeding your current quota for the requested model, calculated in tokens per minute. Find rate limits on [this page](/generative-apis/reference-content/rate-limits/)
- 500 - **API error**: An unexpected internal error has occurred within Scaleway's systems. If the issue persists, please [open a support ticket](https://console.scaleway.com/support/tickets/create).

For streaming responses via SSE, 5xx errors may occur after a 200 response has been returned.