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

# POST Submit a video task

> Submit an async video-generation task. Currently routed to Kling. Endpoint variant (text-to-video / image-to-video / Omni-Video) is selected by which `metadata` fields you supply.

<div className="flex items-center gap-3 mb-6">
  <span className="inline-flex items-center px-3 py-1 rounded-full text-sm font-semibold bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 border border-green-200 dark:border-green-800">
    POST
  </span>

  <span className="text-lg font-medium text-gray-900 dark:text-gray-100">
    Submit a video task
  </span>
</div>

## OpenAPI

```yaml /openapi.yaml post /video/generations theme={null}
openapi: 3.1.0
info:
  title: ClearMaas API
  version: '2026.04'
  description: ClearMaas is an OpenAI-compatible API gateway.
  contact:
    name: ClearMaas Support
    email: support@clearmaas.com
    url: https://clearmaas.com
servers:
  - url: https://api.clearmaas.com/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /video/generations:
    post:
      tags:
        - Video
      summary: Submit a video task
      operationId: createVideoTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoGenerationRequest'
      responses:
        '200':
          description: Task accepted (async �?poll /v1/video/generations/{task_id})
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoSubmitResponse'
components:
  schemas:
    VideoGenerationRequest:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          type: string
          description: Kling video model with kling/ namespace prefix.
          example: kling/kling-v3-omni
          enum:
            - kling/kling-v2-master
            - kling/kling-v2-1-master
            - kling/kling-v2-5-turbo
            - kling/kling-v2-6
            - kling/kling-v3
            - kling/kling-video-o1
            - kling/kling-v3-omni
        prompt:
          type: string
          description: Required. Kling rejects empty/whitespace-only prompts.
        image:
          type: string
          description: Optional first-frame image URL for image-to-video.
        metadata:
          type: object
          description: |
            Free-form parameter bag. Universal: mode (std/pro/4k), aspect_ratio (16:9/9:16/1:1), duration (seconds).
            Text/i2v only: negative_prompt, cfg_scale, image_tail.
            Omni only: image_list, video_list, multi_shot, shot_type, multi_prompt, sound, watermark_info.
          additionalProperties: true
    VideoSubmitResponse:
      type: object
      properties:
        id:
          type: string
          description: Task ID. Same as task_id.
        task_id:
          type: string
        object:
          type: string
          enum: [video]
        model:
          type: string
        status:
          type: string
          enum: [queued]
        progress:
          type: integer
          minimum: 0
          maximum: 100
        created_at:
          type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key (sk-...)
      description: Pass `Authorization: Bearer sk-...` header.
```
