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

# flux-2-pro

> 使用 FLUX.2 [pro] 根据文本描述生成图片。支持最高 4MP 分辨率和多参考图一致性。接口为同步调用，直接返回 Base64 编码的图片数据。



## OpenAPI

````yaml en/api-reference/model-api/blackforestlabs/openapi/flux-2-pro/openapi.yaml POST /v1/images/generations
openapi: 3.1.0
info:
  title: FLUX.2 [pro]
  description: 通过 Starrise AI API 调用 Black Forest Labs FLUX.2 [pro] 文生图模型
  version: 1.0.0
servers:
  - url: https://ai.alad.com
security:
  - bearerAuth: []
paths:
  /v1/images/generations:
    post:
      summary: 生成图片
      description: >-
        使用 FLUX.2 [pro] 根据文本描述生成图片。支持最高 4MP 分辨率和多参考图一致性。接口为同步调用，直接返回 Base64
        编码的图片数据。
      operationId: createFlux2Pro
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                  enum:
                    - flux-2-pro
                  description: 模型 ID
                  example: flux-2-pro
                prompt:
                  type: string
                  description: 图片描述文字。
                  example: 一只可爱的北极熊宝宝
                'n':
                  type: integer
                  minimum: 1
                  maximum: 4
                  default: 1
                  description: 生成图片数量。
                size:
                  type: string
                  description: 输出图片尺寸，如 `1024x1024`。支持最高 4MP 分辨率。
                  example: 1024x1024
                output_format:
                  type: string
                  enum:
                    - jpeg
                    - png
                  description: 输出图片格式。
                  example: jpeg
                seed:
                  type: integer
                  description: 随机种子，用于复现生成结果。
      responses:
        '200':
          description: 图片生成成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  created:
                    type: integer
                    description: 创建时间戳
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        b64_json:
                          type: string
                          description: Base64 编码的图片数据。
        '400':
          description: 请求参数有误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````