> ## 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.

# Z Image Turbo LoRA Image Generation

This is an asynchronous API and only returns an async task\_id. You need to use the task\_id to call the task result query API to get the generated 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="mask" type="string">
  Mask image URL for inpainting. White areas are repainted, while black areas remain unchanged. Must be used with image\_url.
</ParamField>

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

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

<ParamField body="size" type="string" default="1024*1024">
  Pixel dimensions of the generated image (width\*height).
</ParamField>

<ParamField body="loras" type="object[]" default="[]">
  List of LoRAs to apply (up to 3).

  Array length: 0 - 3

  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="path" type="string" required={true}>
      URL or path to the LoRA weights.
    </ParamField>

    <ParamField body="scale" type="number" default={1}>
      Scaling factor for the LoRA weights. Used to scale the LoRA weights before merging with the base model.

      Value range: \[0, 4]
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="prompt" type="string" required={true}>
  Positive prompt for generation.
</ParamField>

<ParamField body="strength" type="number">
  Transformation strength for image-to-image (img2img). 0.0-0.3 enhancement mode, 0.3-0.6 balanced transformation, 0.6-0.8 style transfer, 0.8-1.0 creative repainting. Must be used with image\_url.

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

<ParamField body="image_url" type="string">
  Reference image URL for image-to-image (img2img).
</ParamField>

<ParamField body="output_format" type="string" default="webp">
  Output image format. Supports jpeg, png, webp.

  Allowed values: `jpeg`, `png`, `webp`
</ParamField>

<ParamField body="enable_base64_output" type="boolean" default={false}>
  If enabled, the output will be encoded as a BASE64 string instead of a URL.
</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>
