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

# FLUX.1.1 [pro]

> 通过 Anyfast API 调用 Black Forest Labs FLUX.1.1 [pro] 文生图模型。

FLUX.1.1 \[pro] 是 Black Forest Labs 推出的高质量文生图模型，通过 Anyfast 提供。API 为**同步调用** — 直接返回 Base64 编码的图片数据。

## 核心能力

* **文生图** — 根据文字描述生成图片
* **灵活尺寸** — 通过 `size` 指定输出分辨率（推荐 `1024x1024`）
* **可复现** — 使用 `seed` 实现确定性生成
* **格式可选** — 支持 `jpeg` 或 `png` 输出

## 快速示例

<CodeGroup>
  ```bash cURL theme={null}
  curl https://www.anyfast.ai/v1/images/generations \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "flux-1.1-pro",
      "prompt": "一只可爱的北极熊宝宝",
      "size": "1024x1024"
    }'
  ```

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

  response = requests.post(
      "https://www.anyfast.ai/v1/images/generations",
      headers={"Authorization": "Bearer YOUR_API_KEY"},
      json={
          "model": "flux-1.1-pro",
          "prompt": "一只可爱的北极熊宝宝",
          "size": "1024x1024"
      }
  )

  result = response.json()
  # result["data"][0]["b64_json"] 包含 Base64 编码的图片
  ```
</CodeGroup>

## 参数说明

| 参数              | 类型      | 必填 | 说明                 |
| --------------- | ------- | -- | ------------------ |
| `model`         | string  | 是  | 固定为 `flux-1.1-pro` |
| `prompt`        | string  | 是  | 图片描述文字             |
| `n`             | integer | 否  | 生成张数（1–4），默认 `1`   |
| `size`          | string  | 否  | 输出尺寸，如 `1024x1024` |
| `output_format` | string  | 否  | `jpeg` 或 `png`     |
| `seed`          | integer | 否  | 随机种子，用于复现          |

## 响应字段

| 字段                | 说明             |
| ----------------- | -------------- |
| `data[].b64_json` | Base64 编码的图片数据 |
| `created`         | 创建时间戳          |

<Card title="API 参考" icon="code" href="/zh/api-reference/model-api/blackforestlabs/flux-1-1-pro">
  查看 FLUX.1.1 \[pro] 的交互式 API Playground。
</Card>

<script src="/feedback.js" />
