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

# Create video task

> Creates an asynchronous Seedance 2.0 video generation task.



## OpenAPI

````yaml /openapi.json post /v1/video/seedance-2
openapi: 3.1.0
info:
  title: Seedance 2.0 API
  version: 1.0.0
  description: >-
    API for creating Seedance 2.0 video tasks, checking task status, and
    retrieving API credit balance.
servers:
  - url: https://api.outai.top/api
security: []
paths:
  /v1/video/seedance-2:
    post:
      summary: Create video task
      description: Creates an asynchronous Seedance 2.0 video generation task.
      operationId: createVideoTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVideoTaskRequest'
            example:
              model: seedance_2_0
              prompt: A futuristic city at sunset
              function_mode: omni_reference
              ratio: '16:9'
              duration: 5
              image_urls: []
              audio_urls: []
              video_urls: []
      responses:
        '200':
          description: Task created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateVideoTaskResponse'
        '400':
          description: Request failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_request:
                  value:
                    code: 400
                    trace_id: 45c30d76f06549b199a3775544515689
                    message: Detailed error message
                    data: null
        '422':
          description: Business-level failure
          content:
            application/json:
              examples:
                insufficient_credits:
                  value:
                    code: 300111
                    trace_id: 45c30d76f06549b199a3775544515689
                    message: Insufficient API credits
                parallel_limit:
                  value:
                    code: 300111
                    trace_id: 45c30d76f06549b199a3775544515689
                    message: Parallel task limit reached.
      security:
        - bearerAuth: []
components:
  schemas:
    CreateVideoTaskRequest:
      type: object
      required:
        - prompt
      properties:
        model:
          type: string
          enum:
            - seedance_2_0
            - seedance_2_0_fast
          default: seedance_2_0
        prompt:
          type: string
          description: Text prompt for video generation.
        function_mode:
          type: string
          enum:
            - first_last_frames
            - omni_reference
          default: omni_reference
        ratio:
          type: string
          enum:
            - '21:9'
            - '16:9'
            - '4:3'
            - '1:1'
            - '3:4'
            - '9:16'
          default: '16:9'
        duration:
          type: integer
          minimum: 4
          maximum: 15
          default: 5
        image_urls:
          type: array
          items:
            type: string
            format: uri
          maxItems: 9
          default: []
        audio_urls:
          type: array
          items:
            type: string
            format: uri
          maxItems: 3
          default: []
        video_urls:
          type: array
          items:
            type: string
            format: uri
          maxItems: 3
          default: []
      description: >-
        Validation notes: prompt is required; model, ratio, and function_mode
        must use supported values; duration must be between 4 and 15; when
        function_mode=first_last_frames, at most 2 images are allowed; when
        function_mode=omni_reference, audio-only input is not allowed, so if
        audio_urls is provided, include at least one image or video.
    CreateVideoTaskResponse:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/CreateVideoTaskData'
    ErrorResponse:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          properties:
            data:
              type: 'null'
              example: null
    EnvelopeBase:
      type: object
      properties:
        code:
          type: integer
          example: 200
        trace_id:
          type: string
          example: 45c30d76f06549b199a3775544523689
        message:
          type:
            - string
            - 'null'
          example: null
    CreateVideoTaskData:
      type: object
      properties:
        task_id:
          type: string
          example: task_id
        status:
          type: string
          example: running
        created_at:
          type: string
          format: date-time
        credits_cost:
          type: number
          example: 12
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````