---
agentTools:
  projectIndex: https://apidocs.tryspeed.com/llms.txt
---

# Errors

Speed employs conventional HTTP response codes to indicate the success or failure of an API request. Our error responses are further classified into **`type`** and **`message`** attributes.

In general, `200` HTTP codes correspond to success. Whereas, codes in the `4XX` range indicate an error caused by the information in the request body (e.g., a required parameter was omitted or an invalid value was added to the parameter, etc.). Codes in the `5XX` range are rare in nature, indicating an error with Speed servers.

**A comprehensive breakdown of all error codes:**

| HTTP Code                                  | Error Logic                                                                                                                                                                                                             |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `200` - OK                                 | The request has succeeded.                                                                                                                                                                                              |
| `201` - Created                            | The request has been fulfilled new entity is created with success                                                                                                                                                       |
| `202` - Accepted                           | The request has been accepted for processing, but the process is yet to complete.                                                                                                                                       |
| `204` - No Content                         | The request has succeeded but returns has no message body.                                                                                                                                                              |
| `400` - Bad Request                        | The request was unacceptable, often due to incorrect or missing required parameter.                                                                                                                                     |
| `401` - Unauthorized                       | The request requires user authentication. If the request included authorization credentials, authorization has been refused for those credentials.                                                                      |
| `402` - Request Failed                     | The parameters were valid but the request failed.                                                                                                                                                                       |
| `403` - Forbidden                          | The API key doesn't have permissions to perform the request.                                                                                                                                                            |
| `404` - Not Found                          | The requested resource doesn't exist.                                                                                                                                                                                   |
| `429` - Too Many Requests                  | Too many requests hit the API too quickly. Please wait until you pass the limit and attempt the call again.                                                                                                             |
| `500`, `502`, `503`, `504` - Server Errors | There are multiple possible reasons for a 5XX error. The server is currently unable to handle the request due to a temporary condition which will be alleviated after some delay. You can choose to resend the request. |

### Error Schema

Speed platform APIs always return a response. If an endpoint request fails, the response body includes an errors array to aid in diagnosing the problem. The same is explained in the following section.

A **`type`** attribute, indicates the nature of the problem, while additional attributes provide details about the problem. The **`type`** and **`message`** attributes will always be returned in these response bodies. Any additional attributes, such as **`param`** or **`reason`**, will vary depending on the type of the error.

### Attributes

<b class="para-title">Type</b> <span style="font-size:12px; color: #8792a2;">string</span>
The error type is classified broadly and returned.
--------------------------------------------------

<b class="para-title">Message</b> <span style="font-size:12px; color: #8792a2;">string</span>
A user-friendly message providing details about the error is returned.
----------------------------------------------------------------------

<b class="para-title">Param</b> <span style="font-size:12px; color: #8792a2;">string</span>
If the error is parameter-specific, the parameter related to the error is returned.
-----------------------------------------------------------------------------------