FLUX.1 [Schnell]
Generate images using a FLUX.1 [schnell], a 12 billion parameter model using text descriptions. FLUX.1 [schnell] is openly available under an Apache2.0 license. It excels in photorealism, processes complex prompts, and generates clear text.
OctoAI’s FLUX.1 [Schnell] API supports text-to-image use cases.
You need to create an OctoAI Authentication Token to access this API.
How to use
Invoke https://image.octoai.run/generate/flux-schnell
endpoint with a POST
request.
The headers of the request must include an Authentication Token in the authorization field. The accept header should be set to application/json
to receive the image encoded as base64 in a JSON response.
Generating with a prompt: Commonly referred to as text-to-image, this mode generates an image from text alone. While the only required
parameter is the prompt
, it also supports a width
and height
parameter which can be used to control the aspect ratio of the generated image.
For more details about all parameters, please see the request schema below.
Output
The resolution of the generated image will be 1 megapixel. The default resolution is 1024x1024.
Pricing
$0.002 per image, 4 steps, 1024X1024
Check Pricing Page for more details.
Request Details
Headers:
Authorization
(Required): Your OCTOAI_TOKEN
Content-Type
(Required): Set to application/json
Parameters:
prompt
(string [ 1 .. 10000 ] characters, Required): A string of text describing the image to generate. A strong, descriptive prompt that clearly defines elements, colors, and subjects will lead to better results.cfg_scale
(double, Optional): Floating-point number represeting how closely to adhere to prompt description. Must be a positive number no greater than 50.0. Recommended values between 4-6.num_images
(integer, Optional): Integer representing how many output images to generate with a single prompt/configuration. Defaults to 1. Allowed values: 1-16.seed
(union, Optional): Integer number or list of integers representing the seeds of random generators. Fixing random seed is useful when attempting to generate a specific image. Must be greater than 0 and less than 2^32.steps
(integer, Optional Defaults to 4): Integer representing how many steps of diffusion to run. Must be greater than 0 and less than or equal to 200.height
(integer, Optional): Integer representing the height of image to generate. Default to 1024.width
(integer, Optional): Integer representing the width of image to generate. Default to 1024.loras
(string,Optional): Here you can specify LoRAs, in name-weight pairs, either from the OctoAI asset library or your private asset library.
Supported Output Resolutions (Width x Height) are as follows:
FLUX.1 [Schnell]: