> ## 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.

# Veo 3.1 图像转视频

> 使用 Google Veo 3.1 模型从 1-2 张图像生成视频（异步），支持首尾帧插值

使用 [Google DeepMind](https://deepmind.google) 的 Veo 3.1 模型将图片转换为视频。

**模型特点：**

* **双模式支持** - 单图动画或首尾帧过渡两种生成模式
* **角色一致性** - 跨场景保持人物外观一致
* **音频同步** - 自动生成匹配的音效和环境音
* **高清输出** - 1080P 画质，真实物理效果


## OpenAPI

````yaml /cn/openapi.yaml POST /generate/k/veo3-image-to-video
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/veo3-image-to-video:
    post:
      tags:
        - public
      summary: Veo 3.1 图像转视频
      description: 使用 Google Veo 3.1 模型从 1-2 张图像生成视频（异步），支持首尾帧插值
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ka.CreateVeo3ImageToVideoTaskRequest'
        description: Task parameters
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dto.CreateTaskResponse'
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
      security:
        - AccessToken: []
components:
  schemas:
    ka.CreateVeo3ImageToVideoTaskRequest:
      properties:
        aspectRatio:
          default: '16:9'
          description: 宽高比（可选）- 视频宽高比，默认 16:9
          enum:
            - '16:9'
            - '9:16'
            - Auto
          example: '16:9'
          type: string
        enableTranslation:
          default: true
          description: 启用翻译（可选）- 启用翻译，默认 true
          example: true
          type: boolean
        imageUrls:
          description: |-
            图片 URL 列表（必填）- 用于视频生成的图片 URL
            1张图片：从单张图片生成视频；2张图片：首尾帧生成视频
          example:
            - https://example.com/image1.jpg
          items:
            type: string
          maxItems: 2
          minItems: 1
          type: array
        model:
          default: veo3_fast
          description: 模型（可选）- veo3（质量优先）或 veo3_fast（速度优先），默认 veo3_fast
          enum:
            - veo3
            - veo3_fast
          example: veo3_fast
          type: string
        prompt:
          description: 提示词（必填）- 视频生成的文本描述
          example: animate the scene with smooth camera movement
          minLength: 1
          type: string
        seeds:
          description: 随机种子（可选）- 范围 10000-99999
          example: 12345
          maximum: 99999
          minimum: 10000
          type: integer
        watermark:
          description: 水印（可选）- 水印标识
          example: ''
          type: string
      required:
        - imageUrls
        - 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 进行认证

````