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

# Flux 2 Flex Image Generation

This is an asynchronous API that only returns an async task\_id. You need to use the task\_id to call the task result query API to obtain the image editing result.

<Tip>
  This is an **asynchronous** API and will only return the async task's task\_id. You should use this task\_id to request the [Query Task Result API](/en/docs/models/reference-get-async-task-result) to retrieve the generated result.
</Tip>

## Request Headers

<ParamField header="Content-Type" type="string" required={true}>
  Enum value: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format: Bearer \{\{API Key}}.
</ParamField>

## Request Body

<ParamField body="seed" type="integer" default={-1}>
  Random seed used for generation. -1 means using a random seed. Range: -1 to 2147483647

  Value range: \[-1, 2147483647]
</ParamField>

<ParamField body="size" type="string">
  Pixel dimensions of the output media (width\*height), with each dimension ranging from 256 to 1536 pixels
</ParamField>

<ParamField body="images" type="string[]">
  List of input image URLs for editing the images to be processed. Supports up to 3 images.

  Array length: 1 - 3
</ParamField>

<ParamField body="prompt" type="string" required={true}>
  Text prompt describing the desired editing effect for the image
</ParamField>

## Response Information

<ResponseField name="task_id" type="string" required={true}>
  Use the task\_id to request the [Query Task Result API](/en/docs/models/reference-get-async-task-result) to retrieve the generated output.
</ResponseField>
