cURL
curl --request GET \
--url https://api.nano-gpt.com/api/generate-video/content \
--header 'x-api-key: <api-key>'import requests
url = "https://api.nano-gpt.com/api/generate-video/content"
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/content', 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/content",
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/content"
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/content")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nano-gpt.com/api/generate-video/content")
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{}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Endpoint Examples
Video Content
Serves a video NanoGPT stores. Status responses read by the creating account (or for an x402 job, or through a statusUrl) return these URLs signed (expires, sig), good for 24 hours without an API key; anyone else reading an older job by its ID alone gets none. After that, poll the status again for a fresh one, or fetch it with the creating account’s API key or session.
GET
/
generate-video
/
content
cURL
curl --request GET \
--url https://api.nano-gpt.com/api/generate-video/content \
--header 'x-api-key: <api-key>'import requests
url = "https://api.nano-gpt.com/api/generate-video/content"
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/content', 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/content",
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/content"
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/content")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nano-gpt.com/api/generate-video/content")
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{}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Overview
Serves a finished video (or a Sora 2 thumbnail or spritesheet) that NanoGPT stores. NanoGPT keeps it on its servers for about a day after storing it, so download the videos you want to keep. You normally don’t build these URLs: the status endpoints return them. 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.Access
A status response signs these URLs (expires, sig) when it is read by the account that created the job, for a job paid anonymously with x402, or through a statusUrl; a signed URL works without an API key for 24 hours. Anyone else reading an older job by its ID alone gets no URL: NanoGPT never hands out an unsigned one. After that, poll the status endpoint again for a fresh signed URL, or fetch the URL with the creating account’s API key (x-api-key) or session.
Endpoint
GET /api/generate-video/content
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
runId | string | Yes | The job ID (vid_...) or provider run ID, as in the URL a status response returned |
model | string | Yes | The model, as in that URL |
variant | string | No | video (default); for Sora 2 also thumbnail or spritesheet |
expires, sig | string | No | The signature a status response added; good for 24 hours |
Usage
curl -s "https://api.nano-gpt.com/api/generate-video/content?runId=RUN_ID&model=sora-2&variant=video" \
-H "x-api-key: YOUR_API_KEY" | jq .
Query Parameters
Response
Content response
The response is of type object.