queue_id, then poll /video/retrieve until the response is video/mp4.
Endpoints
Step 1: Queue Generation
Request:download_url field:
download_url is a pre-signed URL you use to download the finished video instead of reading it from the retrieve response. It is only returned once in the queue response, so persist it alongside queue_id. This applies to all four Grok Imagine Private variants:
grok-imagine-text-to-video-privategrok-imagine-image-to-video-privategrok-imagine-reference-to-video-privategrok-imagine-video-to-video-private
grok-imagine-*-video variants, Grok Imagine Private models are not billed for content-moderation rejections, so you only pay for successful generations.
Save model, queue_id, and download_url (if present) for all subsequent calls.
Private download links
For private models,download_url is how you fetch the finished file once the job is complete. The link is short-lived and single-purpose: it is there to deliver the MP4 to you, not to serve as a long-term or widely shared URL.
If a download is interrupted, you can retry the same GET a few times from the same environment until the file finishes. Those retries are for recovering from network blips—not for polling the same link indefinitely, sharing it across many clients, or embedding it like a permanent media URL. Patterns like that often show up as 429 or 410, which can be surprising if you expected the link to behave like regular file hosting.
For reliability, GET requests should originate from one client network. There is some flexibility if your IP changes once (for example you disconnect a VPN and try again), but wide variation in source IPs usually will not work.
The URL stays valid for up to 24 hours, or until the object is removed.
If you need a stable URL, public playback, or repeated access over time, save the file to your own storage first and serve it from there.
DELETE
When you are done fetching the file—or if you decide not to keep it—you can call DELETE on the same download_url. No Venice API key is required on that request. This is optional but recommended when privacy matters, because some proxies and middleboxes outside Venice keep logs of full URLs, and deleting the link is the simplest way to narrow the window where the pre-signed URL exists.
/video/retrieve until COMPLETED → GET the download_url (retry lightly if the transfer drops) → save the file where you need it → DELETE the download_url if you want the link invalidated → optionally call /video/complete if you still use queue-based cleanup.
Step 2: Poll for Completion
Request:
Processing response (200, application/json):
average_execution_time to estimate remaining wait.
Complete response (200, video/mp4):
Response body is raw binary video data. Save to file.
Complete response (200, application/json with "COMPLETED"):
For models that returned a download_url at queue time, retrieve always returns JSON. Fetch the video with GET download_url (no auth header). See Private download links for how these URLs work, retries, and optional DELETE.
Step 3: Cleanup (Optional)
Either auto-delete on retrieval:/video/complete after saving:
Complete Example
Request Parameters
Queue Request
Queue validation is model-specific. Check
/models?type=video for each model’s supported request fields before calling /video/queue.
Quote Request
Retrieve Request
Complete Request
Image to Video
For image-to-video models, pass source image viaimage_url. The prompt describes desired motion, not the image content.
Price Quote
Get exact cost before generating. Send only pricing inputs (model, duration, and optional resolution, aspect_ratio, audio):
Request:
Errors
Polling Strategy
- Poll
/video/retrieveon an interval (for example, every 5 seconds) - If
Content-Typeisapplication/jsonandstatusis"PROCESSING", wait and poll again. Useaverage_execution_timeandexecution_duration(milliseconds) to estimate remaining time - If
Content-Typeisvideo/mp4, save the response body as your output file - If
Content-Typeisapplication/jsonandstatusis"COMPLETED",GETthedownload_urlfrom the queue response to fetch the video (see Private download links) - If you used
download_url, considerDELETEon that URL when you are done to narrow how long the pre-signed URL exists; then optionally setdelete_media_on_completion: trueon retrieve or call/video/completefor queue-based cleanup - Handle
404as invalid, expired, or deleted media; handle500/503with retries/backoff