---
title: "Generate Video"
method: POST
path: "/tools/generate/video"
tags: ["accepts-api-key"]
---

# Generate Video

`POST /tools/generate/video`

## Request

- Base URL: `https://api.tellers.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tellers.ai/tools/generate/video`
- Auth: none declared

## Headers

- `x-api-key` string, nullable
- `authorization` string, nullable

## Request body

- GenerateVideoRequest
  - `prompt` string, required: Text prompt describing the video to generate.
  - `model` 'p-video' | 'p-video-2' | 'kling' | 'kling-pro' | 'runway' | 'wan' | 'ltx' | 'seedance' | 'minimax-h3-max': Model to use.
  - `format` '16:9' | '9:16', nullable: Aspect ratio. Defaults to 16:9. Left unset so an explicit choice can be told from the default — a model that would ignore it rejects it rather than silently producing another shape.
  - `resolution` '480p' | '720p' | '768p' | '1080p', nullable: Output resolution. Supported values vary by model: p-video supports 720p/1080p; wan/seedance support 480p/720p; minimax-h3-max supports 480p/768p; kling/runway ignore this field.
  - `input_frame` union: Start (first) frame. An asset id for the default frame, or an object pinning `timestamp_seconds` / `is_last_frame`.
    - string
    - AssetFrameRef: A single frame of an asset — mirrors the tools' ``AssetFrame``.
      - `asset_id` string, required: The asset to take the frame from.
      - `timestamp_seconds` number, nullable: Which frame to take, in seconds, when the asset is a video. Ignored if `is_last_frame` is true. Defaults to the first frame.
      - `is_last_frame` boolean: Take the asset's final frame, ignoring `timestamp_seconds`.
      - `crop` AssetImageCropRef: Optional edge insets — mirrors the tools' ``AssetImageCrop``.
        - `crop_l` number, nullable
        - `crop_r` number, nullable
        - `crop_t` number, nullable
        - `crop_b` number, nullable
  - `output_frame` union: End (last) frame. An asset id for the default frame, or an object pinning `timestamp_seconds` / `is_last_frame`. Not every model accepts an end frame — see GET /tools/models.
    - string
    - AssetFrameRef: A single frame of an asset — mirrors the tools' ``AssetFrame``.
      - `asset_id` string, required: The asset to take the frame from.
      - `timestamp_seconds` number, nullable: Which frame to take, in seconds, when the asset is a video. Ignored if `is_last_frame` is true. Defaults to the first frame.
      - `is_last_frame` boolean: Take the asset's final frame, ignoring `timestamp_seconds`.
      - `crop` AssetImageCropRef: Optional edge insets — mirrors the tools' ``AssetImageCrop``.
        - `crop_l` number, nullable
        - `crop_r` number, nullable
        - `crop_t` number, nullable
        - `crop_b` number, nullable
  - `input_audio` union: Audio reference. An asset id for the whole asset, or an object pinning `start_time` / `end_time`. Not every model accepts audio, and only some accept a range — see GET /tools/models.
    - string
    - AssetPeriodRef: A time range within an asset — mirrors the tools' ``AssetPeriod``.
      - `asset_id` string, required: The asset to take the range from.
      - `start_time` number, nullable: Range start in seconds. Defaults to 0.
      - `end_time` number, nullable: Range end in seconds. Ignored if `till_the_end` is true. Defaults to the end of the asset.
      - `till_the_end` boolean: Extend to the end of the asset, ignoring `end_time`.
  - `output_path` string, nullable: Where to save the video in the library: a file path ('Folder/name.mp4') or a folder ending with '/' ('Folder/'). Defaults to the model's own folder.

## Response `200`

Successful Response

- GenerateVideoResponse
  - `asset_id` string, required
  - `duration_seconds` number, required

## Other responses

- `402`: Not enough Tellers tokens to run this tool. The call was refused before the tool ran, so nothing was charged. Buy more tokens or wait for the next subscription grant.
- `403`: The account's email is not verified yet, so it cannot spend tokens. Nothing was charged. `detail.code` is `EMAIL_NOT_VERIFIED`.
- `413`: The account is already using all the storage its plan allows, and a generation would add another file. Nothing was charged and no provider was called. Delete files or move to a plan with more storage; `GET /users/me` reports both the usage and the quota.
- `422`: Validation Error

---

[API](https://skmtc.dev/tellers/apis/tellers-api.md) - [All operations](https://skmtc.dev/tellers/apis/tellers-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tellers/apis/tellers-api/revisions/fdaa0fa44a26?raw)
