For AI agents: this page is also available as Markdown at https://docs.refabric.com/task-api-reference/video.md, and the index of every page is https://docs.refabric.com/llms.txt.
Video
Turns an image into a short video.
Tasks
Quick start
video.generate
import os
import time
import requests
headers = {"Authorization": f"Key {os.environ['REFABRIC_API_KEY']}"}
job = requests.post(
"https://api.refabric.com/v1/tasks/video.generate",
headers=headers,
json={
"image": "art:9f2c01",
"prompt": "she turns towards the camera and smiles",
},
).json()
print(job["job_id"])
while True:
status = requests.get(job["status_url"], headers=headers).json()
if status["lifecycle"] == "terminal":
break
time.sleep(5)
print(requests.get(job["result_url"], headers=headers).json())