---
title: "Submit a video generation job"
method: POST
path: "/v2/videos/generate"
tags: ["Videos"]
---

# Submit a video generation job

`POST /v2/videos/generate`

## Request

- Base URL: `https://api.apiframe.ai`
- URL: `https://api.apiframe.ai/v2/videos/generate`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Creates a video job. The `model` discriminator selects the family (Kling 2.1-3.0, Veo 2/3, Sora 2, Seedance 1-2, Hailuo, Luma, Wan 2.5-2.7, Runway Gen4, Midjourney Video, Grok Video) and unlocks the matching `<model>Params` block. Pricing for many video models is per-second; the route layer computes the multiplier from the requested `duration`.

## Headers

- `Idempotency-Key` string

## Request body

- union: Discriminated by `model`. Covers Kling 2.1-3.0, Veo 2/3, Sora 2, Seedance 1-2, Hailuo, Luma, Wan 2.5-2.7, Runway Gen4, Flux 3, Midjourney Video, Grok Video.
  - object
    - `prompt` string, required
    - `model` 'kling-2.1', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `klingParams` object
      - `start_image` string
      - `end_image` string
      - `negative_prompt` string
      - `mode` 'standard' | 'pro'
      - `duration` union
        - 5
        - 10
  - object
    - `prompt` string, required
    - `model` 'kling-2.1-master', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `klingParams` object
      - `start_image` string
      - `negative_prompt` string
      - `aspect_ratio` '16:9' | '9:16' | '1:1'
      - `duration` union
        - 5
        - 10
  - object
    - `prompt` string, required
    - `model` 'kling-2.5-turbo-pro', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `klingParams` object
      - `start_image` string
      - `end_image` string
      - `negative_prompt` string
      - `aspect_ratio` '16:9' | '9:16' | '1:1'
      - `duration` union
        - 5
        - 10
      - `guidance_scale` number
  - object
    - `prompt` string, required
    - `model` 'kling-2.6', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `klingParams` object
      - `start_image` string
      - `negative_prompt` string
      - `aspect_ratio` '16:9' | '9:16' | '1:1'
      - `duration` union
        - 5
        - 10
      - `generate_audio` boolean
  - object
    - `prompt` string, required
    - `model` 'kling-3.0', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `klingParams` object
      - `start_image` string
      - `end_image` string
      - `negative_prompt` string
      - `aspect_ratio` '16:9' | '9:16' | '1:1'
      - `duration` integer
      - `mode` 'standard' | 'pro' | '4k'
      - `generate_audio` boolean
      - `multi_prompt` string
  - object
    - `prompt` string, required
    - `model` 'kling-3.0-omni', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `klingParams` object
      - `start_image` string
      - `end_image` string
      - `negative_prompt` string
      - `aspect_ratio` '16:9' | '9:16' | '1:1'
      - `duration` integer
      - `mode` 'standard' | 'pro' | '4k'
      - `generate_audio` boolean
      - `keep_original_sound` boolean
      - `reference_images` string[]
      - `reference_video` string
      - `video_reference_type` 'feature' | 'base'
      - `multi_prompt` object[]
        - `prompt` string, required
        - `duration` integer, required
  - object
    - `prompt` string, required
    - `model` 'kling-3.0-motion-control', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `klingParams` object, required
      - `image` string, required
      - `video` string, required
      - `mode` 'std' | 'pro'
      - `character_orientation` 'image' | 'video'
      - `keep_original_sound` boolean
  - object
    - `prompt` string, required
    - `model` 'sora-2', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `soraParams` object
      - `duration` union
        - 4
        - 8
        - 10
        - 12
        - 15
      - `aspect_ratio` union
        - '16:9'
        - '9:16'
      - `resolution` 'standard' | 'high'
      - `start_image` string
  - object
    - `prompt` string, required
    - `model` 'sora-2-pro', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `soraParams` object
      - `duration` union
        - 4
        - 8
        - 10
        - 12
        - 15
      - `aspect_ratio` union
        - '16:9'
        - '9:16'
      - `resolution` 'standard' | 'high'
      - `start_image` string
  - object
    - `prompt` string, required
    - `model` 'seedance-1-lite', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `seedanceParams` object
      - `duration` union
        - 5
        - 10
      - `aspect_ratio` union
        - '21:9'
        - '16:9'
        - '4:3'
        - '1:1'
        - '3:4'
        - '9:16'
        - '9:21'
      - `resolution` '480p' | '720p' | '1080p'
      - `start_image` string
      - `end_image` string
      - `seed` integer
      - `camera_fixed` boolean
      - `generate_audio` boolean
  - object
    - `prompt` string, required
    - `model` 'seedance-1-pro', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `seedanceParams` object
      - `duration` union
        - 5
        - 10
      - `aspect_ratio` union
        - '21:9'
        - '16:9'
        - '4:3'
        - '1:1'
        - '3:4'
        - '9:16'
        - '9:21'
      - `resolution` '480p' | '720p' | '1080p'
      - `start_image` string
      - `end_image` string
      - `seed` integer
      - `camera_fixed` boolean
      - `generate_audio` boolean
  - object
    - `prompt` string, required
    - `model` 'seedance-1-pro-fast', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `seedanceParams` object
      - `duration` union
        - 5
        - 10
      - `aspect_ratio` union
        - '21:9'
        - '16:9'
        - '4:3'
        - '1:1'
        - '3:4'
        - '9:16'
        - '9:21'
      - `resolution` '480p' | '720p' | '1080p'
      - `start_image` string
      - `end_image` string
      - `seed` integer
      - `camera_fixed` boolean
      - `generate_audio` boolean
  - object
    - `prompt` string, required
    - `model` 'seedance-1.5-pro', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `seedanceParams` object
      - `duration` union
        - 4
        - 8
        - 12
      - `aspect_ratio` union
        - '21:9'
        - '16:9'
        - '4:3'
        - '1:1'
        - '3:4'
        - '9:16'
      - `resolution` '480p' | '720p' | '1080p'
      - `start_image` string
      - `end_image` string
      - `seed` integer
      - `camera_fixed` boolean
      - `generate_audio` boolean
  - object
    - `prompt` string, required
    - `model` 'seedance-2', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `seedanceParams` object
      - `duration` integer
      - `aspect_ratio` union
        - '21:9'
        - '16:9'
        - '4:3'
        - '1:1'
        - '3:4'
        - '9:16'
        - 'adaptive'
      - `start_image` string
      - `end_image` string
      - `reference_image_urls` string[]
      - `reference_video_urls` string[]
      - `reference_audio_urls` string[]
      - `generate_audio` boolean
      - `return_last_frame` boolean
      - `web_search` boolean
      - `seed` integer
      - `camera_fixed` boolean
      - `resolution` '480p' | '720p' | '1080p' | '4k'
  - object
    - `prompt` string, required
    - `model` 'seedance-2-fast', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `seedanceParams` object
      - `duration` integer
      - `aspect_ratio` union
        - '21:9'
        - '16:9'
        - '4:3'
        - '1:1'
        - '3:4'
        - '9:16'
        - 'adaptive'
      - `start_image` string
      - `end_image` string
      - `reference_image_urls` string[]
      - `reference_video_urls` string[]
      - `reference_audio_urls` string[]
      - `generate_audio` boolean
      - `return_last_frame` boolean
      - `web_search` boolean
      - `seed` integer
      - `camera_fixed` boolean
      - `resolution` '480p' | '720p'
  - object
    - `prompt` string, required
    - `model` 'seedance-2-mini', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `seedanceParams` object
      - `duration` integer
      - `aspect_ratio` union
        - '21:9'
        - '16:9'
        - '4:3'
        - '1:1'
        - '3:4'
        - '9:16'
        - 'adaptive'
      - `start_image` string
      - `end_image` string
      - `reference_image_urls` string[]
      - `reference_video_urls` string[]
      - `reference_audio_urls` string[]
      - `generate_audio` boolean
      - `return_last_frame` boolean
      - `web_search` boolean
      - `seed` integer
      - `camera_fixed` boolean
      - `resolution` '480p' | '720p'
  - object
    - `prompt` string, required
    - `model` 'seedance-2.5', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `seedanceParams` object
      - `duration` integer
      - `aspect_ratio` union
        - '21:9'
        - '16:9'
        - '4:3'
        - '1:1'
        - '3:4'
        - '9:16'
        - 'adaptive'
      - `resolution` '480p' | '720p'
      - `start_image` string
      - `end_image` string
      - `reference_image_urls` string[]
      - `reference_video_urls` string[]
      - `reference_audio_urls` string[]
      - `generate_audio` boolean
      - `return_last_frame` boolean
      - `seed` integer
  - object
    - `prompt` string, required
    - `model` 'midjourney-video', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `midjourneyVideoParams` object, required
      - `start_image` string, required
      - `motion` 'low' | 'high'
      - `resolution` 'sd' | 'hd'
  - object
    - `prompt` string, required
    - `model` 'veo-2', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `veoParams` object
      - `duration` union
        - 5
        - 6
        - 7
        - 8
      - `aspect_ratio` string
      - `seed` integer
      - `image` string
      - `resolution` '720p' | '1080p'
      - `generate_audio` boolean
      - `negative_prompt` string
      - `last_frame` string
      - `reference_images` string[]
  - object
    - `prompt` string, required
    - `model` 'veo-3', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `veoParams` object
      - `duration` union
        - 4
        - 6
        - 8
      - `aspect_ratio` string
      - `seed` integer
      - `image` string
      - `resolution` '720p' | '1080p'
      - `generate_audio` boolean
      - `negative_prompt` string
      - `last_frame` string
      - `reference_images` string[]
  - object
    - `prompt` string, required
    - `model` 'veo-3-fast', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `veoParams` object
      - `duration` union
        - 4
        - 6
        - 8
      - `aspect_ratio` string
      - `seed` integer
      - `image` string
      - `resolution` '720p' | '1080p'
      - `generate_audio` boolean
      - `negative_prompt` string
      - `last_frame` string
      - `reference_images` string[]
  - object
    - `prompt` string, required
    - `model` 'veo-3.1', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `veoParams` object
      - `duration` union
        - 4
        - 6
        - 8
      - `aspect_ratio` string
      - `seed` integer
      - `image` string
      - `resolution` '720p' | '1080p'
      - `generate_audio` boolean
      - `negative_prompt` string
      - `last_frame` string
      - `reference_images` string[]
  - object
    - `prompt` string, required
    - `model` 'veo-3.1-fast', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `veoParams` object
      - `duration` union
        - 4
        - 6
        - 8
      - `aspect_ratio` string
      - `seed` integer
      - `image` string
      - `resolution` '720p' | '1080p'
      - `generate_audio` boolean
      - `negative_prompt` string
      - `last_frame` string
      - `reference_images` string[]
  - object
    - `prompt` string, required
    - `model` 'veo-3.1-lite', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `veoParams` object
      - `duration` union
        - 4
        - 6
        - 8
      - `aspect_ratio` string
      - `seed` integer
      - `image` string
      - `resolution` '720p' | '1080p'
      - `negative_prompt` string
      - `last_frame` string
  - object
    - `prompt` string, required
    - `model` 'grok-imagine-video', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `grokImagineVideoParams` object
      - `duration` union
        - 6
        - 10
        - 15
      - `aspect_ratio` '1:1' | '16:9' | '9:16' | '4:3' | '3:4' | '3:2' | '2:3'
      - `reference_images` string[]
  - object
    - `prompt` string, required
    - `model` 'grok-imagine-video-1.5', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `grokImagineVideo15Params` object, required
      - `image` string, required
      - `duration` union
        - 6
        - 10
        - 15
      - `aspect_ratio` 'auto' | '1:1' | '16:9' | '9:16' | '4:3' | '3:4' | '3:2' | '2:3'
  - object
    - `prompt` string, required
    - `model` 'hailuo-02', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `hailuoParams` object
      - `duration` union
        - 6
        - 10
      - `resolution` '768p' | '1080p'
      - `image` string
      - `prompt_optimizer` boolean
      - `end_image` string
  - object
    - `prompt` string, required
    - `model` 'hailuo-2.3', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `hailuoParams` object
      - `duration` union
        - 6
        - 10
      - `resolution` '768p' | '1080p'
      - `image` string
      - `prompt_optimizer` boolean
  - object
    - `prompt` string, required
    - `model` 'hailuo-2.3-fast', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `hailuoParams` object
      - `duration` union
        - 6
        - 10
      - `resolution` '768p' | '1080p'
      - `image` string
      - `prompt_optimizer` boolean
  - object
    - `prompt` string, required
    - `model` 'hailuo-03', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `hailuoParams` object
      - `duration` integer
      - `resolution` '768p' | '2K'
      - `aspect_ratio` 'auto' | '21:9' | '16:9' | '4:3' | '1:1' | '3:4' | '9:16'
      - `image` string
      - `end_image` string
      - `base_video` string
      - `reference_images` string[]
      - `reference_videos` string[]
      - `reference_audios` string[]
  - object
    - `prompt` string, required
    - `model` 'luma-ray-2', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `lumaParams` object
      - `duration` union
        - 5
        - 9
      - `aspect_ratio` '16:9' | '9:16' | '1:1' | '4:3' | '3:4' | '21:9'
      - `start_image` string
      - `end_image` string
      - `loop` boolean
      - `concepts` string[]
  - object
    - `prompt` string, required
    - `model` 'luma-ray-flash-2', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `lumaParams` object
      - `duration` union
        - 5
        - 9
      - `aspect_ratio` '16:9' | '9:16' | '1:1' | '4:3' | '3:4' | '21:9'
      - `start_image` string
      - `end_image` string
      - `loop` boolean
      - `concepts` string[]
  - object
    - `prompt` string, required
    - `model` 'wan-2.5', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `wanParams` object
      - `duration` union
        - 5
        - 10
      - `image` string
      - `negative_prompt` string
      - `resolution` '480p' | '720p' | '1080p'
      - `audio` string
      - `seed` integer
      - `enable_prompt_expansion` boolean
  - object
    - `prompt` string, required
    - `model` 'wan-2.5-fast', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `wanParams` object
      - `duration` union
        - 5
        - 10
      - `image` string
      - `negative_prompt` string
      - `resolution` '720p' | '1080p'
      - `audio` string
      - `seed` integer
      - `enable_prompt_expansion` boolean
  - object
    - `prompt` string, required
    - `model` 'wan-2.6', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `wanParams` object
      - `duration` union
        - 5
        - 10
        - 15
      - `multi_shots` boolean
      - `image` string
      - `negative_prompt` string
      - `resolution` '720p' | '1080p'
      - `audio` string
      - `seed` integer
      - `enable_prompt_expansion` boolean
  - object
    - `prompt` string, required
    - `model` 'wan-2.6-flash', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `wanParams` object
      - `duration` union
        - 5
        - 10
        - 15
      - `multi_shots` boolean
      - `audio_enabled` boolean
      - `image` string
      - `negative_prompt` string
      - `resolution` '720p' | '1080p'
      - `audio` string
      - `seed` integer
      - `enable_prompt_expansion` boolean
  - object
    - `prompt` string, required
    - `model` 'wan-2.7', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `wan27Params` object
      - `image` string
      - `last_frame` string
      - `first_clip` string
      - `audio` string
      - `negative_prompt` string
      - `resolution` '720p' | '1080p'
      - `aspect_ratio` '16:9' | '9:16' | '1:1' | '4:3' | '3:4'
      - `duration` integer
      - `enable_prompt_expansion` boolean
      - `seed` integer
  - object
    - `prompt` string, required
    - `model` 'wan-2.7-r2v', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `wan27R2vParams` object, required
      - `reference_images` string[]
      - `reference_videos` string[]
      - `negative_prompt` string
      - `resolution` '720p' | '1080p'
      - `aspect_ratio` '16:9' | '9:16' | '1:1' | '4:3' | '3:4'
      - `duration` integer
      - `shot_type` 'single' | 'multi'
      - `seed` integer
  - object
    - `prompt` string
    - `model` 'wan-3.0', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `wan30Params` object
      - `image` string
      - `last_frame` string
      - `reference_images` string[]
      - `reference_videos` string[]
      - `reference_audios` string[]
      - `document` string
      - `webpage` string
      - `negative_prompt` string
      - `resolution` '480p' | '720p' | '1080p'
      - `aspect_ratio` 'adaptive' | '16:9' | '4:3' | '1:1' | '3:4' | '9:16'
      - `duration` integer
      - `audio_enabled` boolean
      - `enable_prompt_expansion` boolean
      - `seed` integer
  - object
    - `prompt` string, required
    - `model` 'happyhorse-1.0', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `happyhorse10Params` object
      - `image` string
      - `resolution` '720p' | '1080p'
      - `aspect_ratio` '16:9' | '9:16' | '1:1' | '4:3' | '3:4'
      - `duration` integer
      - `seed` integer
  - object
    - `prompt` string, required
    - `model` 'happyhorse-1.1', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `happyhorse11Params` object
      - `images` string[]
      - `resolution` '720p' | '1080p'
      - `aspect_ratio` '16:9' | '9:16' | '1:1' | '4:3' | '3:4'
      - `duration` integer
      - `seed` integer
  - object
    - `prompt` string, required
    - `model` 'runway-gen4-turbo', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `runwayParams` object
      - `duration` union
        - 5
        - 10
      - `image` string
      - `aspect_ratio` '16:9' | '9:16' | '1:1' | '4:3' | '3:4' | '21:9'
      - `seed` integer
  - object
    - `prompt` string, required
    - `model` 'runway-gen4.5', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `runwayParams` object
      - `duration` union
        - 5
        - 10
      - `image` string
      - `aspect_ratio` '16:9' | '9:16' | '1:1' | '4:3' | '3:4' | '21:9'
      - `seed` integer
  - object
    - `prompt` string, required
    - `model` 'flux-3', required
    - `webhookUrl` string, uri
    - `webhookEvents` string[]
    - `flux3Params` object
      - `images` string[]
      - `start_video` string
      - `aspect_ratio` 'auto' | '21:9' | '2:1' | '16:9' | '4:3' | '1:1' | '3:4' | '9:16'
      - `resolution` '720p' | '1080p'
      - `duration` integer
      - `generate_audio` boolean
      - `draft` boolean

## Response `202`

Job accepted and queued. Track via `GET /v2/jobs/{id}` or webhook.

- JobAccepted: Returned by every successful job submission.
  - `jobId` string, uuid, required
  - `status` 'QUEUED' | 'PROCESSING' | 'COMPLETED' | 'FAILED', required: Status at the moment the job record was persisted. Almost always `QUEUED`; idempotent replays may return the original status.

## Other responses

- `400`: Request body failed validation.
- `401`: Authentication failed (missing / invalid API key).
- `402`: Team has insufficient credits to run this model.
- `403`: Authenticated but the API key is inactive or lacks permission.
- `429`: Rate limit exceeded. Retry after the `Retry-After` seconds.
- `503`: Service temporarily unavailable (queue / DB outage). Retry with backoff.

---

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