Generate an image with FLUX.1 [schnell] FP8
FLUX.1 [schnell] is a 12 billion parameter rectified flow transformer capable of generating images from text descriptions. The FP8 version uses reduced precision numerics for 2x faster inference.
See our Playground to quickly try it out in your browser.
Path
The model to use for image generation.
Headers
Specifies which format to return the response in. With image/png
and
image/jpeg
, the server will populate the response body with a binary image
of the specified format. With application/json
, the server will populate the
response body with schema:
base64
contains a list of base64-encoded image files in PNG format. finishReason
is SUCCESS unless
safety_check=true
and the image response was filtered. seed
is the seed
that was used when generating the image.
The media type of the request body.
Quality (percent) of the JPEG image to return. Only used when Accept: image/jpeg
. Range: 0-100.
MIME type for the image to return in the JSON response. Only used when Accept: application/json
.
Options: image/jpeg
, image/png
Request Body
Prompt to use for the image generation process.
Negative prompt to use for the image generation process.
Height of the image in pixels. Supported resolutions (width, height) are (1024, 1024), (1152, 896), (896, 1152), (1216, 832), (832, 1216), (1344, 768), (768, 1344), (1536, 640), and (640, 1536).
Range: 512-1536
Width of the image in pixels. Supported resolutions (width, height) are (1024, 1024), (1152, 896), (896, 1152), (1216, 832), (832, 1216), (1344, 768), (768, 1344), (1536, 640), and (640, 1536).
Range: 512-1536
Classifier-free guidance scale for the image diffusion process.
Diffusion scheduler to use for the image generation process.
Options: null
, K_EULER
, K_DPMPP_2M
Number of images to generate.
Range: 1+
Random seed to use for the image generation process. If 0, we will use a totally random seed.
Number of steps to use for the image generation process.
Range: 1+
Enable a safety check for each response. If the safety check model detects unsafe content, the response will be filtered with Finish-Reason = CONTENT_FILTERED.
Response
The unique identifier for the image generation request.
Includes a base64-encoded string containing an image in PNG format. To retrieve the image, base64-decode the string into binary data, then load that binary data as a PNG file.
Can be SUCCESS
or CONTENT_FILTERED
.
Specifies the outcome of the image generation process. It could be
SUCCESS
indicating that the image was successfully generated, or
CONTENT_FILTERED
if the image was filtered due to the safety_check=true
parameter being set.
The seed used for the image generation process.
The unique identifier for the image generation request.
Includes a base64-encoded string containing an image in PNG format. To retrieve the image, base64-decode the string into binary data, then load that binary data as a PNG file.
Can be SUCCESS
or CONTENT_FILTERED
.
Specifies the outcome of the image generation process. It could be
SUCCESS
indicating that the image was successfully generated, or
CONTENT_FILTERED
if the image was filtered due to the safety_check=true
parameter being set.
The seed used for the image generation process.
When the Accept type is image/jpeg
, the response body will contain a binary image. Additionally, the response will include headers such as:
Content-Length: Represents the length of the binary image content.
Seed: The random seed used to generate the image.
Finish-Reason: Indicates the outcome of the image generation, such as CONTENT_FILTERED
or SUCCESS
.
When the Accept type is image/png
, the response body will contain a binary image. Additionally, the response will include headers such as:
Content-Length: Represents the length of the binary image content.
Seed: The random seed used to generate the image.
Finish-Reason: Indicates the outcome of the image generation, such as CONTENT_FILTERED
or SUCCESS
.