---
title: "Edit or create an image with FLUX.1 Kontext [pro]"
method: POST
path: "/v1/flux-kontext-pro"
tags: ["Models"]
---

# Edit or create an image with FLUX.1 Kontext [pro]

`POST /v1/flux-kontext-pro`

Submits an image creation task with FLUX.1 Kontext [pro]. For image editing, prefer FLUX.2 [pro] (/flux-2-pro) or FLUX.2 [flex] (/flux-2-flex) which are the recommended default models for editing workflows.

## Request body

- FluxKontextProInputs
  - `prompt` string, required — Text prompt for image generation.
  - `input_image` string, nullable — Base64 encoded image or URL to use with Kontext.
  - `input_image_2` string, nullable — Base64 encoded image or URL to use with Kontext. *Experimental Multiref*
  - `input_image_3` string, nullable — Base64 encoded image or URL to use with Kontext. *Experimental Multiref*
  - `input_image_4` string, nullable — Base64 encoded image or URL to use with Kontext. *Experimental Multiref*
  - `seed` integer, nullable — Optional seed for reproducibility.
  - `aspect_ratio` string, nullable — Aspect ratio of the image between 21:9 and 9:21
  - `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
  - `prompt_upsampling` boolean — Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation.
  - `safety_tolerance` integer — Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict.

## 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/versions/a0209bab18e1/schema)
