Flux Images Generation API
POSThttps://api.acedata.cloud/flux/images
Flux AI image generation API, generates 1 image per request.
Related Products
Flux - Ace Data Cloud
Flux image generation platform, directly interfaces with this API, high-speed and stable available.
Request Headers
acceptstring
Specify the format of the response returned by the server. If not specified, the default format is `application/json`; if specified as `application/x-ndjson`, the response will be returned in a chunked streaming format separated by newline characters in JSON format.
Please select
authorizationstring
Bearer token
Request Body
actionstringRequired parameter
Types of operations for generating images. If it is `generate`, a new image will be created based on the prompt; if it is `edit`, the original image will be edited according to the prompt and `image_url`.
promptstringRequired parameter
Prompts for generating images.
modelstring
Model used for generating images.
image_urlstring
Link to the original image that needs editing.
sizestring
Image size specifications.
countnumber
Number of generated images.
callback_urlstring
The callback address that will be called after the image generation is complete.
asyncboolean
Whether to process in asynchronous mode. When set to `true`, the interface immediately returns `task_id`, without the need to provide `callback_url`, and then the result can be obtained by polling the corresponding task query interface; if `callback_url` is also provided, the result will be pushed to that callback address.
Please select
Response
Flux Image Generation
Allow Use General Balance
When 'Allow General Balance' is enabled, the general balance is used automatically if an app's balance is insufficient.
Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.
