The main function of the Producer Tasks API is to query the execution status of tasks by inputting the task ID generated by the Producer Audios Generation API. This document will provide detailed integration instructions for the Producer Tasks API, helping you easily integrate and fully utilize the powerful features of this API. With the Producer Tasks API, you can easily query the execution status of tasks from the Producer Audios Generation API.Documentation Index
Fetch the complete documentation index at: https://docs.xhuoapi.ai/llms.txt
Use this file to discover all available pages before exploring further.
Application Process
To use the Producer Tasks API, you first need to apply for the corresponding service on the application page Producer Audios Generation API, and then copy the task ID from the Producer Audios Generation API, as shown in the image below:
If you are not logged in or registered, you will be automatically redirected to the login page inviting you to register and log in. After logging in or registering, you will be automatically returned to the current page.
There is a free quota available for first-time applicants, allowing you to use this API for free.
Request Example
The Producer Tasks API can be used to query the results of the Producer Audios Generation API. For information on how to use the Producer Audios Generation API, please refer to the documentation Producer Audios Generation API. We will take one task ID returned by the Producer Audios Generation API as an example to demonstrate how to use this API. Suppose we have a task ID: 1a6ac2ad-10f2-4e2b-b500-66ec27fe82ad, and we will demonstrate how to pass in a task ID.Task Example Image

Setting Request Headers and Request Body
Request Headers include:accept: Specifies that the response should be in JSON format, set toapplication/json.authorization: The key to call the API, which can be selected directly after application.
id: The uploaded task ID.action: The operation method for the task.

Code Example
You can see that various language codes have been automatically generated on the right side of the page, as shown in the image below:
CURL
Response Example
Upon successful request, the API will return the details of the task here. For example:request field is the request body when initiating the task, while the response field is the response body returned after the task is completed. The field descriptions are as follows.
id, the ID of the generated task, used to uniquely identify this generation task.request, the request information in the query task.response, the return information in the query task.
Batch Query Operation
This is for querying task details for multiple task IDs, and unlike above, the action needs to be selected as retrieve_batch. Request Body includes:ids: An array of uploaded task IDs.action: The operation method for the task.

Code Example
It can be seen that various language codes have been automatically generated on the right side of the page, as shown in the figure:
Response Example
After a successful request, the API will return the specific detail information of all batch tasks this time. For example:CURL
Error Handling
When calling the API, if an error occurs, the API will return the corresponding error code and message. For example:400 token_mismatched: Bad request, possibly due to missing or invalid parameters.400 api_not_implemented: Bad request, possibly due to missing or invalid parameters.401 invalid_token: Unauthorized, invalid or missing authorization token.429 too_many_requests: Too many requests, you have exceeded the rate limit.500 api_error: Internal server error, something went wrong on the server.

