Skip to main content
The Dafty API generates short video clips from your images. Like image generation, it’s asynchronous: you create a job and poll it until it returns a video URL. Each request produces a single clip. There are two endpoints, split by what you’re trying to do: If you only have one image, use image-to-video. Reach for frames only when you have both ends of the shot and want the motion to land on a specific final frame. Frame inputs accept the same references as everywhere else: an https URL we ingest (SSRF-guarded, then re-hosted), or the id/url of one of your uploads or prior generations.

Animate a single image

Only image and prompt are required. duration (1-15s, default 6), resolution (480p|720p, default 720p), and audio (default true) have sensible defaults; negativePrompt is optional. The output video matches the reference image’s aspect ratio. To set the aspect ratio explicitly, use /videos/frames.

Transition between two frames

startImage, endImage, and prompt are required. duration here is 4-15s (default 6). aspectRatio (16:9|9:16|4:3|3:4|1:1|21:9|auto, default auto which matches the start frame), resolution, audio, and negativePrompt are optional.

Poll for the result

Both endpoints return 202 Accepted with a video.generate job:
Poll it with ?wait=true to long-poll until it’s terminal (up to ~55s; video takes longer than images, so expect a few waits):
Read the clip from data.result.video.url. GET /videos/{id} only resolves video jobs; GET /jobs/{id} works for any job. See Polling & wait for the loop and POST /jobs/{id}/cancel to abort an in-flight clip.
thumbnailUrl is a poster image produced just after the video, so it can be null on the first completed read - re-fetch the job a moment later if you need it.

Limits & best practices

  • One clip per request. For alternates, submit separate requests, and use Idempotency keys so a retried create doesn’t double-charge.
  • Rate limit: video creation is capped at 5 requests/minute per key (tighter than images). Honor Retry-After on 429 - see Rate limits.
  • Concurrency: video runs on a small dedicated pool, so clips may queue behind your other in-flight videos before they start processing. This is normal; keep polling.
  • Credits: video costs more than images and scales with duration and resolution. A create returns 402 with code INSUFFICIENT_CREDITS (including how many CU were needed) if your balance can’t cover it.
There are no webhooks in v1 - completion is via polling / ?wait=true.