black-forest-labs/FLUX-1-dev cover image
featured

black-forest-labs/FLUX-1-dev

FLUX.1-dev is a state-of-the-art 12 billion parameter rectified flow transformer developed by Black Forest Labs. This model excels in text-to-image generation, providing highly accurate and detailed outputs. It is particularly well-regarded for its ability to follow complex prompts and generate anatomically accurate images, especially with challenging details like hands and faces.

FLUX.1-dev is a state-of-the-art 12 billion parameter rectified flow transformer developed by Black Forest Labs. This model excels in text-to-image generation, providing highly accurate and detailed outputs. It is particularly well-regarded for its ability to follow complex prompts and generate anatomically accurate images, especially with challenging details like hands and faces.

Public
$0.009 x (width / 1024) x (height / 1024) x (iters / 25)
Project

HTTP/cURL API

You can use cURL or any other http client to run inferences:

curl -X POST \
    -d '{"prompt": "A photo of an astronaut riding a horse on Mars."}'  \
    -H "Authorization: bearer $DEEPINFRA_TOKEN"  \
    -H 'Content-Type: application/json'  \
    'https://api.deepinfra.com/v1/inference/black-forest-labs/FLUX-1-dev'

which will give you back something similar to:

{
  "images": [
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQI12PQz3wAAAJDAXkkWn+MAAAAAElFTkSuQmCC"
  ],
  "nsfw_content_detected": [
    false
  ],
  "seed": 42,
  "request_id": null,
  "inference_status": {
    "status": "unknown",
    "runtime_ms": 0,
    "cost": 0.0,
    "tokens_generated": 0,
    "tokens_input": 0
  }
}

Input fields

promptstring

text prompt


num_imagesinteger

number of images to generate

Default value: 1

Range: 1 ≤ num_images ≤ 4


num_inference_stepsinteger

number of denoising steps

Default value: 25

Range: 1 ≤ num_inference_steps ≤ 50


widthinteger

image width in px

Default value: 1024

Range: 128 ≤ width ≤ 2048


heightinteger

image height in px

Default value: 1024

Range: 128 ≤ height ≤ 2048


seedinteger

random seed, empty means random

Range: 0 ≤ seed < 18446744073709552000


guidance_scalenumber

classifier-free guidance, higher means follow prompt more closely

Default value: 7.5

Range: 0 ≤ guidance_scale ≤ 20


webhookfile

The webhook to call when inference is done, by default you will get the output in the response of your inference request

Input Schema

Output Schema