# Status and error codes (/en/realtime-media/transcoding/reference/status-codes)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

This document lists the response status codes for Cloud Transcoding and Multi-bitrate streaming, along with their descriptions and recommended actions.

## Cloud Transcoding [#cloud-transcoding]

When you call the RESTful API, you receive the following HTTP response status codes:

* If the HTTP status code is `2XX`, the request is successful.
* If the HTTP status code is not `2XX`, the request failed.

The following is a sample response for a failed request:

```json
// 400 Bad Request
{
  "message": "appid is invalid"
}
```

When using the Cloud Transcoding Service, you may receive status codes that indicate the service status. Refer to the following table to understand their meanings and take appropriate action:

| Status Code                 | Description                                                                                                                                                                    | Suggested Actions                                                                                                                         |
| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |
| `200 OK`                    | The request was successful.                                                                                                                                                    | No troubleshooting is required.                                                                                                           |
| `201 Created` (Deprecated)  | The task is already in progress. Do not use the same `builderToken` to start the task again.                                                                                   | No troubleshooting is required.                                                                                                           |
| `202 Accepted`              | The server has received the task request, but it does not mean that the execution is complete.                                                                                 | Query the execution status before proceeding to the next business operation.                                                              |
| `400 Bad Request`           | The request syntax is incorrect, the parameter value does not meet the requirements, or your App ID does not have the Cloud Transcoding service enabled.                       | Investigate further based on the `message` field in the response body.                                                                    |
| `401 Unauthorized`          | The `Authorization` field for HTTP Basic Authentication is invalid.                                                                                                            | Refer to Implementing HTTP [Basic Authentication](/en/api-reference/cloud-transcoding/restful) or check your `Authorization` credentials. |
| `403 Forbidden`             | The cloud transcoding service is not enabled for your App ID.                                                                                                                  | Contact [technical support](mailto\:support@agora.io) to activate it.                                                                     |
| `404 Not Found`             | Transcoder not found.                                                                                                                                                          | Use a backoff strategy to make a query request to confirm whether the transcoder is created successfully.                                 |
| `409 Conflict`              | A transcoder task with the same `instanceId` already exists.                                                                                                                   | If you want to create a new transcoder, delete the existing transcoder first.                                                             |
| `429 Too Many Requests`     | The request rate exceeds the upper limit.                                                                                                                                      | Wait for a while and try again.                                                                                                           |
| `500 Internal Server Error` | Internal Agora server error.                                                                                                                                                   | Use a backoff strategy for query requests or contact [technical support](mailto\:support@agora.io).                                       |
| `501 Not Implemented`       | This method is not implemented.                                                                                                                                                | No troubleshooting required.                                                                                                              |
| `503 Service Unavailable`   | The Agora server is temporarily overloaded or undergoing maintenance.                                                                                                          | Use a backoff strategy for query requests or contact [technical support](mailto\:support@agora.io).                                       |
| `504 Gateway Timeout`       | An internal error occurred on the Agora server, the server acting as a gateway or proxy did not get the request from the upstream server, or the upstream server is shut down. | Use a backoff strategy for query requests or contact [technical support](mailto\:support@agora.io).                                       |

When using the Cloud Transcoding response status code for troubleshooting, keep the following in mind:

* If the request fails, do not perform any logical processing on the content of the `message` field in the response body. Instead, rely primarily on the status code for troubleshooting.
* If the troubleshooting methods in the table do not resolve the issue, contact [technical support](mailto\:support@agora.io) with the values of the `X-Request-ID` and `X-Resource-ID` fields in the response header.
* If you receive a `404` status code after a `Create` request has returned successfully and you have not called the `Delete` method, or if the transcoder remains idle beyond the `idleTimeout` parameter value in the request, use a backoff algorithm. Retry at increasing intervals of 5, 10, and 15 seconds to call the `Query` method for confirmation.
* A `5XX` response status code usually indicates an issue in the server’s response process. Refer to the following recommended actions:
  * Use a backoff strategy for query requests. Retry at increasing intervals of 5, 10, and 15 seconds to query the service status.
  * Contact [technical support](mailto\:support@agora.io).
