cURL
curl --request POST \ --url https://tokens.flex.ai/v1/videos/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "model": "Wan-AI/Wan2.2-T2V-A14B-Diffusers", "prompt": "<string>", "duration_seconds": 2 } '
{ "id": "<string>", "status": "queued", "created": 123 }
Async: returns a job id immediately. Poll GET /v1/videos/generations/{id} until status is completed (typically 50–90s for a 2-second clip).
GET /v1/videos/generations/{id}
status
completed
Virtual API key. Create one from the FlexAI dashboard. Pass as Authorization: Bearer sk-xxxx.
Authorization: Bearer sk-xxxx
"Wan-AI/Wan2.2-T2V-A14B-Diffusers"
1 <= x <= 5
Job accepted
queued
processing
Was this page helpful?