Skip to main content
POST
/
v1
/
videos
curl --request POST \
  --url https://api.powertokens.ai/v1/videos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "wan2.7-i2v",
  "prompt": "A cat walks from one end of the hallway to the other.",
  "media": [
    {
      "type": "first_frame",
      "url": "https://example.com/assets/start.png"
    },
    {
      "type": "last_frame",
      "url": "https://example.com/assets/end.png"
    }
  ],
  "seconds": "5",
  "size": "1080P"
}
'
{
  "id": "<string>",
  "task_id": "<string>",
  "object": "video",
  "model": "<string>",
  "progress": 123,
  "created_at": 123
}

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <token> in the request header.

Body

application/json
model
enum<string>
required

Ali wan2.7-i2v model.

Available options:
wan2.7-i2v
media
object[]
required

Multimodal input field. This scenario allows first_frame, last_frame, and driving_audio types. first_frame and last_frame are required; driving_audio is optional.

prompt
string

Optional text prompt. When omitted, generation relies primarily on the input media assets.

size
enum<string>
default:1080P

Supported output resolution tiers.

Available options:
720P,
1080P
seconds
enum<string>
default:5

Video duration as a string. Supports integer strings from 2 to 15.

Available options:
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15
negative_prompt
string

Optional negative prompt describing content you do not want in the video.

prompt_extend
boolean

Whether to enable intelligent prompt rewriting. Defaults to true.

watermark
boolean
default:false

Whether to add a watermark. Defaults to false.

seed
integer

Random seed. Automatically generated by the system when not provided.

Required range: 0 <= x <= 2147483647

Response

Submitted successfully. Returns an OpenAI-compatible video task object.

id
string

Public task ID.

task_id
string

Backward-compatible alias for the public task ID.

object
string
Example:

"video"

model
string

Model name.

status
enum<string>

Unified video task status.

Available options:
queued,
in_progress,
completed,
failed,
unknown
progress
integer

Task progress percentage.

created_at
integer<int64>

Creation time as a Unix timestamp (seconds).