cURL
curl --request GET \
--url https://nano-gpt.com/api/video/status \
--header 'x-api-key: <api-key>'import requests
url = "https://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://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://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://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://nano-gpt.com/api/video/status")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://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>",
"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 using only the request ID and receive normalized status information.
GET
/
video
/
status
cURL
curl --request GET \
--url https://nano-gpt.com/api/video/status \
--header 'x-api-key: <api-key>'import requests
url = "https://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://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://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://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://nano-gpt.com/api/video/status")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://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>",
"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. Session ownership is enforced (returns 403 when the job is not yours).
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
Providex-api-key or a valid session cookie.
Usage
import requests
import time
BASE = "https://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://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://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://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.
Authorizations
Query Parameters
The unique request ID returned from any video generation endpoint
Response
Unified video generation status
The unique request ID for the video generation
Current normalized status of the video generation
Available options:
queued, processing, completed, failed, cancelled, unknown URL to the generated video (available when status is 'completed')
Error message if the generation failed
ISO timestamp when the request was created
ISO timestamp when the generation completed
Generation progress as a percentage (0-100), if available
Estimated time remaining in seconds, if available