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

# Create video

> Queue a video generation job with any supported model and poll until complete.

Creates a video generation with any supported video model. Credits are charged when the job is queued. Poll [Poll video status](/api-reference/video/poll-status) with `generation.id` until `status` is `COMPLETED` or `FAILED`.

## Supported models

Pass the model key in the `model` body field. Default: `seedance-2.0`.

| Model key           | Name                     | Duration             | Aspect ratios                               | Sound           |
| ------------------- | ------------------------ | -------------------- | ------------------------------------------- | --------------- |
| `kling-standard`    | Kling v3.0 Standard      | 1–15s                | `16:9`, `1:1`, `9:16`                       | ✅ `sound`       |
| `kling-pro`         | Kling v3.0 Pro           | 3–15s                | `16:9`, `1:1`, `9:16`                       | ✅ `sound`       |
| `veo`               | Google Veo 3.1           | 4, 6, or 8s          | `16:9`, `9:16`                              | ✅ `sound`       |
| `veo-fast`          | Google Veo 3.1 Fast      | 4, 6, or 8s          | `16:9`, `9:16`                              | ✅ `sound`       |
| `veo-lite`          | Google Veo 3.1 Lite      | 4, 6, or 8s          | `16:9`, `9:16`                              | ✅ `sound`       |
| `sora-2`            | OpenAI Sora 2            | 4, 8, 12, 16, or 20s | `16:9`, `9:16`                              | —               |
| `sora-2-pro`        | OpenAI Sora 2 Pro        | 4, 8, 12, 16, or 20s | `16:9`, `9:16`                              | —               |
| `wan`               | Alibaba Wan 2.6          | 5–15s                | `16:9`, `9:16`                              | —               |
| `seedance-2.0`      | Seedance 2.0 (1080p)     | 4–15s                | `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16` | `generateAudio` |
| `seedance-2.0-fast` | Seedance 2.0 Fast (720p) | 4–15s                | `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16` | `generateAudio` |

All models run on WaveSpeed and share the same form inputs: `image` / `lastImage` for start/end frames, `referenceImages` (plus `referenceVideos` / `referenceAudios` on Seedance) for reference-guided generation, `negativePrompt`, `sound` / `generateAudio`, and `resolution` (Veo / Wan).

## Headers

| Header            | Required | Description                                                          |
| ----------------- | -------- | -------------------------------------------------------------------- |
| `Authorization`   | Yes      | `Bearer uns_live_*` API key or Clerk JWT                             |
| `Idempotency-Key` | No       | Max 128 chars. Replays the same response for 24h on API key requests |
| `Content-Type`    | Yes      | `application/json`                                                   |

## Request body

<ParamField body="prompt" type="string" required>
  Text prompt describing the video to generate.
</ParamField>

<ParamField body="model" type="string">
  Video model key from the table above. Default: `seedance-2.0`.
</ParamField>

<ParamField body="duration" type="integer">
  Length in seconds (integer). Default: `5`. The valid range depends on the model (see table above).
</ParamField>

<ParamField body="aspectRatio" type="string">
  Aspect ratio. Default: `16:9`. Valid values depend on the model (see table above).
</ParamField>

<ParamField body="negativePrompt" type="string">
  What to avoid in the video. Supported by Kling, Veo, and Wan models.
</ParamField>

<ParamField body="sound" type="boolean">
  Generate audio with the video. Default: `false`. Supported by Kling v3 and Veo 3.1 models — increases credit cost.
</ParamField>

<ParamField body="resolution" type="string">
  `720p` or `1080p` for Veo 3.1 and Wan 2.6 models. Seedance resolution is fixed by the model variant.
</ParamField>

<ParamField body="image" type="string">
  Start image URL for image-to-video. On Seedance models this switches to first/last-frame mode.
</ParamField>

<ParamField body="lastImage" type="string">
  End/last image URL, for models that support start/end frames.
</ParamField>

<ParamField body="referenceImages" type="string[]">
  Reference image URLs. Veo 3.1 reference mode; Seedance omni reference (up to 9 public image URLs).
</ParamField>

<ParamField body="referenceVideos" type="string[]">
  **Seedance only** — up to 3 public video URLs. Using video references increases credit cost.
</ParamField>

<ParamField body="referenceAudios" type="string[]">
  **Seedance only** — up to 3 public audio URLs.
</ParamField>

<ParamField body="generateAudio" type="boolean">
  **Seedance only** — generate a soundtrack/audio for the video. Default: `false`.
</ParamField>

## Credits

| Model               | Pricing                                                               |
| ------------------- | --------------------------------------------------------------------- |
| `kling-standard`    | 5s: 20 · 10s: 35 · 15s: 50 — with `sound`: 25 / 50 / 75               |
| `kling-pro`         | 5s: 45 · 10s: 85 · 15s: 125 — with `sound`: 65 / 125 / 190            |
| `veo`               | 9 credits/second — with `sound`: 18 credits/second                    |
| `veo-fast`          | 4.5 credits/second — with `sound`: 6.75 credits/second (rounded up)   |
| `veo-lite`          | 3.6 credits/second (rounded up)                                       |
| `sora-2`            | 4s: 20 · 8s: 35 · 12s: 50 · 16s: 65 · 20s: 80                         |
| `sora-2-pro`        | 4s: 50 · 8s: 95 · 12s: 145 · 16s: 190 · 20s: 240                      |
| `wan`               | 720p — 5s: 20 · 10s: 40 · 15s: 60; 1080p — 5s: 30 · 10s: 60 · 15s: 90 |
| `seedance-2.0`      | 5s: 40 · 10s: 80 · 15s: 100 — with `referenceVideos`: 80 / 140 / 200  |
| `seedance-2.0-fast` | 5s: 20 · 10s: 40 · 15s: 60 — with `referenceVideos`: 40 / 80 / 100    |

## Async completion

Poll `GET /video/status/{id}` — see [Poll video status](/api-reference/video/poll-status). No webhooks.

## Response

```json theme={null}
{
  "success": true,
  "generation": {
    "id": "cm123abc",
    "status": "QUEUED"
  },
  "model": "seedance-2.0",
  "creditsDeducted": 40,
  "creditsRemaining": 60
}
```

## Examples

<RequestExample>
  ```bash Text-to-video (Seedance) theme={null} theme={null}
  curl -X POST "https://mvp.tryunsora.com/api/v1/videos/create" \
    -H "Authorization: Bearer uns_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "prompt": "Slow cinematic drone shot over misty mountains at sunrise",
      "aspectRatio": "16:9",
      "duration": 5
    }'
  ```

  ```bash Veo 3.1 with sound theme={null} theme={null}
  curl -X POST "https://mvp.tryunsora.com/api/v1/videos/create" \
    -H "Authorization: Bearer uns_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "veo",
      "prompt": "A barista pours latte art in a cozy cafe, ambient chatter",
      "aspectRatio": "16:9",
      "duration": 8,
      "sound": true
    }'
  ```

  ```bash Kling Pro image-to-video theme={null} theme={null}
  curl -X POST "https://mvp.tryunsora.com/api/v1/videos/create" \
    -H "Authorization: Bearer uns_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "kling-pro",
      "prompt": "The character turns and smiles at the camera",
      "image": "https://cdn.example.com/start.jpg",
      "duration": 5
    }'
  ```

  ```bash Sora 2 theme={null} theme={null}
  curl -X POST "https://mvp.tryunsora.com/api/v1/videos/create" \
    -H "Authorization: Bearer uns_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "sora-2",
      "prompt": "A golden retriever surfs a small wave at sunset, slow motion",
      "duration": 8
    }'
  ```

  ```bash Seedance omni reference theme={null} theme={null}
  curl -X POST "https://mvp.tryunsora.com/api/v1/videos/create" \
    -H "Authorization: Bearer uns_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "seedance-2.0",
      "prompt": "Character walks through neon alley, same outfit as reference",
      "aspectRatio": "9:16",
      "duration": 10,
      "referenceImages": ["https://cdn.example.com/ref.jpg"]
    }'
  ```

  ```bash Seedance first/last frame theme={null} theme={null}
  curl -X POST "https://mvp.tryunsora.com/api/v1/videos/create" \
    -H "Authorization: Bearer uns_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "seedance-2.0",
      "prompt": "Smooth transition from day to night over the city skyline",
      "aspectRatio": "16:9",
      "duration": 5,
      "image": "https://cdn.example.com/frame-start.jpg",
      "lastImage": "https://cdn.example.com/frame-end.jpg"
    }'
  ```
</RequestExample>

## Errors

| HTTP  | When                                                             |
| ----- | ---------------------------------------------------------------- |
| `400` | Invalid model, prompt, mode, ratio, duration, or reference files |
| `401` | Invalid auth                                                     |
| `402` | Insufficient credits                                             |
| `404` | User not found                                                   |
| `429` | Rate limit exceeded                                              |
| `500` | Server error                                                     |


## OpenAPI

````yaml POST /videos/create
openapi: 3.1.0
info:
  title: Unsora API
  version: 1.2.0
  description: >-
    Public API for Unsora integrations. Authenticate with Clerk JWT or
    uns_live_* API key. API keys are rate-limited to 60 requests/minute and
    support idempotency keys. Async jobs complete via polling GET
    /image/status/{id}.
servers:
  - url: https://mvp.tryunsora.com/api/v1
    description: Versioned API (recommended)
security: []
tags:
  - name: Clippings
  - name: Connect
  - name: Image Generations
  - name: Music Generations
  - name: Influencer Studio
  - name: Posts
  - name: Thumbnails
  - name: User
  - name: Video Generations
paths:
  /videos/create:
    post:
      tags:
        - Video Generations
      summary: Create video generation
      description: >-
        Queue a video generation with any supported video model (Kling v3, Veo
        3.1, Sora 2, Wan 2.6, Seedance 2.0).
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            maxLength: 128
          description: >-
            Optional. Replays the original response for 24h when using an API
            key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVideoRequest'
      responses:
        '200':
          description: Job queued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateVideoResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
      security:
        - bearerAuth: []
components:
  schemas:
    CreateVideoRequest:
      type: object
      description: >-
        Create a video generation. `model` selects the video model. Use
        image/lastImage for start/end frames, referenceImages (plus
        referenceVideos/referenceAudios on Seedance) for reference-guided
        generation.
      properties:
        prompt:
          type: string
        model:
          type: string
          default: seedance-2.0
          enum:
            - kling-standard
            - kling-pro
            - veo
            - veo-fast
            - veo-lite
            - sora-2
            - sora-2-pro
            - wan
            - seedance-2.0
            - seedance-2.0-fast
          description: >-
            Video model to generate with. See the model table in the docs for
            durations, ratios and features.
        duration:
          type: integer
          default: 5
          description: >-
            Video length in seconds. Valid range depends on the model: Kling
            Standard 1-15, Kling Pro 3-15, Veo 3.1 (all) 4-8, Sora 2 / Sora 2
            Pro 4-20, Wan 2.6 5-15, Seedance 2.0 (both) 4-15.
        aspectRatio:
          type: string
          default: '16:9'
          description: >-
            Aspect ratio. Kling: 16:9, 1:1, 9:16. Veo: 16:9, 9:16. Seedance:
            21:9, 16:9, 4:3, 1:1, 3:4, 9:16.
        negativePrompt:
          type: string
          description: What to avoid in the video. Supported by Kling, Veo and Wan models.
        resolution:
          type: string
          description: >-
            Output resolution (720p or 1080p) for Wan 2.6. Seedance output
            resolution is fixed (2.0: 1080p, 2.0 Fast: 720p).
        sound:
          type: boolean
          default: false
          description: >-
            Generate audio. Supported by Kling v3 and Veo 3.1 models (increases
            credit cost).
        image:
          type: string
          format: uri
          description: >-
            Start image URL for image-to-video. On Seedance models this switches
            to first/last-frame mode.
        lastImage:
          type: string
          format: uri
          description: End/last image URL, for models that support start/end frames.
        referenceImages:
          type: array
          items:
            type: string
            format: uri
          description: >-
            Reference image URLs. Veo 3.1 reference mode; Seedance omni
            reference (up to 9).
        referenceVideos:
          type: array
          items:
            type: string
            format: uri
          maxItems: 3
          description: >-
            Seedance omni reference only — up to 3 video URLs. Using video
            references increases credit cost.
        referenceAudios:
          type: array
          items:
            type: string
            format: uri
          maxItems: 3
          description: Seedance omni reference only — up to 3 audio URLs.
        generateAudio:
          type: boolean
          default: false
          description: Seedance only — generate a soundtrack/audio for the video.
      required:
        - prompt
    CreateVideoResponse:
      type: object
      properties:
        success:
          type: boolean
        generation:
          type: object
          properties:
            id:
              type: string
            status:
              type: string
              enum:
                - QUEUED
                - PROCESSING
                - COMPLETED
                - FAILED
          required:
            - id
            - status
        model:
          type: string
          enum:
            - seedance_2.0
        creditsDeducted:
          type: number
        creditsRemaining:
          type: number
      required:
        - success
        - generation
        - model
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
        error:
          type: string
        code:
          type: string
        message:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Clerk session JWT or Unsora API key (uns_live_*)

````