> ## 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.2 Flex Edit

> Use FLUX.2 Flex to rework images or combine references, guiding the subject, style, and composition through text.

<Tip>
  1. Submit the request with `VIDGO_API_KEY`. A `task_id` is returned immediately. Keep it until the task reaches `finished` or `failed`.
  2. Use [Query Task Status](/api-manual/task-management/status) to retrieve the result. If you provide a `callback_url`, Vidgo sends the result to your [webhook](/api-manual/task-management/webhooks) when the task finishes or fails.
</Tip>

# FLUX.2 Flex Edit

Use FLUX.2 Flex to rework images or combine references, guiding the subject, style, and composition through text.

## Available Models

* **blackforestlabs/flux-2-flex/edit** - Edit images using a prompt and image references.

## Output Options

### Image Size

* `size`: Required. Accepted values: `1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `3:2`, `2:3`, `auto`. `auto` uses the aspect ratio of the first image in `image_urls`.

### Resolution

* `resolution`: Required. Accepted values: `1K`, `2K`.

## Key Features

* Edit images using a prompt and image references.
* Accepts 1-8 images in `image_urls`.
* Choose from `1K`, `2K` output resolutions.

## Advanced Parameters

Set `model` and optional `callback_url` at the request root. Place all workflow parameters, including output options, inside `input`.

Send the input fields listed on this page. Each input URL is a public HTTP(S) URL.

### Prompt

* `prompt`: Required. Describe the requested changes. Length: **3-5,000 characters**.

### Image URLs

* `image_urls`: Required. Provide publicly accessible image URLs. Supply 1-8 items. Each item must be an HTTP(S) URL.

## Verified Example

This example was generated through the Vidgo API and is also the default example in the playground. Source and result images are hosted on the Vidgo CDN.

![Reference image 1](https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/input-01.png)

![Reference image 2](https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/input-02.png)

![Reference image 3](https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/input-03.png)

![Pip and the Glass Garden](https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/output.jpg)

```json theme={null}
{
  "code": 200,
  "data": {
    "task_id": "E4MB5ERGH360DFJI",
    "status": "finished",
    "files": [
      {
        "file_type": "image",
        "file_url": "https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/output.jpg"
      }
    ],
    "created_time": "2026-09-26T11:07:59",
    "error_message": null,
    "progress": 100
  }
}
```


## OpenAPI

````yaml api-manual/image-series/blackforestlabs-flux-2-flex-edit.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - FLUX.2 Flex Edit
  description: >-
    Use FLUX.2 Flex to rework images or combine references, guiding the subject,
    style, and composition through text.
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Image Series
      summary: FLUX.2 Flex Edit
      description: >-
        Send the fields shown for this workflow. Place `prompt`, `image_urls`,
        `size`, and `resolution` inside `input`. Each `image_urls` item is a
        public HTTP(S) URL.
      operationId: submit_blackforestlabs_flux_2_flex_edit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              additionalProperties: true
              properties:
                model:
                  type: string
                  example: blackforestlabs/flux-2-flex/edit
                input:
                  type: object
                  required:
                    - image_urls
                    - prompt
                    - resolution
                    - size
                  properties:
                    prompt:
                      type: string
                      minLength: 3
                      maxLength: 5000
                      description: >-
                        Text instructions for editing the reference images,
                        3-5,000 characters.
                    image_urls:
                      type: array
                      items:
                        type: string
                        format: uri
                        description: Public HTTP(S) image URL.
                      minItems: 1
                      maxItems: 8
                      description: Reference images, 1-8 public HTTP(S) URLs.
                    size:
                      type: string
                      enum:
                        - '1:1'
                        - '4:3'
                        - '3:4'
                        - '16:9'
                        - '9:16'
                        - '3:2'
                        - '2:3'
                        - auto
                      description: >-
                        Aspect ratio of the output image. `auto` uses the aspect
                        ratio of the first image in `image_urls`.
                    resolution:
                      type: string
                      enum:
                        - 1K
                        - 2K
                      description: Output image resolution.
                  additionalProperties: false
                callback_url:
                  type: string
                  nullable: true
                  description: >-
                    Optional public HTTP(S) endpoint for task completion
                    notifications. HTTPS is recommended. Omit, use null, or use
                    an empty string to disable callbacks.
              description: >-
                Keep model and callback_url at the root. Place workflow
                parameters inside input.
            examples:
              default:
                summary: Pip and the Glass Garden
                value:
                  model: blackforestlabs/flux-2-flex/edit
                  input:
                    prompt: >-
                      Create a children's picture-book illustration. Use image 1
                      as the exact character design for Pip the robot gardener:
                      the same round teal body, brass spout nose, amber lens
                      eyes, red knitted scarf, yellow rubber boots and tiny
                      brass watering can, with consistent proportions. Place Pip
                      inside the Victorian glasshouse from image 2, standing on
                      the wooden potting bench and carefully watering a row of
                      tomato seedlings in terracotta pots, with the white
                      cast-iron arches, mossy panes and hanging ferns clearly
                      recognisable. Render the whole scene in the risograph
                      print style of image 3: a limited palette of fluorescent
                      pink, teal, sunflower yellow and deep navy, visible grain,
                      halftone dots and slight layer misregistration on
                      off-white paper. Across the top, in large hand-lettered
                      risograph type, the title reads exactly "PIP AND THE GLASS
                      GARDEN". No other text, no watermark.
                    image_urls:
                      - >-
                        https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/input-01.png
                      - >-
                        https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/input-02.png
                      - >-
                        https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/input-03.png
                    size: '3:2'
                    resolution: 1K
              flex-edit-02:
                summary: Lakeside Cabin from a Pencil Sketch
                value:
                  model: blackforestlabs/flux-2-flex/edit
                  input:
                    prompt: >-
                      Turn the pencil sketch in image 1 into a photorealistic
                      architectural photograph at blue-hour dusk. Follow the
                      sketch geometry precisely: the same A-frame silhouette,
                      stone base, large triangular glass front, narrow deck
                      extending over the lake, chimney on the right roof slope,
                      two pines on the left, and the same camera angle. Build
                      the cabin from the materials in image 2: charred black
                      cedar with alligator texture on the roof slopes, rough
                      dark basalt for the base, brushed copper for the chimney
                      and flashing, and pale oiled oak for the deck. Warm
                      interior light glows through the glass, a thin wisp of
                      smoke rises from the chimney, and the still lake mirrors
                      the cabin under a deep blue sky with the last orange light
                      on the horizon. Crisp material detail, realistic
                      reflections, 24mm architectural lens. No people, no text,
                      no watermark.
                    image_urls:
                      - >-
                        https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/02/input-01.png
                      - >-
                        https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/02/input-02.png
                    size: '16:9'
                    resolution: 1K
              flex-edit-03:
                summary: Treasure Route on the Island Map
                value:
                  model: blackforestlabs/flux-2-flex/edit
                  input:
                    prompt: >-
                      Edit the map in image 1 by adding only two new hand-drawn
                      elements in the same ink-and-watercolour style: a bold red
                      dashed route line that starts at the small harbour on the
                      south coast, follows the existing dotted trail north
                      through the fern valley, and ends at the lighthouse on the
                      northern cape; and a large hand-painted red X in the
                      middle of the fern valley with a tiny closed wooden
                      treasure chest drawn beside it. Keep every existing
                      element of image 1 exactly as it is, including all six
                      English labels in their original positions ("Whale Bay",
                      "Old Lighthouse", "Fern Valley", "Salt Marsh", "Seal
                      Rocks", "Lantern Harbor"), the coastline, forests,
                      marshes, rocks, compass rose, dotted trails, sailboats,
                      parchment texture and colours. No new text, no watermark.
                    image_urls:
                      - >-
                        https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/03/input-01.png
                    size: '4:3'
                    resolution: 1K
              callback:
                summary: Receive a completion callback
                value:
                  model: blackforestlabs/flux-2-flex/edit
                  input:
                    prompt: >-
                      Create a children's picture-book illustration. Use image 1
                      as the exact character design for Pip the robot gardener:
                      the same round teal body, brass spout nose, amber lens
                      eyes, red knitted scarf, yellow rubber boots and tiny
                      brass watering can, with consistent proportions. Place Pip
                      inside the Victorian glasshouse from image 2, standing on
                      the wooden potting bench and carefully watering a row of
                      tomato seedlings in terracotta pots, with the white
                      cast-iron arches, mossy panes and hanging ferns clearly
                      recognisable. Render the whole scene in the risograph
                      print style of image 3: a limited palette of fluorescent
                      pink, teal, sunflower yellow and deep navy, visible grain,
                      halftone dots and slight layer misregistration on
                      off-white paper. Across the top, in large hand-lettered
                      risograph type, the title reads exactly "PIP AND THE GLASS
                      GARDEN". No other text, no watermark.
                    image_urls:
                      - >-
                        https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/input-01.png
                      - >-
                        https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/input-02.png
                      - >-
                        https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/input-03.png
                    size: '3:2'
                    resolution: 1K
                  callback_url: https://your-domain.com/callback
      responses:
        '200':
          description: Task submitted
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - data
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                  data:
                    type: object
                    required:
                      - task_id
                      - status
                      - created_time
                    properties:
                      task_id:
                        type: string
                      status:
                        type: string
                        enum:
                          - not_started
                          - running
                          - finished
                          - failed
                      created_time:
                        type: string
                        format: date-time
              example:
                code: 200
                data:
                  task_id: E4MB5ERGH360DFJI
                  status: running
                  created_time: '2026-09-26T11:07:59'
        '400':
          description: Invalid input, 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: {}
        '401':
          description: Invalid credentials
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '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: {}
        '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: {}
        '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: {}
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '502':
          description: Unable to create the generation task
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '503':
          description: Model configuration or capability is not approved
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Use VIDGO_API_KEY.

````