{
"created": 123,
"data": [
{
"url": "<string>",
"b64_json": "<string>",
"index": 1,
"revised_prompt": "<string>"
}
],
"model": "<string>",
"output_format": "<string>",
"size": "<string>",
"quality": "<string>",
"background": "<string>",
"usage": {}
}Image generation
Flux supports text-to-image and image-to-image through POST /v1/images/generations. Use images for up to 4 reference images and size for output dimensions. Each request produces one image. Optional seed, output_format, and safety_tolerance depend on the selected model.
{
"created": 123,
"data": [
{
"url": "<string>",
"b64_json": "<string>",
"index": 1,
"revised_prompt": "<string>"
}
],
"model": "<string>",
"output_format": "<string>",
"size": "<string>",
"quality": "<string>",
"background": "<string>",
"usage": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Model-specific image options.
Required. Use a model ID or available alias returned by Get Models.
1"flux-2-flex"
"flux-2-max"
"flux-pro-1.1"
"flux-dev"
1Output size as WIDTHxHEIGHT, or auto for the model default. Supported sizes depend on the selected model.
^(auto|[1-9][0-9]*x[1-9][0-9]*)$Model-specific image options.
jpeg, png Model-specific image options.
Response format: url returns image URLs; b64_json returns Base64 image data.
url, b64_json Optional reference images for image-to-image generation. Omit for text-to-image generation. Image limits depend on the selected model.
1 - 4 elements1Only 1 is supported.
Response
Success
Creation timestamp.

