← Docs

Video Model Guide

Video generation is asynchronous. Request body shape differs by supplier — use the matching protocol tab.

1. Basic Calling Information

ItemDescription
Base URL https://tokenhub.link
Endpoints POST /v1/video/generations (create task)
GET /v1/video/tasks/{task_id}?model=<model> (poll)
Authentication Authorization: Bearer <TokenHub API Key>. Create the key in API Keys in console.
Model Identifier Use model in create body. See Model Catalog — e.g. wan2.7-t2v, tokenhub/happyhorse-1.0-t2v.
Polling Poll every 10–15s until terminal state. Pass the same model on poll URL.

2. Request body by supplier protocol

Create then poll. Pick the tab matching your model supplier.

2.1 Create Task

curl -sS "https://tokenhub.link/v1/video/generations" \
  -H "Authorization: Bearer $TOKENHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tokenhub/happyhorse-1.0-t2v",
    "prompt": "一只猫在草地奔跑,广角镜头,风格写实",
    "duration": 5,
    "width": 1280,
    "height": 720
  }'

You may also pass resolution + ratio (e.g. 720p + 16:9); the gateway converts them to width/height.

Create response:

{
  "id": "task_xxxxxxxx",
  "object": "video.generation.task",
  "status": "pending",
  "model": "tokenhub/happyhorse-1.0-t2v"
}

2.2 Query Task (Polling)

curl -sS "https://tokenhub.link/v1/video/tasks/task_xxxxxxxx?model=tokenhub/happyhorse-1.0-t2v" \
  -H "Authorization: Bearer $TOKENHUB_API_KEY"