Application Process
To use the Flux Images Generation API, first obtain your API Token from the Ace Data Cloud Console for future reference.
If you are not logged in or registered, you will be automatically redirected to the login page to invite you to register and log in, and will return to the current page upon completion.
One API Token can call all services on the platform without needing to apply separately for each service. The first application will grant a free quota for a trial experience; when the quota is insufficient, you can recharge the general balance in the console.
📘 Complete Documentation: Flux Images Generation API →
Request Example
The Flux Tasks API can be used to query the results of the Flux Images Generation API. For information on how to use the Flux Images Generation API, please refer to the documentation Flux Images Generation API. We will demonstrate how to use this API with an example task ID returned by the Flux Images Generation API. Suppose we have a task ID: 2db0168c-2373-4367-8d9a-9dc778802e8a, we will show 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:
CURL
Python
Response Example
Upon successful request, the API will return the detailed information of the image task as shown in the following example:id: The ID of the image task generated, used to uniquely identify this image generation task.request: The request information in the image task.response: The return information in the image task.created_at: The task creation time, Unix timestamp (seconds, float).started_at: The task start execution time, Unix timestamp (seconds, float).finished_at: The task completion time, Unix timestamp (seconds, float). This field is not returned if the task is not completed.elapsed: The time taken for task execution, in seconds (float, rounded to 3 decimal places). This field is not returned if the task is not completed.
Batch Query Operation
This is for querying the details of multiple task IDs, and unlike the 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
You can see that various language codes have been automatically generated on the right side of the page, as shown in the image:
Response Example
Upon successful request, the API will return the specific details of all batch image tasks. For example:items includes the specific details of batch image tasks, and each image task’s specific information is the same as the fields mentioned above.
items, all specific details of batch image tasks. It is an array, and each element of the array has the same format as the return result of querying a single task above.count, the number of image tasks in this batch query.
CURL
Python
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.

