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

# Sora 视频生成

> create video generation task



## OpenAPI

````yaml POST /sora/video/generate
openapi: 3.0.0
info:
  title: Sora AI
  description: API documentation for Sora AI
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.mountsea.ai
    description: API Gateway
security: []
tags:
  - name: sora
    description: ''
paths:
  /sora/video/generate:
    post:
      tags:
        - sora
      summary: create  video generation task
      description: create video generation task
      operationId: ApiPublicController_generateVideo
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateVideoDto'
      responses:
        '200':
          description: Task created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskIdDto'
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskIdDto'
      security:
        - bearerAuth: []
components:
  schemas:
    GenerateVideoDto:
      type: object
      properties:
        images:
          default: []
          description: >-
            images for video generation, can be an array of URLs or
            empty,currently only support 1 image
          type: array
          items:
            type: string
            format: uri
        model:
          enum:
            - sora-2
            - sora-2-pro
          type: string
          description: model for video generation,default is sora-2
          example: sora-2
        orientation:
          default: landscape
          enum:
            - landscape
            - portrait
          type: string
          description: orientation for video generation,default is landscape
          example: landscape
        size:
          default: small
          enum:
            - small
            - large
          type: string
          description: >-
            size for video generation,default is Small，if model is
            sora-2-pro,size can be Large
          example: small
        duration:
          type: number
          default: 10
          description: >-
            duration for video generation，if model is sora-2,duration can be
            10,15, if model is sora-2-pro and size is Small,duration can be 25
          example: 10
          enum:
            - 10
            - 15
            - 25
        prompt:
          type: string
          maxLength: 5000
          description: >-
            prompt for video generation,max 5000 characters,if you want to use
            character @character_name,you need to separate with space
          example: cat running on the road
        removeWatermark:
          type: boolean
          default: true
          description: whether to remove watermark,default is false
          example: true
        editId:
          type: string
          description: >-
            video edit id, you can use this id to edit video, edit id is
            returned together with video url
          example: xxxxxxxxxxxxxxxxxxx
        styleId:
          type: string
          description: style id for video generation,default is anime
          enum:
            - anime
            - selfie
            - golden
            - handheld
            - festive
            - retro
            - news
            - chaos
            - vintage
            - comic
            - kakalaka
            - sitcom
          example: anime
        storyboard:
          type: boolean
          default: false
          description: >-
            whether to enable storyboard mode, if true, the prompt will be
            parsed as storyboard format
          example: false
      required:
        - model
        - prompt
    TaskIdDto:
      type: object
      properties:
        taskId:
          type: string
          description: task id, used to get task result later
      required:
        - taskId
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````