> ## 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 图像生成

这是一个异步 API，仅返回异步 task\_id。你需要使用 task\_id 调用任务结果查询 API 获取生成结果。

<Tip>
  这是一个**异步**API，只会返回异步任务的 task\_id。您应该使用该 task\_id 请求 [查询任务结果 API](/docs/models/reference-get-async-task-result) 来检索生成结果。
</Tip>

## 请求头

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

<ParamField header="Authorization" type="string" required={true}>
  Bearer 身份验证格式: Bearer \{\{API 密钥}}。
</ParamField>

## 请求体

<ParamField body="mask" type="string">
  局部重绘（inpaint）的蒙版图像 URL。白色区域为重绘区域，黑色区域保持不变。需配合 image\_url 使用
</ParamField>

<ParamField body="seed" type="integer" default={-1}>
  生成的随机种子。-1 表示使用随机种子

  取值范围：\[-1, 2147483647]
</ParamField>

<ParamField body="size" type="string" default="1024*1024">
  生成图像的像素尺寸（宽\*高）
</ParamField>

<ParamField body="loras" type="object[]" default="[]">
  要应用的 LoRA 列表（最多 3 个）

  数组长度：0 - 3

  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="path" type="string" required={true}>
      LoRA 权重的 URL 或路径
    </ParamField>

    <ParamField body="scale" type="number" default={1}>
      LoRA 权重的缩放比例。用于在与基础模型合并前缩放 LoRA 权重

      取值范围：\[0, 4]
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="prompt" type="string" required={true}>
  生成的正向提示词
</ParamField>

<ParamField body="strength" type="number">
  图生图（img2img）的变换强度。0.0-0.3 增强模式，0.3-0.6 平衡变换，0.6-0.8 风格转换，0.8-1.0 创意重绘。需配合 image\_url 使用

  取值范围：\[0, 1]
</ParamField>

<ParamField body="image_url" type="string">
  图生图（img2img）的参考图像 URL
</ParamField>

<ParamField body="output_format" type="string" default="webp">
  输出图像的格式。支持 jpeg、png、webp

  可选值：`jpeg`, `png`, `webp`
</ParamField>

<ParamField body="enable_base64_output" type="boolean" default={false}>
  如果启用，输出将编码为 BASE64 字符串而不是 URL
</ParamField>

## 响应信息

<ResponseField name="task_id" type="string" required={true}>
  使用 task\_id 请求 [查询任务结果 API](/docs/models/reference-get-async-task-result) 来检索生成的输出。
</ResponseField>
