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

# Video Generation

> Submit asynchronous video generations, monitor their status, and download completed output.

Video generation is asynchronous. Submit a job, poll its Planck job ID until it completes, and then download an output.

<Steps>
  <Step title="Submit a generation">
    Copy the exact model ID from the model registry. The selected model determines which durations, resolutions, aspect ratios, image inputs, and audio options are accepted.

    ```bash theme={null}
    curl https://api.inquantum.ai/v1/videos \
      -H "Authorization: Bearer $PLANCK_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "openrouter/alibaba/wan-2.6",
        "prompt": "A paper airplane gliding above a quiet city at sunrise",
        "duration": 5,
        "resolution": "720p",
        "aspect_ratio": "16:9",
        "generate_audio": false
      }'
    ```

    The gateway returns `202 Accepted` with an `id`, `status`, and `polling_url`.

    <Note>
      In this example, `openrouter/alibaba/wan-2.6` is the model ID. Requests still
      go to the Planck endpoint with your Planck API key; there is no separate
      OpenRouter integration step.
    </Note>
  </Step>

  <Step title="Poll the job">
    ```bash theme={null}
    curl https://api.inquantum.ai/v1/videos/VIDEO_JOB_ID \
      -H "Authorization: Bearer $PLANCK_API_KEY"
    ```

    Continue until `status` is completed or failed. A completed response includes an `outputs` array.
  </Step>

  <Step title="Download an output">
    ```bash theme={null}
    curl -L https://api.inquantum.ai/v1/videos/VIDEO_JOB_ID/content \
      -H "Authorization: Bearer $PLANCK_API_KEY" \
      --output generation.mp4
    ```

    For jobs with multiple outputs, select one with `?index=0`.
  </Step>
</Steps>

## Request Validation

Video capabilities are model-specific. Unsupported fields and invalid combinations are rejected before a job is created. For example, use `duration` rather than `seconds`, and use either `size` or `resolution` plus `aspect_ratio`.

## Billing and Tracking

Planck-paid video requests reserve funds before submission and reconcile the generation as its durable job progresses. Requests include `Planck-Operation: video_generation`, the Planck generation ID, submission status, model, and billing state.

Some models remain BYOK-only when their usage cannot be priced exactly before submission. Polling and downloads require a valid Planck API key for the submitting organization.

See the [Video Generation API reference](/rest/ai-gateway/post-v1-videos) for the lifecycle and response fields.
