> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vidgo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# FLUX 3 Klein Edit

> The FLUX 3 Klein Edit API edits or combines 1–10 input images from a natural-language instruction and returns 1–4 results at 1K, 2K or 4K.

> [!TIP]
>
> 1. After submission, a `task_id` will be returned. If you provided a `callback_url`, when the task status becomes `finished` or `failed`, a POST request will be sent to the `callback_url`.
> 2. Regardless of whether `callback_url` is provided, you can retrieve the result through the unified [Query Task Status](https://docs.vidgo.ai/api-manual/task-management/status.md) endpoint.

FLUX 3 Klein Edit changes or combines existing images from a plain-language instruction. Send one image to restyle, retouch or replace elements, or up to ten to compose a product into a new scene or merge several references into one picture, with output at 1K, 2K or 4K.

FLUX 3 Klein is the compact member of Black Forest Labs' FLUX 3 image family, built for fast generation and instruction-based editing. Vidgo exposes it as two model IDs: [Text to Image](https://docs.vidgo.ai/api-manual/image-series/blackforestlabs-flux-3-klein-text-to-image.md) and [Edit](https://docs.vidgo.ai/api-manual/image-series/blackforestlabs-flux-3-klein-edit.md).

## Models

* **blackforestlabs/flux-3-klein/edit** — Image edit with FLUX 3 Klein, 1–10 input images, 1–4 results.

## Features

* Image edit from a natural-language instruction.
* Multi-image composition with up to 10 inputs, referenced by order in the prompt.
* Three resolution tiers: `1K`, `2K`, `4K`; presets or a custom size.
* PNG, JPEG or WebP output, 1–4 images per request.

## Required parameters

* `prompt` (string): The edit instruction. Refer to inputs by position, for example "the first image" and "the second image". Must not be blank.
* `image_urls` (string\[]): 1–10 images. Public HTTP(S) URLs, or base64 data URIs that Vidgo uploads first.

## Optional parameters

* `n` (integer): Number of images, `1`–`4`. Default `1`.
* `resolution` (string): `1K`, `2K` or `4K`. Default `1K`. See [Resolution](#resolution).
* `size` (string): Preset or custom `WIDTHxHEIGHT`. Default `1:1`. See [Resolution](#resolution).
* `output_format` (string): `png`, `jpeg` or `webp`. Default `png`.
* `enable_safety_checker` (boolean): Upstream safety checker. Default `true`.

## Resolution

* With a preset `size` (`1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `3:2`, `2:3`), the image is scaled so its long edge matches the tier: `1K` → 1024 px, `2K` → 2048 px, `4K` → 4096 px.
* With a custom `size` such as `1920x1080`, each side must be 256–4096 and a multiple of 16, and you must send `resolution` matching the long edge: up to 1024 → `1K`, up to 2048 → `2K`, above 2048 → `4K`. A mismatch returns 400.

| `resolution` | Long edge (presets) | Custom long edge |
| - | - | - |
| `1K` | 1024 px | ≤ 1024 px |
| `2K` | 2048 px | 1025–2048 px |
| `4K` | 4096 px | 2049–4096 px |

## Output

The finished task returns one file per requested image (`n`) in the `files` array of [Query Task Status](https://docs.vidgo.ai/api-manual/task-management/status.md) and the callback payload.

## Examples

* **Edit one image**: turn a daytime street into a rainy night scene, `16:9`, `1K`.
* **Combine two images at 2K with callback**: put the product from the first image into the scene from the second, `n: 2`, WebP, with a `callback_url`.

## Notes

* Results with many references can vary in pose and viewpoint consistency; describe the subject clearly and keep the number of inputs as low as the task allows.
* An empty `image_urls` array or more than ten images returns 400. Fields not listed above return 400. `model` and `callback_url` belong at the request root, not inside `input`.
* Credits are reserved at submission and depend on `resolution` and `n`. Text-to-image and edit use the same rates. A failed task is refunded in full. See the [pricing page](https://vidgo.ai/apis/api-pricing) for current rates. The number of input images does not change the price.


## OpenAPI

````yaml api-manual/image-series/blackforestlabs-flux-3-klein-edit.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - FLUX 3 Klein Edit
  description: >-
    The FLUX 3 Klein Edit API edits or combines 1–10 input images from a
    natural-language instruction and returns 1–4 results at 1K, 2K or 4K.
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Image Series
      summary: FLUX 3 Klein Edit
      description: >-
        Send only the `input` fields listed for this model. Any other field
        returns 400. `image_urls` takes 1–10 public HTTP(S) URLs; base64 data
        URIs are uploaded first. A custom `WIDTHxHEIGHT` size needs a
        `resolution` that matches its long edge.
      operationId: submit_blackforestlabs_flux_3_klein_edit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  description: Model ID. Use `blackforestlabs/flux-3-klein/edit`.
                  example: blackforestlabs/flux-3-klein/edit
                callback_url:
                  type: string
                  format: uri
                  nullable: true
                  description: >-
                    Optional public HTTP(S) endpoint that receives a POST when
                    the task becomes `finished` or `failed`. HTTPS is
                    recommended. Omit it, or send `null` or an empty string, to
                    disable callbacks.
                  example: https://your-domain.com/callback
                input:
                  type: object
                  required:
                    - prompt
                    - image_urls
                  properties:
                    prompt:
                      type: string
                      minLength: 1
                      example: >-
                        Place the bottle from the first image on the beach in
                        the second image, keep the label readable
                      description: >-
                        Edit instruction. Refer to inputs by order, for example
                        "the first image". Must not be blank.
                    image_urls:
                      type: array
                      items:
                        type: string
                        format: uri
                      minItems: 1
                      maxItems: 10
                      example:
                        - https://example.com/bottle.png
                      description: >-
                        1–10 images to edit or combine: public HTTP(S) URLs or
                        base64 data URIs (uploaded first). Order matters when
                        the prompt refers to images by position.
                    'n':
                      type: integer
                      minimum: 1
                      maximum: 4
                      default: 1
                      description: Number of images to generate.
                    resolution:
                      type: string
                      enum:
                        - 1K
                        - 2K
                        - 4K
                      default: 1K
                      description: >-
                        Resolution tier (case-insensitive). Presets are scaled
                        so the long edge is 1024, 2048 or 4096 px. It sets the
                        billing rate. With a custom `size`, send the tier that
                        matches its long edge.
                    size:
                      type: string
                      default: '1:1'
                      example: '16:9'
                      description: >-
                        Aspect-ratio preset (`1:1`, `4:3`, `3:4`, `16:9`,
                        `9:16`, `3:2`, `2:3`) or a custom `WIDTHxHEIGHT` with
                        each side 256–4096 and a multiple of 16. A custom size
                        needs an explicit `resolution` matching its long edge:
                        up to 1024 → `1K`, up to 2048 → `2K`, otherwise `4K`.
                    output_format:
                      type: string
                      enum:
                        - png
                        - jpeg
                        - webp
                      default: png
                      description: Image file format.
                    enable_safety_checker:
                      type: boolean
                      default: true
                      description: Run the upstream safety checker.
                  additionalProperties: false
                  description: Generation parameters.
            examples:
              single_edit:
                summary: Edit one image
                value:
                  model: blackforestlabs/flux-3-klein/edit
                  input:
                    prompt: >-
                      Turn the daytime street into a rainy night scene with
                      glowing shop windows
                    image_urls:
                      - https://example.com/street.jpg
                    'n': 1
                    resolution: 1K
                    size: '16:9'
                    output_format: png
              compose:
                summary: Combine two images at 2K with callback
                value:
                  model: blackforestlabs/flux-3-klein/edit
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      Place the bottle from the first image on the beach in the
                      second image, keep the label readable
                    image_urls:
                      - https://example.com/bottle.png
                      - https://example.com/beach.jpg
                    'n': 2
                    resolution: 2K
                    size: '4:3'
                    output_format: webp
      responses:
        '200':
          description: Task submitted
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - data
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                    description: HTTP status code.
                  data:
                    type: object
                    required:
                      - task_id
                      - status
                      - created_time
                    properties:
                      task_id:
                        type: string
                        description: >-
                          Task ID. Use it with [Query Task
                          Status](/api-manual/task-management/status).
                      status:
                        type: string
                        enum:
                          - not_started
                        description: Initial task status.
                      created_time:
                        type: string
                        format: date-time
                        description: Time the task was created (ISO 8601).
              example:
                code: 200
                data:
                  task_id: task-unified-1762160000-abc123
                  status: not_started
                  created_time: '2026-11-03T10:30:00'
        '400':
          description: >-
            Invalid input, unsupported field, inaccessible media, or
            insufficient credits
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '401':
          description: Invalid credentials
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '404':
          description: Unknown or disabled model
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '408':
          description: Request timed out
          content:
            text/plain:
              schema:
                type: string
              example: Request timeout
        '422':
          description: Invalid JSON or non-object request body
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '429':
          description: Rate or API key credit limit exceeded
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '502':
          description: Unable to create the upstream generation task
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '503':
          description: The requested model is temporarily unavailable
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        All API endpoints require Bearer Token authentication


        Get your API Key:


        Go to **Dashboard → API Key** ([API Key Management
        Page](https://vidgo.ai/apis/dashboard/api-key)) to get your API Key


        Add it to the request header:


        ```

        Authorization: Bearer VIDGO_API_KEY

        ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.