cURL
curl --request GET \
--url https://api.nano-gpt.com/api/video/status \
--header 'x-api-key: <api-key>'import requests
url = "https://api.nano-gpt.com/api/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/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/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/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/video/status")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nano-gpt.com/api/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{
"requestId": "<string>",
"status": "queued",
"videoUrl": "<string>",
"error": "<string>",
"createdAt": "<string>",
"completedAt": "<string>",
"seed": 123,
"progress": 123,
"estimatedTimeRemaining": 123
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Endpoint Examples
Video Status (Unified)
Unified video status endpoint that works across all video backends. Check the status of a video generation request and receive normalized status information. Only the account that created the job can read it, with its API key or session; another account’s job answers 404 like an unknown one. Jobs paid anonymously with x402, older jobs NanoGPT has no job record for, and the statusUrl returned at submission for some private models (valid 24 hours), are read by the job ID alone. Output URLs on NanoGPT’s content route are signed for those readers and work for 24 hours (anyone else reading an older job by its ID alone gets none); poll again for a fresh one.
GET
/
video
/
status
cURL
curl --request GET \
--url https://api.nano-gpt.com/api/video/status \
--header 'x-api-key: <api-key>'import requests
url = "https://api.nano-gpt.com/api/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/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/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/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/video/status")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nano-gpt.com/api/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{
"requestId": "<string>",
"status": "queued",
"videoUrl": "<string>",
"error": "<string>",
"createdAt": "<string>",
"completedAt": "<string>",
"seed": 123,
"progress": 123,
"estimatedTimeRemaining": 123
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Overview
Check the status of an asynchronous video generation job using a single, provider-agnostic endpoint. This endpoint accepts NanoGPT job IDs (vid_...) and legacy provider request IDs. No model parameter is required.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
requestId | string | Yes* | The job ID (vid_...) or a legacy provider request ID |
runId | string | Yes* | Alias for requestId |
requestId or runId.
Authentication
Only the account that created a job can read its status or its event stream: send that account’s API key (x-api-key) or session. A job created by another account answers 404, exactly like one that doesn’t exist, so the response never confirms that someone else’s job exists. Three exceptions keep the job ID enough on its own: jobs paid anonymously with x402; the statusUrl (and eventsUrl) returned when some private models are submitted, which carry their own access parameters and work for 24 hours; and older jobs NanoGPT has no job record for, whose status is still read by ID alone, as before.
Output URLs
When a video is served from NanoGPT’s content route (/api/generate-video/content?...), a response to the account that created the job (or for an x402 job, or through a statusUrl) gives its URL expires and sig parameters. Such a URL works without an API key for 24 hours, so you can hand it to a player or a download tool. After that, poll the status endpoint again for a fresh URL, or fetch the content route with the creating account’s API key. Anyone else reading an older job by its ID alone gets these URL fields empty: NanoGPT never hands out an unsigned content URL. NanoGPT keeps a video it stores on its servers for about a day after storing it, so download the ones you want to keep; for most stored videos output.expiresAt gives that date. URLs hosted by the model’s provider are returned as the provider gives them and can expire sooner.
In the NanoGPT web app, new generated videos are saved in the browser where they finish when storage space is available. If a video cannot be saved, the app asks you to download it. Clearing browser data removes these saved videos, so download the ones you want to keep for good. API clients must download and store their own copies; this endpoint does not save videos on their devices.
Usage
import requests
import time
BASE = "https://api.nano-gpt.com/api"
def get_video_status(request_id: str, api_key: str) -> dict:
resp = requests.get(
f"{BASE}/video/status",
headers={"x-api-key": api_key},
params={"requestId": request_id},
timeout=30,
)
resp.raise_for_status()
return resp.json()
def wait_for_video(request_id: str, api_key: str, max_attempts: int = 120, delay_s: int = 5) -> str:
for _ in range(max_attempts):
payload = get_video_status(request_id, api_key)
status = payload.get("data", {}).get("status")
if status == "COMPLETED":
return payload["data"]["output"]["video"]["url"]
if status == "FAILED":
raise RuntimeError(payload.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(requestId, apiKey) {
const url = new URL(`${BASE}/video/status`);
url.searchParams.set('requestId', requestId);
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(requestId, apiKey, maxAttempts = 120, delayMs = 5000) {
for (let i = 0; i < maxAttempts; i++) {
const payload = await getVideoStatus(requestId, apiKey);
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/video/status?requestId=vid_m1abc123def456" \
-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/video/status?requestId=vid_m1abc123def456" -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
{
"requestId": "vid_m1abc123def456",
"model": "sora-2",
"data": {
"status": "IN_PROGRESS",
"requestId": "vid_m1abc123def456"
}
}
Completed
{
"requestId": "vid_m1abc123def456",
"model": "sora-2",
"data": {
"status": "COMPLETED",
"requestId": "vid_m1abc123def456",
"output": {
"video": {
"url": "https://storage.example.com/video.mp4"
}
},
"cost": 0.35
}
}
Failed
{
"requestId": "vid_m1abc123def456",
"model": "sora-2",
"data": {
"status": "FAILED",
"requestId": "vid_m1abc123def456",
"error": "Content policy violation",
"isNSFWError": true,
"userFriendlyError": "Content flagged as inappropriate. Please modify your prompt and try again."
}
}
- Terminal results are cached in
video_jobsfor faster subsequent status checks.
Query Parameters
Response
Unified video generation status