cURL
curl --request GET \
--url https://api.nano-gpt.com/api/generate-video/status \
--header 'x-api-key: <api-key>'import requests
url = "https://api.nano-gpt.com/api/generate-video/status"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.nano-gpt.com/api/generate-video/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nano-gpt.com/api/generate-video/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nano-gpt.com/api/generate-video/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.nano-gpt.com/api/generate-video/status")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nano-gpt.com/api/generate-video/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"status": "IN_QUEUE",
"request_id": "<string>",
"output": {
"video": {
"url": "<string>"
}
},
"cost": 123,
"error": "<string>",
"isNSFWError": true,
"userFriendlyError": "<string>"
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Video Status (Legacy)
Poll the status of a video generation request submitted via /generate-video. Returns normalized status and the final video URL on completion.
GET
/
generate-video
/
status
cURL
curl --request GET \
--url https://api.nano-gpt.com/api/generate-video/status \
--header 'x-api-key: <api-key>'import requests
url = "https://api.nano-gpt.com/api/generate-video/status"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.nano-gpt.com/api/generate-video/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nano-gpt.com/api/generate-video/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nano-gpt.com/api/generate-video/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.nano-gpt.com/api/generate-video/status")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nano-gpt.com/api/generate-video/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"status": "IN_QUEUE",
"request_id": "<string>",
"output": {
"video": {
"url": "<string>"
}
},
"cost": 123,
"error": "<string>",
"isNSFWError": true,
"userFriendlyError": "<string>"
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Overview
Poll the status of an asynchronous video generation run. Use therunId 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/statusfor all new integrations. This endpoint is kept for backwards compatibility and requires themodelquery parameter. See Video Status (Unified).
Query parameters
runId(string, required): The run identifier returned by the submit callmodel(string, required): The model used for the run (e.g.,veo2-video)
Usage
import requests
import time
BASE = "https://api.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")
const BASE = 'https://api.nano-gpt.com/api';
async function getVideoStatus(runId, apiKey, model) {
const url = new URL(`${BASE}/generate-video/status`);
url.searchParams.set('runId', runId);
url.searchParams.set('model', model);
const res = await fetch(url, {
headers: { 'x-api-key': apiKey }
});
if (!res.ok) throw new Error(`Status check failed: ${res.status}`);
return res.json();
}
export async function waitForVideo(runId, apiKey, model, maxAttempts = 120, delayMs = 5000) {
for (let i = 0; i < maxAttempts; i++) {
const payload = await getVideoStatus(runId, apiKey, model);
const status = payload?.data?.status;
if (status === 'COMPLETED') return payload.data.output.video.url;
if (status === 'FAILED') throw new Error(payload?.data?.error || 'Video generation failed');
await new Promise((r) => setTimeout(r, delayMs));
}
throw new Error('Video generation timed out');
}
# Single status check
curl -s "https://api.nano-gpt.com/api/generate-video/status?runId=RUN_ID&model=veo2-video" \
-H "x-api-key: YOUR_API_KEY" | jq .
# Poll until complete (~10 minutes max)
for i in {1..120}; do
RESP=$(curl -s "https://api.nano-gpt.com/api/generate-video/status?runId=RUN_ID&model=veo2-video" -H "x-api-key: YOUR_API_KEY")
STATUS=$(echo "$RESP" | jq -r '.data.status // empty')
echo "Attempt $i: status=$STATUS"
if [ "$STATUS" = "COMPLETED" ]; then
echo "$RESP" | jq .
VIDEO_URL=$(echo "$RESP" | jq -r '.data.output.video.url')
echo "Video URL: $VIDEO_URL"
break
fi
sleep 5
done
Status values
IN_QUEUE: Request queuedIN_PROGRESS: Generation in progressCOMPLETED: Video readyFAILED: Generation failedCANCELED: 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.urlwhen status isCOMPLETED. costis returned once the generation is complete.request_idmay be a NanoGPT job ID (vid_...) or a legacy provider request ID.
Authorizations
Query Parameters
Run ID returned from the POST /generate-video response
Model identifier used in the generation request (e.g., 'veo2-video')
Response
Current status for the requested video generation
Show child attributes
Show child attributes