Skip to content

FLUX.2 [klein] 9B · Edit

Integrate

Model id flux-2/klein/9b/edit
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/flux-2/klein/9b/edit?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Files like the example: $0.022 22 API credits your files are measured before the run Run it on this page

Get API key
Black Forest Labs Image Editing

Prompt-driven image editing that takes up to 4 source images and returns 1 to 4 edited results

Black Forest Labs · Image

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

•required

Prompt describing the image edits.

•required image_urls
Drop a file, or

URLs for images to edit, with a limit of 4 images.

image_size

Output image dimensions; when omitted, the dimensions match the input image.

num_images default 1

Image count requested for generation.

Advanced output_format · num_inference_steps · seed · enable_safety_checker
output_format default png

File format for the resulting image.

default 4

Count of inference steps to run.

Generation seed override; omitting it lets generation choose a seed at random.

POST /run/flux-2/klein/9b/edit?wait=20 quote → $0.022
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/flux-2/klein/9b/edit?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About FLUX.2 [klein] 9B · Edit

Edits existing pictures from a text `prompt` plus `image_urls`, which accepts a maximum of 4 images. If `image_size` is left out, the output follows the input image size. It shares the 4 to 8 `num_inference_steps` range, 1 to 4 `num_images`, and jpeg, png or webp output with the text-to-image variant. A `seed` can be set for repeatable edits.

Parameters

Send either the canonical name or the native name, not both. Canonical names

NameType DefaultAllowed Description
promptrequired
Typestring
Prompt describing the image edits.
seedoptional
Typeinteger | null
Generation seed override; omitting it lets generation choose a seed at random.
num_inference_stepsoptional
Typeinteger
Default4
4 – 8
Count of inference steps to run.
image_sizeoptional
Typeobject
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
Output image dimensions; when omitted, the dimensions match the input image.
num_imagesoptional num_outputs
Typeinteger
Default1
1 – 4
Image count requested for generation.
enable_safety_checkeroptional
Typeboolean
Defaulttrue
Safety checking, which returns black images in place of any images flagged unsafe. A value of true enables checking; false disables it only for authorized accounts, while requests without authorization are checked regardless.
output_formatoptional
Typeenum
Defaultpng
jpegpngwebp
File format for the resulting image.
image_urlsrequired images
Typeurl[] · image
URLs for images to edit, with a limit of 4 images.
required Canonical name, also accepted

File parameters take a public https:// URL, a data: URI up to 10 MB, or the file_url of an upload. Files

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "flux-2/klein/9b/edit",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 22,
    "usd": "0.022",
    "charged": 22,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "image_urls": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200,
        "width": 1024,
        "height": 768
      }
    ],
    "timings": {},
    "seed": 42,
    "has_nsfw_concepts": [
      false
    ],
    "prompt": "string"
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
images
array of object {url, content_type, file_name, file_size, width, height}Images produced by the model.
timings
object
seed
integerImage-generation seed, including the randomly chosen value if the input omitted a seed; otherwise, it repeats the supplied value.
has_nsfw_concepts
array of booleanIndicates whether NSFW concepts appear in the generated images.
prompt
stringPrompt used during image generation.

More models: Image Editing

For AI agents: this page as Markdown is at https://doitong.com/en-US/developers/models/flux-2/klein/9b/edit.md. All models and guides: https://doitong.com/developers/llms.txt