Nexus
All models
Google Video Available

Veo 3.1 Video

This is the new version of the API documentation; for the old version of the API, please see https://docs.kie.ai/old-model/veo3-api/generate-veo-3-video.

Text to Video

From 400 credits (≈ ₹400.00) per request.

Parameters

ParameterTypeDescription
promptRequired string Text prompt describing the desired video content. Required for all generation modes. - Should be detailed and specific in describing video content - Can include actions, scenes, style and other information - For image-to-video, describe how you want the image to come alive
image_urls array<string> Image URLs. FIRST_AND_LAST_FRAMES_2_VIDEO: 1 image (first frame) or 2 images (first + last frame). REFERENCE_2_VIDEO: 1–3 reference images, 8-second duration only.
generation_type string Video generation mode (optional). Specifies different video generation approaches: - **TEXT_2_VIDEO**: Text-to-video - Generate videos using only text prompts - **FIRST_AND_LAST_FRAMES_2_VIDEO**: First and last frames to video - Flexible image-to-video generation mode - 1 image: Generate video based on the provided image - 2 images: First image as first frame, second image as last frame, generating transition video - **REFERENCE_2_VIDEO**: Reference-to-video - Generate videos based on reference
one of: "TEXT_2_VIDEO", "FIRST_AND_LAST_FRAMES_2_VIDEO", "REFERENCE_2_VIDEO"
aspect_ratio string Video aspect ratio. Specifies the dimension ratio of the generated video. Available options: - 16:9: Landscape video format. - 9:16: Portrait video format, suitable for mobile short videos - Auto: In auto mode, the video will be automatically center-cropped based on whether your uploaded image is closer to 16:9 or 9:16. Default value is 16:9.
one of: "16:9", "9:16", "Auto" · default "16:9"
enable_fallback boolean Deprecated. Remove it from requests.
default false
enable_translation boolean Optional. When true, the prompt is translated to English before generation.
watermark string Watermark text. - Optional parameter - If provided, a watermark will be added to the generated video
resolution string Output resolution: 720p (default), 1080p or 4k. For 1080p and 4k, the video URL is in resultJson.data.result_urls (the 720p version is in data.origin_urls). Controls the pixel dimensions of the generated video. Higher resolution results in greater clarity and detail, while lower resolution allows for faster generation.
one of: "720p", "1080p", "4k" · default "720p"
duration integer The duration of the generated video, in seconds. Optional values are 4, 6, 8. **Important Note**: - The REFERENCE_2_VIDEO mode currently only supports a duration of 8 seconds.
one of: 4, 6, 8 · default 8

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": "veo-3.1-video",
    "input": {
        "prompt": "A cinematic shot of a lighthouse at dawn",
        "generation_type": "TEXT_2_VIDEO",
        "aspect_ratio": "16:9",
        "enable_fallback": false,
        "resolution": "720p",
        "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": "veo-3.1-video",
        "input": {
            "prompt": "A cinematic shot of a lighthouse at dawn",
            "generation_type": "TEXT_2_VIDEO",
            "aspect_ratio": "16:9",
            "enable_fallback": False,
            "resolution": "720p",
            "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": "veo-3.1-video",
      "input": {
          "prompt": "A cinematic shot of a lighthouse at dawn",
          "generation_type": "TEXT_2_VIDEO",
          "aspect_ratio": "16:9",
          "enable_fallback": false,
          "resolution": "720p",
          "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": "veo-3.1-video",
    "input": {
        "prompt": "A cinematic shot of a lighthouse at dawn",
        "generation_type": "TEXT_2_VIDEO",
        "aspect_ratio": "16:9",
        "enable_fallback": false,
        "resolution": "720p",
        "duration": 8
    }
}

Response

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