Application Process
To use the Flux Images Generation API, first go to the Ace Data Cloud Console to obtain your API Token and keep it for later use.
If you have not yet logged in or registered, you will be automatically redirected to the login page to register and log in, and you will automatically return to the current page after completion.
One API Token can call all platform services; there is no need to apply separately for each service. Your first application will include free credits for a free trial; when credits are insufficient, you can recharge your 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 use a task ID returned by the Flux Images Generation API service as an example to demonstrate how to use this API. Assume we have a task ID: 2db0168c-2373-4367-8d9a-9dc778802e8a, next we demonstrate how to by passing in a task ID.Task Example Image

Set Request Headers and Request Body
Request Headers include:accept: Specifies that the response result is received in JSON format; enterapplication/jsonhere.authorization: The key for calling the API, which can be directly selected from the dropdown after application.
id: The uploaded task ID.action: The operation method for the task.

Code Example
You can see that code in various languages has already been automatically generated on the right side of the page, as shown in the image:
CURL
Python
Response Example
After the request succeeds, the API will return detailed information about the image 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 fields are described as follows.
id, the ID of the generated image task, used to uniquely identify this image generation task.request, the request information in the image task query.response, the response information in the image task query.created_at, task creation time, Unix timestamp (seconds, floating point).started_at, task execution start time, Unix timestamp (seconds, floating point).finished_at, task completion time, Unix timestamp (seconds, floating point). This field is not returned when the task is not completed.elapsed, task execution duration, in seconds (floating point, retained to 3 decimal places). This field is not returned when the task is not completed.
Batch Query Operation
This is for querying image task details for multiple task IDs. The difference from above is that the action needs to be selected as retrieve_batch Request Body includes:ids: The array of uploaded task IDs.action: The operation method for the task.

Code Example
You can see that code in various languages has already been automatically generated on the right side of the page, as shown in the image:
Response Example
After the request succeeds, the API will return specific detailed information about all batch image tasks this time. For example:items contains the detailed information of batch image tasks. The specific information of each image task is the same as the fields above. The field information is as follows.
items, all detailed information of batch image tasks. It is an array, and each element in the array has the same format as the returned result for querying a single task above.count, the number of image tasks queried in batch here.
CURL
Python
Error Handling
When calling the API, if an error is encountered, the API will return the corresponding error code and information. 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.

