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

# Imagen 4 Fast

> 使用 Imagen4-Fast 模型快速生成图片（异步）

使用 [Google DeepMind](https://deepmind.google) 的 Imagen 4 Fast 模型快速生成图片。

**模型特点：**

* **极速生成** - 比 Imagen 3 快 10 倍，适合高频率生成场景
* **高性价比** - 成本仅为标准版一半，适合批量生成
* **保持质量** - 在提速的同时保持出色的图像质量
* **SynthID 水印** - 内置隐形数字水印


## OpenAPI

````yaml /cn/openapi.yaml POST /generate/k/imagen4-fast
openapi: 3.0.0
info:
  contact:
    email: support@sinancode.com
    name: API Support
    url: https://sinancode.com/support
  description: AI 模型任务调度平台 API
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  termsOfService: https://sinancode.com/terms-of-service
  title: TikTomato API
  version: '1.0'
servers:
  - url: https://api.sinancode.com/v1
    description: Production server
security: []
paths:
  /generate/k/imagen4-fast:
    post:
      tags:
        - public
      summary: Imagen4-Fast 图片生成
      description: 使用 Imagen4-Fast 模型快速生成图片（异步）
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ka.CreateImagen4FastTaskRequest'
        description: 任务参数
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dto.CreateTaskResponse'
        '400':
          description: 参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '500':
          description: 服务器错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
      security:
        - AccessToken: []
components:
  schemas:
    ka.CreateImagen4FastTaskRequest:
      properties:
        aspect_ratio:
          default: '16:9'
          description: 宽高比（可选，默认 16:9）
          enum:
            - '1:1'
            - '16:9'
            - '9:16'
            - '3:4'
            - '4:3'
          example: '16:9'
          type: string
        negative_prompt:
          description: 反向提示词（可选）
          example: blurry, low quality
          type: string
        num_images:
          default: 1
          description: 生成图片数量（可选，1-4张，默认1）
          example: 1
          maximum: 4
          minimum: 1
          type: integer
        prompt:
          description: 提示词（必填，最大5000字符）
          example: a serene mountain landscape
          maxLength: 5000
          minLength: 1
          type: string
        seed:
          description: 随机种子（可选，整数类型）
          example: 0
          type: integer
      required:
        - prompt
      type: object
    dto.CreateTaskResponse:
      properties:
        task_id:
          description: Task ID
          example: 01234567-89ab-cdef-0123-456789abcdef
          type: string
      required:
        - task_id
      type: object
    apierror.ErrorResponse:
      properties:
        error_code:
          description: Machine-readable error code (e.g. TASK.INVALID_PARAMS)
          type: string
        message:
          description: User-friendly error message
          type: string
      type: object
  securitySchemes:
    AccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 请使用您的 API Token 进行认证

````