Choose a request shape
The unified endpoint covers common video workflows. Choose fields by input type, then verify that the selected model supports that capability.
| Goal | Key fields | Use when |
|---|---|---|
| Text to video | model + prompt | Generate from a prompt only |
| Single image to video | image | Animate one source image |
| Multiple references | images[] | Constrain character, outfit, or setting separately |
| First/last-frame interpolation | first_frame + last_frame | Fix both the opening and closing frame |
| Video editing | video + images[] | Replace elements or transfer style with instructions |
| new-api-compatible call | seconds + size + images | Keep existing new-api client fields |
Two-step asynchronous flow
- Submit: POST /v1/videos immediately returns an id with queued status.
- Poll: call GET /v1/videos/{id} every few seconds until the status becomes completed or failed.
- Download: after completion, call GET /v1/videos/{id}/content for the result.
Submission parameters
AuthorizationstringRequiredBearer sk-zerofa-xxxContent-TypestringRequiredapplication/jsonmodelstringRequiredyour-video-model-idpromptstringRequiredA shiba inu running through a field, cinematic lightingimagestring | string[]Optionalhttps://.../reference.pngimagesstring[]Optional["https://.../person.png","https://.../scene.png"]first_framestringOptionalhttps://.../first.pnglast_framestringOptionalhttps://.../last.pngvideostringOptionalhttps://.../source.mp4reference_videostring | string[]Optionalhttps://.../motion.mp4reference_audiostring | string[]Optionalhttps://.../voice.mp3durationintegerOptional5resolutionstringOptional720Paspect_ratiostringOptional16:9bitrate_modestringOptionalstandardnegative_promptstringOptionalblur, camera shake, text watermarkseedintegerOptional123456enable_audiobooleanOptionaltrueaudio_settingstringOptionaloriginImage-to-video and multiple references (unified format)
Use image for one reference and images for multiple references. In the prompt, bind their purposes by array order as image 1, image 2, and so on. Use first_frame and last_frame for keyframes; do not put a native Volcano content array directly at the top level of this site's /v1/videos request.
curl https://zerofa.ai/v1/videos \
-H "Authorization: Bearer sk-zerofa-xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "your-video-model-id",
"prompt": "Have the person turn and walk toward the window while the camera slowly pushes in",
"image": "https://example.com/first-frame.png",
"duration": 5,
"resolution": "720P",
"aspect_ratio": "16:9"
}'curl https://zerofa.ai/v1/videos \
-H "Authorization: Bearer sk-zerofa-xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "your-video-model-id",
"prompt": "Use image 1 for the character, image 2 for the outfit, and image 3 for the setting, then create a cinematic chase shot",
"images": [
"https://example.com/person.png",
"https://example.com/outfit.png",
"data:image/png;base64,..."
],
"duration": 5,
"resolution": "1080P",
"aspect_ratio": "16:9",
"enable_audio": true
}'HappyHorse video editing
happyhorse-1.0-video-edit takes exactly one source video and up to five reference images for instruction-driven replacement or global style transfer.
curl https://zerofa.ai/v1/videos \
-H "Authorization: Bearer sk-zerofa-xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "happyhorse-1.0-video-edit",
"prompt": "Replace the person's jacket with the striped jacket from image 1 while preserving the original motion and camera work",
"video": "https://example.com/source.mp4",
"images": ["https://example.com/striped-coat.png"],
"resolution": "1080P",
"audio_setting": "origin",
"seed": 123456
}'new-api-compatible client requests
Clients may call the same /v1/videos endpoint directly with new-api's generic video-task shape; no additional gateway is required. model, prompt, image, images, and mode work directly, while the aliases below are normalized into the unified task.
curl https://zerofa.ai/v1/videos \
-H "Authorization: Bearer sk-zerofa-xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "your-video-model-id",
"prompt": "Use the character in image 1 and the setting in image 2 to create a cinematic shot",
"seconds": "5",
"size": "1920x1080",
"images": [
"https://example.com/person.png",
"https://example.com/location.png"
],
"metadata": {
"client_job_id": "order-20260809-001"
}
}'secondsinteger | stringOptional5sizestringOptional1920x1080input_referencestring | objectOptionalhttps://.../reference.pngmetadataobject | JSON stringOptional{"client_job_id":"order-001"}Retrieve a task
/v1/videos/{id}The response is an OpenAI Videos-compatible object with one of four statuses: queued, in_progress, completed, or failed. Terminal results are cached, so repeated retrieval does not call the upstream again. progress is a stage indicator, not frame-level upstream progress.
| status | progress | Meaning |
|---|---|---|
| queued | 0 | The task was accepted and is waiting for upstream processing. |
| in_progress | 50 | The upstream is generating or the platform is processing the result. |
| completed | 100 | The task completed. metadata.url is a compatibility extension; the content endpoint is also available. |
| failed | 100 | The task failed. error.message contains the public failure reason. |
Download the result
/v1/videos/{id}/contentThe content endpoint responds with a 307 redirect to the currently available media URL. Clients must follow redirects and send the Authorization required for the request to this site.
curl -L https://zerofa.ai/v1/videos/<task-id>/content \
-H "Authorization: Bearer sk-zerofa-xxx" \
--output result.mp4Available models
Loading…
See video models in the Model Catalog and filter for Video. Billing is duration in seconds multiplied by the model price.
Request and response bodies
Use the examples below to verify the request and response structures. To send a request, select Debug at the top of the page.
curl https://zerofa.ai/v1/videos \
-H "Authorization: Bearer sk-zerofa-xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "your-video-model-id",
"prompt": "A shiba inu running through a field, cinematic lighting",
"duration": 5,
"resolution": "720P",
"aspect_ratio": "16:9",
"enable_audio": true
}'
# → {"id":"<task-id>","object":"video","status":"queued",
# "progress":0,"seconds":"5","size":"1280x720"}curl https://zerofa.ai/v1/videos/<task-id> \
-H "Authorization: Bearer sk-zerofa-xxx"
# queued → {"id":"...","status":"queued","progress":0}
# in_progress → {"id":"...","status":"in_progress","progress":50}
# completed → {"id":"...","status":"completed","progress":100,
# "metadata":{"url":"https://.../result.mp4"}}