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

# 生成滑杆

> 无需重写提示词，即可调节 Krea 2 生成的强度、复杂度与动感。

生成滑杆是三个数值控件——`intensity`、`complexity` 和 `movement`——它们在图像生成*之前*塑造 Krea 2 的创作方向，同时保持你的提示词不变。它们由训练进 Krea 2 的 LoRA 提供支持，并直接在 API 中暴露。

<Tip>
  保持提示词不变，使用滑杆来决定模型**如何**解读它：风格化程度、构图密度，以及画面中包含多少动感。
</Tip>

## 三个滑杆

三个滑杆均接受 **−100 到 100** 之间的整数，**0 为中性**（不应用 LoRA）。

| 滑杆           | 负向       | 正向         |
| ------------ | -------- | ---------- |
| `intensity`  | 平淡、暗哑的图像 | 风格化强烈的图像   |
| `complexity` | 简约、干净的构图 | 杂乱、密集的构图   |
| `movement`   | 静态图像     | 强烈的姿态与镜头运动 |

<AccordionGroup>
  <Accordion title="intensity — 图像的风格化程度">
    推动整体输出的风格化程度。负值偏向暗哑、低调的呈现；正值则推向大胆、富有表现力且高度风格化的视觉。
  </Accordion>

  <Accordion title="complexity — 构图的密集程度">
    控制 Krea 2 在画面中塞入多少视觉信息。负值偏好干净、简约的构图（适合图标、编辑插画、产品摄影）。正值则产生更丰富、更繁忙、细节更多的场景。
  </Accordion>

  <Accordion title="movement — 画面中的动感强度">
    控制姿态张力与隐含的镜头运动。负值让主体保持静态、稳定；正值则带来动态姿态、运动模糊以及更强烈的镜头取景。
  </Accordion>
</AccordionGroup>

<Note>
  生成滑杆与 [`creativity`](/developers/krea-2/overview#creativity) **相互独立**。`creativity` 控制提示词扩展（Krea 2 对文本的字面遵循程度）；而滑杆塑造输出的视觉特征。
</Note>

## 请求

将三个字段的任意组合与你的提示词一同传入。省略某个字段等同于发送 `0`。

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.krea.ai/generate/image/krea/krea-2/medium \
    -H "Authorization: Bearer $KREA_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "prompt": "illustrated cafe table with a croissant, coffee cup, and an oversized vase of wild flowers",
      "aspect_ratio": "1:1",
      "resolution": "1K",
      "intensity": 40,
      "complexity": -60,
      "movement": 0
    }'
  ```

  ```javascript Node.js theme={null}
  import { Krea } from "@krea-ai/sdk";

  const krea = new Krea({ apiKey: process.env.KREA_API_KEY });

  const result = await krea.subscribe("image/krea/krea-2/medium", {
    input: {
      prompt: "cute poodle, city street, colorful illustration, playful composition",
      aspect_ratio: "1:1",
      resolution: "1K",
      intensity: 60,
      complexity: 20,
      movement: 80,
    },
  });

  console.log(result.data?.urls[0]);
  ```

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

  response = requests.post(
      "https://api.krea.ai/generate/image/krea/krea-2/medium",
      headers={
          "Authorization": f"Bearer {os.environ['KREA_API_TOKEN']}",
          "Content-Type": "application/json",
      },
      json={
          "prompt": "cinematic portrait of a samurai at dusk",
          "aspect_ratio": "4:5",
          "resolution": "1K",
          "intensity": 75,
          "complexity": 0,
          "movement": 30,
      },
  )
  response.raise_for_status()
  print(response.json()["job_id"])
  ```
</CodeGroup>

## 参数

| 字段           | 类型      | 范围         | 默认值 | 说明                         |
| ------------ | ------- | ---------- | --- | -------------------------- |
| `intensity`  | integer | −100 到 100 | `0` | 0 = 中性。负值 = 暗哑，正值 = 风格化强烈。 |
| `complexity` | integer | −100 到 100 | `0` | 0 = 中性。负值 = 简约，正值 = 杂乱／密集。 |
| `movement`   | integer | −100 到 100 | `0` | 0 = 中性。负值 = 静态，正值 = 强烈动感。  |

<Note>
  滑杆在**全部三个 Krea 2 变体**——`krea-2/medium`、`krea-2/large` 和 `krea-2/medium-turbo` 上均支持。它们不会改变单次生成的价格——参见[定价](/developers/krea-2/overview#pricing)。
</Note>

## 端点

| 变体               | 端点                                              |
| ---------------- | ----------------------------------------------- |
| **Medium**       | `POST /generate/image/krea/krea-2/medium`       |
| **Large**        | `POST /generate/image/krea/krea-2/large`        |
| **Medium Turbo** | `POST /generate/image/krea/krea-2/medium-turbo` |

## 设置建议

以下是一些通常效果不错的起点：

* **简洁设计、图标、编辑插画** — 降低 `complexity`（例如 `-60`），让 `movement` 保持在 `0` 附近。
* **电影感／时尚／角色创作** — 提高 `intensity`（例如 `+60`），加入少量 `movement`（例如 `+30`）。
* **世界观与表现力强的场景** — 将 `intensity` 与 `complexity` 都推向正值；如果想要动感张力，再增加 `movement`。
* **探索某个提示词** — 三个滑杆都从 `0` 开始，然后一次只改一个，这样你可以将视觉变化归因于具体的控件。

<Tip>
  生成滑杆可与[风格迁移](/developers/krea-2/style-transfer)和[情绪板](/developers/krea-2/moodboards)叠加使用——先用情绪板设定视觉方向，然后用滑杆微调该方向的表达强度。
</Tip>
