Loading...
Loading...
Generate videos from images with audio using xAI's Grok Imagine Video model.
Pay only for what you use. No minimums.
Sign in to run models
No output yet
Run the model to see generated results.
import requests
result = requests.post(
'https://api.muvi.video/v1/jobs/submit',
headers={
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json'
},
json={
'model': 'xai/grok-imagine/text-to-video',
'input': {
'aspect_ratio': '16:9',
'duration': '10',
'prompt': 'Handheld camera footage, news report style. A reporter standing in Times Square during a heavy snowstorm. People rush by with umbrellas as wind blows snow across the street. The camera shakes slightly as snow hits the lens. Raw footage aesthetic, high noise, realistic skin texture, muted colors. The reporter looks directly into the camera and speaks clearly: “Welcome to Muvi AI. This entire scene was generated using Grok Imagine. With Muvi AI you can create realistic AI videos in seconds, from simple prompts. If you want to try it yourself, visit Muvi AI and start generating today.”',
'resolution': '720p'
}
}
)import time
job_id = result.json()['jobId']
while True:
response = requests.get(
f'https://api.muvi.video/v1/jobs/{'{job_id}'}',
headers={'Authorization': f'Bearer {'{API_KEY}'}'}
)
data = response.json()['data']
if data['status'] == 'completed':
print('Done!', data['outputs'][0]['url'])
break
elif data['status'] == 'failed':
raise Exception(f"Job failed: {'{'}data['error']['message']{'}'}")
time.sleep(2)Estimated cost per generation by duration and resolution. You only pay for what you run.