This file couldn't be loaded. The link may have expired.
This file couldn't be loaded. The link may have expired.
Run it yourself
Set IMMERSIVE_API_KEY to an API key from your account. Create a free account to get one.
curl -X POST 'https://ai.im.inc/api/v1/video' \
-H "Authorization: Bearer $IMMERSIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A lamborghini driving on a paris road with the eiffel tower in the background",
"duration": 8,
"image_url": "https://s3.huotari.ai/immersive/examples/inputs/54a5ee7e-6b8d-4206-aeeb-8dfb3e251a6d/image_url.png",
"resolution": "720p",
"aspect_ratio": "16:9",
"enhance_prompt": true
}'
# Set JOB_ID to the response's "video_id", then poll every few seconds until the job has finished:
curl "https://ai.im.inc/api/v1/video/$JOB_ID" \
-H "Authorization: Bearer $IMMERSIVE_API_KEY"
# The finished response has the result at url.
const headers = { Authorization: `Bearer ${process.env.IMMERSIVE_API_KEY}` };
const response = await fetch("https://ai.im.inc/api/v1/video", {
method: "POST",
headers: { ...headers, "Content-Type": "application/json" },
body: JSON.stringify({
"prompt": "A lamborghini driving on a paris road with the eiffel tower in the background",
"duration": 8,
"image_url": "https://s3.huotari.ai/immersive/examples/inputs/54a5ee7e-6b8d-4206-aeeb-8dfb3e251a6d/image_url.png",
"resolution": "720p",
"aspect_ratio": "16:9",
"enhance_prompt": true
}),
});
const job = await response.json();
// Poll every few seconds while the job is still running.
const running = ["pending", "queued", "submitted", "starting", "processing", "running", "streaming", "in_queue", "in_progress"];
let result;
do {
await new Promise((resolve) => setTimeout(resolve, 5000));
result = await (await fetch(`https://ai.im.inc/api/v1/video/${job.video_id}`, { headers })).json();
} while (running.includes(String(result.status).toLowerCase()));
console.log(result.url);
import os
import time
import requests
headers = {"Authorization": f"Bearer {os.environ['IMMERSIVE_API_KEY']}"}
job = requests.post(
"https://ai.im.inc/api/v1/video",
headers=headers,
json={
"prompt": "A lamborghini driving on a paris road with the eiffel tower in the background",
"duration": 8,
"image_url": "https://s3.huotari.ai/immersive/examples/inputs/54a5ee7e-6b8d-4206-aeeb-8dfb3e251a6d/image_url.png",
"resolution": "720p",
"aspect_ratio": "16:9",
"enhance_prompt": True,
},
timeout=300,
).json()
# Poll every few seconds while the job is still running.
running = {"pending", "queued", "submitted", "starting", "processing", "running", "streaming", "in_queue", "in_progress"}
while True:
time.sleep(5)
result = requests.get(f"https://ai.im.inc/api/v1/video/{job['video_id']}", headers=headers, timeout=60).json()
if str(result.get("status", "")).lower() not in running:
break
print(result["url"])
{
"id": 15,
"url": "https://s3.huotari.ai/immersive/examples/outputs/54a5ee7e-6b8d-4206-aeeb-8dfb3e251a6d/result.mp4",
"cost": 59.671622575,
"logs": "WARNING unknown input field ignored: enhance_prompt\nUsing seed: 996634296\nStarting video generation...\nStill generating...\nGenerated video in 57.57 seconds\nDownloading video...\nDownloaded video in 0.10 seconds\n",
"seed": null,
"type": "text-to-video",
"tries": 1,
"prompt": "A lamborghini driving on a paris road with the eiffel tower in the background",
"status": "succeeded",
"batch_id": null,
"duration": null,
"provider": "replicate",
"uploaded": false,
"video_id": "x1wvxx36fsrm80ct2qcrsean8m",
"created_at": "2025-10-24T10:52:40.000000Z",
"is_aborted": false,
"model_name": "google/veo-3",
"started_at": "2025-10-24T10:52:41.000000Z",
"updated_at": "2025-10-24T10:54:01.000000Z",
"used_server": "https://api.replicate.com/v1/predictions/x1wvxx36fsrm80ct2qcrsean8m",
"completed_at": "2025-10-24T10:53:41.000000Z",
"elapsed_time": 59.671622575,
"generated_at": "2025-10-24T10:54:01.000000Z",
"is_generated": true,
"model_version": "hidden",
"enhance_prompt": true,
"generation_data": "{\"input\":{\"prompt\":\"A lamborghini driving on a paris road with the eiffel tower in the background\",\"enhance_prompt\":true,\"negative_prompt\":\"bad quality, blurry, low resolution\",\"seed\":0,\"image\":\"https:\\/\\/s3.huotari.ai\\/immersive\\/examples\\/outputs\\/e768e93b-24d9-439d-8537-e404c5663ec6\\/result.png\"}}",
"negative_prompt": "bad quality, blurry, low resolution",
"reaL_elapsed_time": null
}
Your browser blocked the clipboard. Select the text and copy it by hand.
How the job runs
- POST returns the job's video_id and status right away.
- Poll GET /api/v1/video/{video_id} every few seconds while the job is running.
- When status is succeeded, download url. Failed jobs are refunded automatically.
- Endpoint
- POST /api/v1/video
- Output
- Video · MP4