PieBox
Documentation

Video Generation

Text-to-video and image-to-video generation

Supports text-to-video (t2v) and image-to-video (i2v).

Request:

POST /v2/extend/video/generations

Parameters:

ParameterTypeRequiredDescription
modelstringYesModel name: seedance-2.0, seedance-2.0-fast, kling-v3.0-pro, kling-v3.0, veo-3.1, veo-3.1-fast
promptstringYesVideo description
imagestringNoFirst-frame image URL (if provided, generates image-to-video)
durationnumberNoVideo duration in seconds
aspect_ratiostringNoAspect ratio: 16:9, 9:16, 1:1
soundbooleanNoWhether to generate sound
negative_promptstringNoNegative prompt

Example (text-to-video):

curl https://tokenhub.piegateway.me/v2/extend/video/generations \
  -H "X-API-Key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2.0",
    "prompt": "a cat running on a grass field",
    "duration": 5
  }'

Example (image-to-video):

curl https://tokenhub.piegateway.me/v2/extend/video/generations \
  -H "X-API-Key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-v3.0-pro",
    "prompt": "make the person smile and turn their head",
    "image": "https://example.com/photo.jpg",
    "duration": 5
  }'

Check video generation result:

GET /v2/extend/video/tasks/{task_id}

Example:

curl https://tokenhub.piegateway.me/v2/extend/video/tasks/<task_id> \
  -H "X-API-Key: <your-api-key>"