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

# Sora 2 Pro 图像转视频

> 使用 Sora 2 Pro 模型从图像生成高质量视频（异步）

使用 [OpenAI](https://openai.com) 的 Sora 2 Pro 模型将图片转换为专业级视频。

**模型特点：**

* **专业级动画** - 更自然流畅的运动效果和过渡
* **高质量输出** - 支持 standard/high 质量等级
* **精准控制** - 可指定运动方向、速度和镜头效果
* **音视频同步** - 自动生成匹配的高质量音频


## OpenAPI

````yaml /cn/openapi.yaml POST /generate/k/sora2-pro-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/sora2-pro-image-to-video:
    post:
      tags:
        - public
      summary: Sora2 Pro 图像转视频
      description: 使用 Sora 2 Pro 模型从图像生成高质量视频（异步）
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ka.CreateSora2ProImageToVideoTaskRequest'
        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.CreateSora2ProImageToVideoTaskRequest:
      properties:
        aspect_ratio:
          default: landscape
          description: 宽高比（可选，默认 landscape）
          enum:
            - portrait
            - landscape
          example: landscape
          type: string
        image_urls:
          description: 图片 URL 列表（必填，数组）
          example:
            - https://example.com/image1.jpg
          items:
            type: string
          minItems: 1
          type: array
        n_frames:
          default: 10
          description: 视频时长（可选，10或15秒，默认10）
          enum:
            - 10
            - 15
          example: 10
          type: integer
        prompt:
          description: 提示词（必填）
          example: animate the scene with smooth motion
          minLength: 1
          type: string
        remove_watermark:
          description: 移除水印（可选）
          example: false
          type: boolean
        size:
          default: standard
          description: 视频质量（可选，standard/high，默认 standard）
          enum:
            - standard
            - high
          example: standard
          type: string
      required:
        - image_urls
        - 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 进行认证

````