Skip to content
Immersive AI

Generate Video

Video by Henri Huotari · Oct 22, 2025

Default video generation endpoint. Uses Veo 3. Cost 0.4$ per second with audio, 0.2$ per second without audio

This file couldn't be loaded. The link may have expired.
Output result.mp4

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/generate' \
  -H "Authorization: Bearer $IMMERSIVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Cyberpunk Warrior Woman driving a White Lamborghini driving on a country road near Paris, with Eiffel Tower far in the background, at night",
  "aspect_ratio": "16:9"
}'

# 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/generate", {
  method: "POST",
  headers: { ...headers, "Content-Type": "application/json" },
  body: JSON.stringify({
    "prompt": "Cyberpunk Warrior Woman driving a White Lamborghini driving on a country road near Paris, with Eiffel Tower far in the background, at night",
    "aspect_ratio": "16:9"
  }),
});
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/generate",
    headers=headers,
    json={
        "prompt": "Cyberpunk Warrior Woman driving a White Lamborghini driving on a country road near Paris, with Eiffel Tower far in the background, at night",
        "aspect_ratio": "16:9",
    },
    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": 6,
    "url": "https://s3.huotari.ai/immersive/examples/outputs/b959ffc0-ba01-42b1-a1a7-5b587b08edee/result.mp4",
    "cost": 59.767996772,
    "logs": "WARNING unknown input field ignored: enhance_prompt\nUsing seed: 249475362\nStarting video generation...\nStill generating...\nGenerated video in 57.60 seconds\nDownloading video...\nDownloaded video in 0.56 seconds\n",
    "seed": null,
    "type": "text-to-video",
    "tries": 1,
    "prompt": "Cyberpunk Warrior Woman driving a White Lamborghini driving on a country road near Paris, with Eiffel Tower far in the background, at night",
    "status": "succeeded",
    "batch_id": null,
    "duration": null,
    "provider": "replicate",
    "uploaded": false,
    "video_id": "tfdx56n6p9rm80ct1hn8qp93c4",
    "created_at": "2025-10-22T14:55:07.000000Z",
    "is_aborted": false,
    "model_name": "google/veo-3",
    "started_at": "2025-10-22T14:55:07.000000Z",
    "updated_at": "2025-10-22T14:56:39.000000Z",
    "used_server": "https://api.replicate.com/v1/predictions/tfdx56n6p9rm80ct1hn8qp93c4",
    "completed_at": "2025-10-22T14:56:07.000000Z",
    "elapsed_time": 59.767996772,
    "generated_at": "2025-10-22T14:56:39.000000Z",
    "is_generated": true,
    "model_version": "hidden",
    "enhance_prompt": false,
    "generation_data": "{\"input\":{\"prompt\":\"Cyberpunk Warrior Woman driving a White Lamborghini driving on a country road near Paris, with Eiffel Tower far in the background, at night\",\"enhance_prompt\":false,\"negative_prompt\":\"bad quality, blurry, low resolution\",\"seed\":0}}",
    "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

  1. POST returns the job's video_id and status right away.
  2. Poll GET /api/v1/video/{video_id} every few seconds while the job is running.
  3. When status is succeeded, download url. Failed jobs are refunded automatically.
Endpoint
POST /api/v1/video/generate
Output
Video · MP4