Generate Image - Flux Model
POST
/api/v1/flux/imagineThe API to generate your image, in FLUX 1.1 PRO.
Note:
If n > 1, the images
fields in the completed response will have all the generated images.
The uri
field in the completed response is the first image's URL.
Request
The imagine prompt, you can also include an image URL or other valid parameters in it, same like you using Midjourney in Discord.
The reference metadata which will return as part of the webhook.
The webhook URL which the response will send to, the payload of this webhook is same as our Message endpoint.
Custom timeout, default to 900 in seconds
How many images to be generated, default is 1, and maximum to 4
Image height, default to 1024, must be divided by 8
Image width, default to 1024, must be divided by 8
Aspect ratio of the image, default to 1:1
Image type, default to png, try to use webp to reduce size a lot
Image quality, default to 100
Different flux model to use, default to flux-1.1-pro
{
"prompt": "string",
"ref": "string",
"webhookOverride": "YOUR_BACKEND_API_ENDPOINT",
"timeout": 900,
"n": 1,
"height": 1024,
"width": 1024,
"aspect_ratio": "1:1",
"output_format": "png",
"output_quality": "100",
"model": "flux-1.1-pro"
}
Request samples
Responses
The status of the request.
The messageId of the request, which will be used for querying the progress, sending subsequential actions later, etc.
The timestamp of the job creation.
The error message, if any
{
"success": true,
"messageId": "d15c1541-229a-442b-9873-d3494dede12a",
"createdAt": "2023-08-01T14:03:01.817Z"
}