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

# Flux 2 pro · Image to image

> Ideal for high-quality image manipulation, style transfer, and sequential editing workflows

[← Flux](/api-documentation/ai-generation/models/flux)

**Model name:** `flux-2-pro/edit`\
**Generation type:** `image_to_image`\
**Endpoint:** [`POST /api/asset_generator/`](/api-reference/ai-generation/post-ai-generation)

## Pricing

**0.5** credits per output.

Prices are per output. When a request asks for several outputs, the charge is this price times the number of outputs.

## Quick start

The example uses sample media from our CDN. Swap in publicly accessible URLs for your own files.

<CodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.creatify.ai/api/asset_generator/ \
    --header 'Content-Type: application/json' \
    --header 'X-API-ID: your-api-id' \
    --header 'X-API-KEY: your-api-key' \
    --data '{
      "model_name": "flux-2-pro/edit",
      "input_params": {
        "prompt": "Place her in a bright café with soft morning light.",
        "image_urls": [
          "https://d35ghwdno3nak3.cloudfront.net/tutorial/avatar-aurora/recommendation-4.jpg"
        ]
      }
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.creatify.ai/api/asset_generator/",
      headers={"X-API-ID": "your-api-id", "X-API-KEY": "your-api-key"},
      json={
          "model_name": "flux-2-pro/edit",
          "input_params": {
              "prompt": "Place her in a bright café with soft morning light.",
              "image_urls": [
                  "https://d35ghwdno3nak3.cloudfront.net/tutorial/avatar-aurora/recommendation-4.jpg"
              ]
          },
      },
  )
  print(response.json()["id"])
  ```
</CodeGroup>

## Input parameters

Send these fields in `input_params`.

<ParamField body="prompt" type="string" required>
  Prompt

  Minimum characters: `1`.
  Maximum characters: `2500`.
</ParamField>

<ParamField body="image_urls" type="string[]" required>
  List of URLs of input images for editing

  Minimum items: `1`.
  Maximum items: `3`.
</ParamField>

<ParamField body="seed" type="integer">
  Random seed for reproducibility. If None, a random seed is chosen.
</ParamField>

<ParamField body="image_size" type="string" default={"portrait_16_9"}>
  The size of the image to generate. The width and height must be between 512 and 2048 pixels.

  Allowed values: `"square_hd"`, `"square"`, `"portrait_4_3"`, `"portrait_16_9"`, `"landscape_4_3"`, `"landscape_16_9"`.
</ParamField>

<ParamField body="num_images" type="integer" default={1}>
  The number of images to generate.

  Minimum: `1`.
  Maximum: `1`.
</ParamField>

<Accordion title="Complete JSON schema">
  ```json theme={null}
  {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "required": [
      "prompt",
      "image_urls"
    ],
    "properties": {
      "seed": {
        "type": "integer",
        "title": "Seed",
        "description": "Random seed for reproducibility. If None, a random seed is chosen.",
        "x-advance-settings": true
      },
      "prompt": {
        "type": "string",
        "title": "Prompt",
        "maxLength": 2500,
        "minLength": 1
      },
      "image_size": {
        "enum": [
          "square_hd",
          "square",
          "portrait_4_3",
          "portrait_16_9",
          "landscape_4_3",
          "landscape_16_9"
        ],
        "type": "string",
        "title": "Aspect ratio",
        "default": "portrait_16_9",
        "x-ui-name": "aspect_ratio",
        "description": "The size of the image to generate. The width and height must be between 512 and 2048 pixels."
      },
      "image_urls": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "title": "Image URLs",
        "maxItems": 3,
        "minItems": 1,
        "description": "List of URLs of input images for editing"
      },
      "num_images": {
        "type": "integer",
        "title": "Num Images",
        "default": 1,
        "maximum": 1,
        "minimum": 1,
        "x-ui-name": "output_nums",
        "description": "The number of images to generate."
      }
    }
  }
  ```
</Accordion>

## Response

The request returns the task with `status: "initializing"`. Poll [GET /api/asset\_generator/\{id}/](/api-reference/ai-generation/get-ai-generation-) until `status` is `done` or `failed`, or pass a `webhook_url` to be notified. A finished task lists its files in `assets` and the credits it charged in `credits_used`.


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