POST
/
v1
/
videos
curl -X POST "https://api.applerouter.ai/v1/video/generations" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-v1",
    "prompt": "An astronaut walking on the moon",
    "duration": 5,
    "width": 1280,
    "height": 720
  }'
{
  "task_id": "abcd1234efgh",
  "status": "queued"
}

Overview

Submit a video generation task, supporting text-to-video and image-to-video. Returns a task ID for status polling.
model
string
required
Model/Style ID (e.g. kling-v1, sora-2, veo_3_1)
prompt
string
required
Text description of the video (Prompt)
image
string
Input image URL or Base64 for image-to-video
duration
number
Video Duration (seconds)
width
integer
Video Width (pixels)
height
integer
Video Height (pixels)
fps
integer
Video Frame Rate (FPS)
seed
integer
Random Seed for reproducibility
curl -X POST "https://api.applerouter.ai/v1/video/generations" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-v1",
    "prompt": "An astronaut walking on the moon",
    "duration": 5,
    "width": 1280,
    "height": 720
  }'
{
  "task_id": "abcd1234efgh",
  "status": "queued"
}

Workflow

  1. Create Task: Submit video generation request
  2. Check Status: Use GET /v1/video/generations/{task_id} to check progress
  3. Download: When completed, get video URL from response
Video generation may take several minutes. Please poll at reasonable intervals (e.g., 10-30 seconds).

Authorizations

Authorization
string
header
required

使用 Bearer Token 认证。格式: Authorization: Bearer sk-xxxxxx

Body

multipart/form-data
model
string
required

支持 veo-3.1 系列模型(包括 -fast, -landscape 及 -fl 特价版)

Example:

"veo-3.1"

prompt
string
required

提示词

Example:

"让牛快乐的跳科目三"

seconds
string
required

时长

Example:

"8"

input_reference
file
required

垫图

size
string
required

720x1280 竖屏 1280x720 横屏

Example:

"16x9"

watermark
string
Example:

"false"

Response

200 - application/json
id
string
required
object
string
required
model
string
required
status
string
required
progress
integer
required
created_at
integer
required
seconds
string
required
size
string
required