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

# /v1/videos

> OpenAI 호환 비디오 모델을 사용하여 비동기 비디오 생성 작업을 생성합니다.

用于创建异步视频生成任务。

* 使用 `Authorization: Bearer {API_KEY}` 鉴权
* 典型流程是先创建任务，再轮询 `/v1/videos/{video_id}`，最后下载 `/v1/videos/{video_id}/content`
* 首次响应通常只返回任务对象，不会直接返回最终视频文件
* 长任务轮询更适合放在服务端或任务系统，不建议前端高频直连 provider


## OpenAPI

````yaml POST /v1/videos
openapi: 3.1.0
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://maas.apigo.ai
security:
  - bearerAuth: []
paths:
  /v1/videos:
    post:
      summary: OpenAI video generations
      description: >-
        Creates an asynchronous video generation task with OpenAI-compatible
        video models.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/OpenAIVideoCreateRequest'
      responses:
        '200':
          description: Successful video task creation response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIVideoTask'
              example:
                id: video_123456789
                object: video
                created_at: 1741570283
                model: sora-2
                status: pending
                progress: 50
                seconds: '4'
                size: 720x1280
                error:
                  code: <string>
                  message: <string>
                  type: <string>
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    OpenAIVideoCreateRequest:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          type: string
          description: Video model name, for example `sora-2`.
          example: sora-2
        prompt:
          type: string
          description: Text prompt for the video.
          example: 一只可爱的小猫在花园里玩耍
        size:
          type: string
          enum:
            - 720x1280
            - 1280x720
          default: 720x1280
          description: Video resolution.
        seconds:
          type: string
          enum:
            - '4'
            - '8'
            - '12'
          description: Video duration in seconds.
        input_reference:
          type: string
          format: binary
          description: Optional reference image file used as the first frame.
    OpenAIVideoTask:
      type: object
      required:
        - id
        - object
        - status
      properties:
        id:
          type: string
          description: Video task ID.
          example: video_123456789
        object:
          type: string
          enum:
            - video
          description: Object type.
        created_at:
          type: integer
          format: int64
          description: Creation timestamp.
        completed_at:
          type: integer
          format: int64
          description: Completion timestamp.
        model:
          type: string
          description: Model used for generation.
        status:
          type: string
          enum:
            - pending
            - in_progress
            - completed
            - failed
          description: Current task status.
        progress:
          type: integer
          minimum: 0
          maximum: 100
          description: Task progress percentage.
        expires_at:
          type: integer
          format: int64
          description: Expiration timestamp for the generated asset.
        seconds:
          type: string
          description: Video duration in seconds.
        size:
          type: string
          enum:
            - 720x1280
            - 1280x720
          description: Video resolution.
        remixed_from_video_id:
          type: string
          description: Source video ID when the task comes from remix.
        error:
          $ref: '#/components/schemas/OpenAIVideoError'
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    OpenAIVideoError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        type:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````