---
title: "Generate an image with FLUX.1 [dev]"
method: POST
path: "/v1/flux-dev"
tags: ["Models"]
---

# Generate an image with FLUX.1 [dev]

`POST /v1/flux-dev`

Submits an image generation task with FLUX.1 [dev].

## Request body

- FluxDevInputs
  - `prompt` string — Text prompt for image generation.
  - `image_prompt` string, nullable — Optional base64 encoded image to use as a prompt for generation.
  - `width` integer — Width of the generated image in pixels. Must be a multiple of 32.
  - `height` integer — Height of the generated image in pixels. Must be a multiple of 32.
  - `steps` integer, nullable — Number of steps for the image generation process.
  - `prompt_upsampling` boolean — Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation.
  - `seed` integer, nullable — Optional seed for reproducibility.
  - `guidance` number, nullable — Guidance scale for image generation. High guidance scales improve prompt adherence at the cost of reduced realism.
  - `safety_tolerance` integer — Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict.
  - `output_format` 'jpeg' | 'png' | 'webp'
  - `webhook_url` string, uri, nullable — URL to receive webhook notifications
  - `webhook_secret` string, nullable — Optional secret for webhook signature verification

## Response `200`

Successful Response

- union
  - AsyncResponse
    - `id` string, required
    - `polling_url` string, required
    - `cost` number, nullable — Cost in credits for this request
    - `input_mp` number, nullable — Input megapixels (2 decimal places)
    - `output_mp` number, nullable — Output megapixels (2 decimal places)
  - AsyncWebhookResponse
    - `id` string, required
    - `status` string, required
    - `webhook_url` string, required
    - `cost` number, nullable — Cost in credits for this request
    - `input_mp` number, nullable — Input megapixels (2 decimal places)
    - `output_mp` number, nullable — Output megapixels (2 decimal places)

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/bfl/apis/bfl-api.md) · [All operations](https://skmtc.net/bfl/apis/bfl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bfl/bfl-api/revisions/a0209bab18e1/schema)
