Nexus
All models
xAI Video Available

Grok Imagine Video 1.5 Preview

Output is an MP4 video with an audio track generated together with the video (dialogue written in the prompt is spoken). Audio cannot be turned off.

Image to Video Text to Video

From 400 credits (≈ ₹400.00) per request.

Parameters

ParameterTypeDescription
prompt string Prompt for video generation. Maximum length: 4096 characters. Use `@imageN` in the prompt to reference an image from `image_urls`, where N is the 1-based index of the image. For example, `@image1` refers to the first image in the array.
max length 4096
image_urlsRequired array<string> Upload image files to be used as API input. Supported file types: image/jpeg, image/png, image/webp, image/jpg. Maximum file size: 20MB. Supports multi-file upload, up to 1 file.Only one is supported when the resolution is 1080p.
aspect_ratio string Aspect ratio for video generation.
one of: "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "auto" · default "auto"
resolution string Resolution for video generation.
one of: "480p", "720p", "1080p" · default "480p"
duration integer Video duration in seconds. Range: [1, 15]. Default: 8. Minimum: 1. Maximum: 15. Step: 1.
min 1 · max 15 · default 8
first_frame_url string First-frame image. Can be passed together with image_urls, or sent on its own.
format: uri
last_frame_url string Last-frame image.
format: uri
loop_url string Loop image used as both the start and end of the video. Cannot be sent together with a different first-frame or last-frame image.
format: uri
keyframes array<object> Mid-video keyframes, up to 4. Each item must include url and timestamp_s (in seconds). Each timestamp must be greater than 0 and less than duration, and any two keyframes must be at least 1/3 second apart.
enable_audio boolean Whether to generate audio. Defaults to true.
nsfw_checker boolean Defaults to false. You can set it to false based on your needs. If set to false, our content filtering will be disabled, and all results will be returned directly by the model itself.

What you get back

Files arrive in output.files[] as private links that expire, with their type and size.

Use it from your code

# 1. Create the task
curl https://nexus.promptscenes.in/api/v1/tasks \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "model": "grok-imagine-video-1.5-preview",
    "input": {
        "image_urls": null,
        "aspect_ratio": "auto",
        "resolution": "480p",
        "duration": 8
    },
    "callback_url": "https://your-app.com/webhooks/nexus"
}'

# 2. Poll for the result
curl https://nexus.promptscenes.in/api/v1/tasks/TASK_ID \
  -H "Authorization: Bearer $NEXUS_API_KEY"
import os, time, uuid, requests

API = "https://nexus.promptscenes.in/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['NEXUS_API_KEY']}"}

task = requests.post(
    f"{API}/tasks",
    headers={**HEADERS, "Idempotency-Key": str(uuid.uuid4())},
    json={
        "model": "grok-imagine-video-1.5-preview",
        "input": {
            "image_urls": None,
            "aspect_ratio": "auto",
            "resolution": "480p",
            "duration": 8,
        },
        "callback_url": "https://your-app.com/webhooks/nexus",
    },
).json()

while task["status"] not in ("succeeded", "failed", "cancelled"):
    time.sleep(3)
    task = requests.get(f"{API}/tasks/{task['id']}", headers=HEADERS).json()

print(task["status"], task.get("output"))
const API = "https://nexus.promptscenes.in/api/v1";
const headers = {
  Authorization: `Bearer ${process.env.NEXUS_API_KEY}`,
  "Content-Type": "application/json",
};

let task = await fetch(`${API}/tasks`, {
  method: "POST",
  headers: { ...headers, "Idempotency-Key": crypto.randomUUID() },
  body: JSON.stringify({
      "model": "grok-imagine-video-1.5-preview",
      "input": {
          "image_urls": null,
          "aspect_ratio": "auto",
          "resolution": "480p",
          "duration": 8
      },
      "callback_url": "https://your-app.com/webhooks/nexus"
  }),
}).then((r) => r.json());

while (!["succeeded", "failed", "cancelled"].includes(task.status)) {
  await new Promise((r) => setTimeout(r, 3000));
  task = await fetch(`${API}/tasks/${task.id}`, { headers }).then((r) => r.json());
}
console.log(task.status, task.output);

Request

{
    "model": "grok-imagine-video-1.5-preview",
    "input": {
        "image_urls": null,
        "aspect_ratio": "auto",
        "resolution": "480p",
        "duration": 8
    }
}

Response

{
    "id": "6f1c…",
    "object": "task",
    "model": "grok-imagine-video-1.5-preview",
    "status": "succeeded",
    "output": {
        "files": [
            {
                "url": "https://…signed…",
                "mime": "…",
                "size": 0
            }
        ]
    },
    "estimated_cost": "…",
    "charged": "…"
}