Skip to main content
Video generation is asynchronous. POST /v1/videos/generations returns a public task identity and usually a poll_url; the final video appears on later status responses. When the selected Seedance model can use the TokenLab material library, image URLs and supported inline data URLs are prepared as reusable TokenLab materials before generation. If preparation takes longer than 60 seconds, retry after the returned auto_material_asset_ids become ACTIVE. If the selected model cannot use the material library, ordinary image inputs continue on the regular image path.

OpenAI-Style And Volc-Compatible Video APIs

Use /v1/videos/generations for TokenLab’s unified video API across models. If you are migrating an existing Seedance 2.0 integration that already uses Volc-style content[] or Action requests, use the Seedance compatibility endpoints under /api/v3. Both styles use TokenLab Bearer API keys and async polling, but their request and response shapes are different.

Supported Operations

Use explicit operation in production. TokenLab can infer some operations from inputs, but explicit operation values make validation, support, and retries clearer.
OperationRequired or typical inputUse case
text-to-videopromptGenerate from text only
image-to-videoimage_url or compatible imageAnimate a starting image
reference-to-videoreference_images and optional video_urls / audio_urls on supported modelsKeep identity, style, or asset references
start-end-to-videostart_image, end_imageControl first and last frames
video-to-videovideo_url or model-specific task_idTransform or upscale an existing clip
motion-controlimage_url plus video_urlApply motion reference to a subject
audio-to-videoaudio_urlAudio-conditioned video flows
video-extensiontask_id, extend_at, or model-specific extension fieldsContinue a generated video

Model Discovery

curl "https://api.tokenlab.sh/v1/models?recommended_for=video" \\
  -H "Authorization: Bearer sk-your-api-key"
Use the model IDs shown by TokenLab in model, then choose feature variants with operation and the corresponding media inputs. Examples include wan-2.7, happyhorse-1.0, viduq3, viduq3-mix, pixverse-v6, kling-3.0-video, veo3.1, and seedance-2.0; do not use operation-specific suffixes as TokenLab model names. Read the selected model detail before relying on specialized fields such as reference_images, kling_elements, output_audio, duration, resolution, or aspect_ratio.

Create Request

curl https://api.tokenlab.sh/v1/videos/generations \\
  -H "Authorization: Bearer sk-your-api-key" \\
  -H "Content-Type: application/json" \\
  -d '{
    "model": "veo3.1",
    "operation": "text-to-video",
    "prompt": "A calm cinematic shot of a cat walking through a sunlit garden",
    "duration": 4,
    "aspect_ratio": "16:9"
  }'
For production media input, prefer public https URLs over inline data: URLs. If you use temporary URLs, keep them valid until TokenLab finishes creating the task.

Inputs And Model-Specific Fields

  • Veo 3 family requests default to audio-on when output_audio is omitted. Set it explicitly when the model supports the toggle and your UX depends on sound.
  • kling_elements is for kling-3.0-video image-conditioned requests. Reference each element in prompt as @name; do not combine it with output_audio=true.
  • For the Seedance 2.0 family, read the Seedance 2.0 video models guide before using 4K output, Fast/Mini resolution caps, or multimodal reference inputs.
  • For grok-imagine-video, video-to-video uses a public .mp4 video_url; model-specific limits such as duration and resolution must come from the model details.

PixVerse and HappyHorse

ModelOperationsInputsResolutionDurationAudio selector
pixverse-c1, pixverse-v6text-to-video, image-to-video, start-end-to-video, reference-to-videoprompt; image_url; start_image + end_image; reference_images360p, 540p, 720p, 1080pAny integer from 1 to 15 secondsoutput_audio, default false
pixverse-v5.6text-to-video, image-to-video, start-end-to-video, reference-to-videoSame fields as C1 and V6360p, 540p, 720p, 1080p5, 8, or 10 seconds; 1080p supports 5 or 8 secondsoutput_audio, default false
happyhorse-1.0text-to-video, image-to-video, reference-to-video, video-to-videoprompt; image_url; reference_images; video_url + reference_images720p, 1080p3 to 15 seconds for generation operations; video-to-video output is capped at 15 secondsDo not send output_audio
On TokenLab, the PixVerse models above do not accept operation=video-extension.
curl https://api.tokenlab.sh/v1/videos/generations \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "pixverse-v6",
    "operation": "image-to-video",
    "prompt": "A slow camera move through a neon-lit street",
    "image_url": "https://example.com/start.jpg",
    "resolution": "1080p",
    "duration": 5,
    "output_audio": true
  }'

Polling Results

Use the returned poll_url first. If you need a fixed endpoint, use GET /v1/tasks/{id} with the same id / task_id from the create response. Completed video tasks may return video_url, video, or videos depending on the model and output count. Treat billing_transaction_id as a billing identifier, not as a task identifier.

Common Pitfalls

  • Do not hard-code old video status paths; prefer poll_url.
  • Do not combine first-frame fields with dedicated reference-image flows unless the model details allows it.
  • Do not assume duration describes input reference video length; it usually controls generated output length.
  • Do not retry create requests after a timeout without checking whether a task was already created.

API Reference

TopicReference
Create VideoCreate Video
Get Video StatusGet Video Status
Get Task StatusGet Task Status
Cancel TaskCancel Task
Billing & PricingBilling & Pricing