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

# Create video task

> Returns a task object immediately after create. Upstream submission is completed asynchronously by the platform; clients obtain progress and results via the get endpoint.

**Path:** `POST https://api.omniall.ai/v1/videos`

Media fields accept publicly accessible URLs, or files uploaded with the create request as `multipart/form-data`.

Auth: `Authorization: Bearer sk-...`



## OpenAPI

````yaml openapi/magi-video.yaml POST /v1/videos
openapi: 3.1.0
info:
  title: Omniall AI — MAGI-2 video
  version: 1.0.0
  description: >-
    Create, poll, and download video tasks via OpenAI-compatible video APIs.
    Supports text-to-video, image-to-video, and multimodal reference.


    **Model:** `magi-2` (see [Model Square](https://omniall.ai/pricing))


    **Auth:** `Authorization: Bearer sk-...`
servers:
  - url: https://api.omniall.ai
security: []
paths:
  /v1/videos:
    post:
      tags:
        - MAGI-2 video
      summary: Create video task
      description: >-
        Returns a task object immediately after create. Upstream submission is
        completed asynchronously by the platform; clients obtain progress and
        results via the get endpoint.


        **Path:** `POST https://api.omniall.ai/v1/videos`


        Media fields accept publicly accessible URLs, or files uploaded with the
        create request as `multipart/form-data`.


        Auth: `Authorization: Bearer sk-...`
      operationId: magiCreateVideo
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            example: Bearer sk-...
          description: Bearer API key, e.g. `Bearer sk-...`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - prompt
              description: MAGI-2 video create body (`POST /v1/videos`).
              properties:
                model:
                  type: string
                  description: >-
                    Model name. The example model is the real id and can be used
                    directly: `magi-2`.
                  example: magi-2
                prompt:
                  type: string
                  description: Text prompt. Chinese and English are supported.
                  example: Slow camera push into the reference scene
                  minLength: 1
                  maxLength: 20000
                mode:
                  type: string
                  description: Auto-inferred when omitted.
                  enum:
                    - i2v
                    - r2v
                    - t2v
                  example: t2v
                resolution:
                  type: string
                  description: Defaults to `1080p` when unrecognized.
                  enum:
                    - 1080p
                  default: 1080p
                  example: 1080p
                aspect_ratio:
                  type: string
                  description: Can also be inferred from `size`.
                  enum:
                    - '21:9'
                    - '16:9'
                    - '4:3'
                    - '1:1'
                    - '3:4'
                    - '9:16'
                  default: '16:9'
                  example: '16:9'
                size:
                  type: string
                  description: Optional; used to infer `aspect_ratio`.
                duration:
                  type: integer
                  description: Field name `seconds` is also accepted. Range 4–30 seconds.
                  minimum: 4
                  maximum: 30
                  default: 5
                  example: 5
                seconds:
                  description: >-
                    Alias of `duration`. Prefer a string such as `"5"`; the
                    gateway also accepts a number. Range 4–30.
                  oneOf:
                    - type: string
                      pattern: ^(?:[4-9]|[12][0-9]|30)$
                      example: '5'
                    - type: integer
                      minimum: 4
                      maximum: 30
                      example: 5
                audio:
                  type: boolean
                  description: Whether the output includes an audio track.
                  default: true
                  example: true
                reference_images:
                  type: array
                  maxItems: 10
                  items:
                    type: string
                  description: Reference images, up to 10.
                reference_videos:
                  type: array
                  maxItems: 5
                  items:
                    type: string
                  description: Reference videos, up to 5 clips, total duration ≤ 15s.
                reference_audios:
                  type: array
                  maxItems: 5
                  items:
                    type: string
                  description: Reference audios, up to 5 clips.
            examples:
              Text-to-video:
                summary: Text-to-video
                value:
                  model: magi-2
                  prompt: Slow camera push into the scene
                  duration: 5
                  resolution: 1080p
                  aspect_ratio: '16:9'
                  audio: true
              Image-to-video:
                summary: Image-to-video
                value:
                  model: magi-2
                  prompt: Slow camera push into the reference scene
                  duration: 5
                  resolution: 1080p
                  aspect_ratio: '16:9'
                  reference_images:
                    - https://cdn.example.com/ref.png
              Multimodal-reference:
                summary: Multimodal reference
                value:
                  model: magi-2
                  prompt: Keep character and mood; gentle camera push
                  duration: 5
                  resolution: 1080p
                  aspect_ratio: '16:9'
                  reference_images:
                    - https://cdn.example.com/a.png
                  reference_videos:
                    - https://cdn.example.com/clip.mp4
                  reference_audios:
                    - https://cdn.example.com/sfx.mp3
      responses:
        '200':
          description: Returns a task object with id, status, progress, and related fields.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Task id
                  object:
                    type: string
                    example: video
                  model:
                    type: string
                  status:
                    type: string
                    description: e.g. `queued` / `in_progress` / `completed` / `failed`
                  progress:
                    type: integer
                  created_at:
                    type: integer
                  seconds:
                    type: string
              example:
                id: task_abc123
                object: video
                model: magi-2
                status: queued
                progress: 0
                created_at: 1710000000
                seconds: '5'
        '202':
          description: Returns a task object with id, status, progress (Accepted).
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  object:
                    type: string
                  model:
                    type: string
                  status:
                    type: string
                  progress:
                    type: integer
                  created_at:
                    type: integer
              example:
                id: task_abc123
                object: video
                model: magi-2
                status: queued
                progress: 0
                created_at: 1710000000
        '400':
          description: Invalid request
        '401':
          description: Unauthorized

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.