Skip to main content
GET
/
generate-video
/
status
cURL
curl --request GET \
  --url https://nano-gpt.com/api/generate-video/status \
  --header 'x-api-key: <api-key>'
{
  "data": {
    "status": "IN_QUEUE",
    "request_id": "<string>",
    "output": {
      "video": {
        "url": "<string>"
      }
    },
    "cost": 123,
    "error": "<string>",
    "isNSFWError": true,
    "userFriendlyError": "<string>"
  }
}

Overview

Poll the status of an asynchronous video generation run. Use the runId you received from POST /generate-video and include the model used for the request. When the run completes, the response includes data.output.video.url.
Deprecated: Use /api/video/status for all new integrations. This endpoint is kept for backwards compatibility and requires the model query parameter. See Video Status (Unified).

Query parameters

  • runId (string, required): The run identifier returned by the submit call
  • model (string, required): The model used for the run (e.g., veo2-video)

Usage

import requests
import time

BASE = "https://nano-gpt.com/api"

def get_video_status(run_id: str, api_key: str, model: str) -> dict:
    params = {"runId": run_id, "model": model}
    resp = requests.get(
        f"{BASE}/generate-video/status",
        headers={"x-api-key": api_key},
        params=params,
        timeout=30,
    )
    resp.raise_for_status()
    return resp.json()


def wait_for_video(run_id: str, api_key: str, model: str, max_attempts: int = 120, delay_s: int = 5) -> str:
    for i in range(max_attempts):
        data = get_video_status(run_id, api_key, model)
        status = data.get("data", {}).get("status")
        if status == "COMPLETED":
            return data["data"]["output"]["video"]["url"]
        if status == "FAILED":
            raise RuntimeError(data.get("data", {}).get("error", "Video generation failed"))
        time.sleep(delay_s)
    raise TimeoutError("Video generation timed out")

Status values

  • IN_QUEUE: Request queued
  • IN_PROGRESS: Generation in progress
  • COMPLETED: Video ready
  • FAILED: Generation failed
  • CANCELED: Request canceled

Response examples

In progress

{
  "data": {
    "status": "IN_PROGRESS",
    "request_id": "vid_m1abc123def456"
  }
}

Completed

{
  "data": {
    "status": "COMPLETED",
    "request_id": "vid_m1abc123def456",
    "output": {
      "video": {
        "url": "https://storage.example.com/video.mp4"
      }
    },
    "cost": 0.35
  }
}

Failed

{
  "data": {
    "status": "FAILED",
    "request_id": "vid_m1abc123def456",
    "error": "Content policy violation",
    "isNSFWError": true,
    "userFriendlyError": "Content flagged as inappropriate. Please modify your prompt and try again."
  }
}

Notes

  • Polling this endpoint is free; submission endpoints are rate limited.
  • The final video URL is returned in data.output.video.url when status is COMPLETED.
  • cost is returned once the generation is complete.
  • request_id may be a NanoGPT job ID (vid_...) or a legacy provider request ID.

Authorizations

x-api-key
string
header
required

Query Parameters

runId
string
required

Run ID returned from the POST /generate-video response

model
string

Model identifier used in the generation request (e.g., 'veo2-video')

Response

Current status for the requested video generation

data
object