cURL
curl --request POST \
--url https://api.nano-gpt.com/api/generate-video \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"model": "<string>",
"callback_url": "<string>",
"prompt": "A serene lake at sunset with gentle ripples on the water",
"script": "<string>",
"conversationUUID": "<string>",
"projectId": "<string>",
"framework": "default",
"shortRequestEnhancer": false,
"targetLengthInWords": 70,
"targetLengthInSeconds": 123,
"directorNotes": "Warm, cozy lighting with focus on people interacting",
"aspectRatio": "9:16",
"scriptConfig": {
"style": "default",
"targetLengthInSeconds": 30
},
"imageConfig": {
"model": "hidream_dev",
"loraConfig": {
"loraSlug": "ghibsky-comic-book"
}
},
"videoConfig": {
"enabled": true,
"model": "kling_v2_1_std_5s"
},
"voiceoverConfig": {
"enabled": true,
"voiceId": "zWDA589rUKXuLnPRDtAG"
},
"captionsConfig": {
"captionsEnabled": true,
"captionsStyle": "tiktok"
},
"effectsConfig": {
"transition": "fade",
"floating": true
},
"musicConfig": {
"enabled": true,
"musicSlug": "gentle_ambient_loop",
"volume": 0.3,
"loop": true
},
"voice": "pNInz6obpgDQGcFmaJgB",
"captionsShow": true,
"captionsStyle": "default",
"effects": {
"transition": "fade",
"floating": false
},
"quality": "medium",
"motion": {
"enabled": false,
"strength": 3
},
"music": "video-creation/music/dramatic_cinematic_score.mp3",
"duration": "5s",
"aspect_ratio": "16:9",
"negative_prompt": "blur, distort, and low quality",
"cfg_scale": 0.5,
"imageDataUrl": "data:image/jpeg;base64,/9j/4AAQ...",
"imageUrl": "https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=1024",
"imageAttachmentId": "<string>",
"videoUrl": "<string>",
"videoDataUrl": "<string>",
"video": "<string>",
"videoAttachmentId": "<string>",
"prompt_optimizer": true,
"num_inference_steps": 30,
"pro_mode": false,
"resolution": "720p",
"num_frames": 81,
"frames_per_second": 16,
"seed": 123,
"enable_safety_checker": true,
"showExplicitContent": false,
"enable_prompt_expansion": true,
"acceleration": true,
"shift": 123,
"age_slider": 18,
"audioEnabled": false,
"video_quality": "Standard",
"aspect": "Portrait"
}
'import requests
url = "https://api.nano-gpt.com/api/generate-video"
payload = {
"model": "<string>",
"callback_url": "<string>",
"prompt": "A serene lake at sunset with gentle ripples on the water",
"script": "<string>",
"conversationUUID": "<string>",
"projectId": "<string>",
"framework": "default",
"shortRequestEnhancer": False,
"targetLengthInWords": 70,
"targetLengthInSeconds": 123,
"directorNotes": "Warm, cozy lighting with focus on people interacting",
"aspectRatio": "9:16",
"scriptConfig": {
"style": "default",
"targetLengthInSeconds": 30
},
"imageConfig": {
"model": "hidream_dev",
"loraConfig": { "loraSlug": "ghibsky-comic-book" }
},
"videoConfig": {
"enabled": True,
"model": "kling_v2_1_std_5s"
},
"voiceoverConfig": {
"enabled": True,
"voiceId": "zWDA589rUKXuLnPRDtAG"
},
"captionsConfig": {
"captionsEnabled": True,
"captionsStyle": "tiktok"
},
"effectsConfig": {
"transition": "fade",
"floating": True
},
"musicConfig": {
"enabled": True,
"musicSlug": "gentle_ambient_loop",
"volume": 0.3,
"loop": True
},
"voice": "pNInz6obpgDQGcFmaJgB",
"captionsShow": True,
"captionsStyle": "default",
"effects": {
"transition": "fade",
"floating": False
},
"quality": "medium",
"motion": {
"enabled": False,
"strength": 3
},
"music": "video-creation/music/dramatic_cinematic_score.mp3",
"duration": "5s",
"aspect_ratio": "16:9",
"negative_prompt": "blur, distort, and low quality",
"cfg_scale": 0.5,
"imageDataUrl": "data:image/jpeg;base64,/9j/4AAQ...",
"imageUrl": "https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=1024",
"imageAttachmentId": "<string>",
"videoUrl": "<string>",
"videoDataUrl": "<string>",
"video": "<string>",
"videoAttachmentId": "<string>",
"prompt_optimizer": True,
"num_inference_steps": 30,
"pro_mode": False,
"resolution": "720p",
"num_frames": 81,
"frames_per_second": 16,
"seed": 123,
"enable_safety_checker": True,
"showExplicitContent": False,
"enable_prompt_expansion": True,
"acceleration": True,
"shift": 123,
"age_slider": 18,
"audioEnabled": False,
"video_quality": "Standard",
"aspect": "Portrait"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
callback_url: '<string>',
prompt: 'A serene lake at sunset with gentle ripples on the water',
script: '<string>',
conversationUUID: '<string>',
projectId: '<string>',
framework: 'default',
shortRequestEnhancer: false,
targetLengthInWords: 70,
targetLengthInSeconds: 123,
directorNotes: 'Warm, cozy lighting with focus on people interacting',
aspectRatio: '9:16',
scriptConfig: {style: 'default', targetLengthInSeconds: 30},
imageConfig: {model: 'hidream_dev', loraConfig: {loraSlug: 'ghibsky-comic-book'}},
videoConfig: {enabled: true, model: 'kling_v2_1_std_5s'},
voiceoverConfig: {enabled: true, voiceId: 'zWDA589rUKXuLnPRDtAG'},
captionsConfig: {captionsEnabled: true, captionsStyle: 'tiktok'},
effectsConfig: {transition: 'fade', floating: true},
musicConfig: {enabled: true, musicSlug: 'gentle_ambient_loop', volume: 0.3, loop: true},
voice: 'pNInz6obpgDQGcFmaJgB',
captionsShow: true,
captionsStyle: 'default',
effects: {transition: 'fade', floating: false},
quality: 'medium',
motion: {enabled: false, strength: 3},
music: 'video-creation/music/dramatic_cinematic_score.mp3',
duration: '5s',
aspect_ratio: '16:9',
negative_prompt: 'blur, distort, and low quality',
cfg_scale: 0.5,
imageDataUrl: 'data:image/jpeg;base64,/9j/4AAQ...',
imageUrl: 'https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=1024',
imageAttachmentId: '<string>',
videoUrl: '<string>',
videoDataUrl: '<string>',
video: '<string>',
videoAttachmentId: '<string>',
prompt_optimizer: true,
num_inference_steps: 30,
pro_mode: false,
resolution: '720p',
num_frames: 81,
frames_per_second: 16,
seed: 123,
enable_safety_checker: true,
showExplicitContent: false,
enable_prompt_expansion: true,
acceleration: true,
shift: 123,
age_slider: 18,
audioEnabled: false,
video_quality: 'Standard',
aspect: 'Portrait'
})
};
fetch('https://api.nano-gpt.com/api/generate-video', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'callback_url' => '<string>',
'prompt' => 'A serene lake at sunset with gentle ripples on the water',
'script' => '<string>',
'conversationUUID' => '<string>',
'projectId' => '<string>',
'framework' => 'default',
'shortRequestEnhancer' => false,
'targetLengthInWords' => 70,
'targetLengthInSeconds' => 123,
'directorNotes' => 'Warm, cozy lighting with focus on people interacting',
'aspectRatio' => '9:16',
'scriptConfig' => [
'style' => 'default',
'targetLengthInSeconds' => 30
],
'imageConfig' => [
'model' => 'hidream_dev',
'loraConfig' => [
'loraSlug' => 'ghibsky-comic-book'
]
],
'videoConfig' => [
'enabled' => true,
'model' => 'kling_v2_1_std_5s'
],
'voiceoverConfig' => [
'enabled' => true,
'voiceId' => 'zWDA589rUKXuLnPRDtAG'
],
'captionsConfig' => [
'captionsEnabled' => true,
'captionsStyle' => 'tiktok'
],
'effectsConfig' => [
'transition' => 'fade',
'floating' => true
],
'musicConfig' => [
'enabled' => true,
'musicSlug' => 'gentle_ambient_loop',
'volume' => 0.3,
'loop' => true
],
'voice' => 'pNInz6obpgDQGcFmaJgB',
'captionsShow' => true,
'captionsStyle' => 'default',
'effects' => [
'transition' => 'fade',
'floating' => false
],
'quality' => 'medium',
'motion' => [
'enabled' => false,
'strength' => 3
],
'music' => 'video-creation/music/dramatic_cinematic_score.mp3',
'duration' => '5s',
'aspect_ratio' => '16:9',
'negative_prompt' => 'blur, distort, and low quality',
'cfg_scale' => 0.5,
'imageDataUrl' => 'data:image/jpeg;base64,/9j/4AAQ...',
'imageUrl' => 'https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=1024',
'imageAttachmentId' => '<string>',
'videoUrl' => '<string>',
'videoDataUrl' => '<string>',
'video' => '<string>',
'videoAttachmentId' => '<string>',
'prompt_optimizer' => true,
'num_inference_steps' => 30,
'pro_mode' => false,
'resolution' => '720p',
'num_frames' => 81,
'frames_per_second' => 16,
'seed' => 123,
'enable_safety_checker' => true,
'showExplicitContent' => false,
'enable_prompt_expansion' => true,
'acceleration' => true,
'shift' => 123,
'age_slider' => 18,
'audioEnabled' => false,
'video_quality' => 'Standard',
'aspect' => 'Portrait'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nano-gpt.com/api/generate-video"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"prompt\": \"A serene lake at sunset with gentle ripples on the water\",\n \"script\": \"<string>\",\n \"conversationUUID\": \"<string>\",\n \"projectId\": \"<string>\",\n \"framework\": \"default\",\n \"shortRequestEnhancer\": false,\n \"targetLengthInWords\": 70,\n \"targetLengthInSeconds\": 123,\n \"directorNotes\": \"Warm, cozy lighting with focus on people interacting\",\n \"aspectRatio\": \"9:16\",\n \"scriptConfig\": {\n \"style\": \"default\",\n \"targetLengthInSeconds\": 30\n },\n \"imageConfig\": {\n \"model\": \"hidream_dev\",\n \"loraConfig\": {\n \"loraSlug\": \"ghibsky-comic-book\"\n }\n },\n \"videoConfig\": {\n \"enabled\": true,\n \"model\": \"kling_v2_1_std_5s\"\n },\n \"voiceoverConfig\": {\n \"enabled\": true,\n \"voiceId\": \"zWDA589rUKXuLnPRDtAG\"\n },\n \"captionsConfig\": {\n \"captionsEnabled\": true,\n \"captionsStyle\": \"tiktok\"\n },\n \"effectsConfig\": {\n \"transition\": \"fade\",\n \"floating\": true\n },\n \"musicConfig\": {\n \"enabled\": true,\n \"musicSlug\": \"gentle_ambient_loop\",\n \"volume\": 0.3,\n \"loop\": true\n },\n \"voice\": \"pNInz6obpgDQGcFmaJgB\",\n \"captionsShow\": true,\n \"captionsStyle\": \"default\",\n \"effects\": {\n \"transition\": \"fade\",\n \"floating\": false\n },\n \"quality\": \"medium\",\n \"motion\": {\n \"enabled\": false,\n \"strength\": 3\n },\n \"music\": \"video-creation/music/dramatic_cinematic_score.mp3\",\n \"duration\": \"5s\",\n \"aspect_ratio\": \"16:9\",\n \"negative_prompt\": \"blur, distort, and low quality\",\n \"cfg_scale\": 0.5,\n \"imageDataUrl\": \"data:image/jpeg;base64,/9j/4AAQ...\",\n \"imageUrl\": \"https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=1024\",\n \"imageAttachmentId\": \"<string>\",\n \"videoUrl\": \"<string>\",\n \"videoDataUrl\": \"<string>\",\n \"video\": \"<string>\",\n \"videoAttachmentId\": \"<string>\",\n \"prompt_optimizer\": true,\n \"num_inference_steps\": 30,\n \"pro_mode\": false,\n \"resolution\": \"720p\",\n \"num_frames\": 81,\n \"frames_per_second\": 16,\n \"seed\": 123,\n \"enable_safety_checker\": true,\n \"showExplicitContent\": false,\n \"enable_prompt_expansion\": true,\n \"acceleration\": true,\n \"shift\": 123,\n \"age_slider\": 18,\n \"audioEnabled\": false,\n \"video_quality\": \"Standard\",\n \"aspect\": \"Portrait\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nano-gpt.com/api/generate-video")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"prompt\": \"A serene lake at sunset with gentle ripples on the water\",\n \"script\": \"<string>\",\n \"conversationUUID\": \"<string>\",\n \"projectId\": \"<string>\",\n \"framework\": \"default\",\n \"shortRequestEnhancer\": false,\n \"targetLengthInWords\": 70,\n \"targetLengthInSeconds\": 123,\n \"directorNotes\": \"Warm, cozy lighting with focus on people interacting\",\n \"aspectRatio\": \"9:16\",\n \"scriptConfig\": {\n \"style\": \"default\",\n \"targetLengthInSeconds\": 30\n },\n \"imageConfig\": {\n \"model\": \"hidream_dev\",\n \"loraConfig\": {\n \"loraSlug\": \"ghibsky-comic-book\"\n }\n },\n \"videoConfig\": {\n \"enabled\": true,\n \"model\": \"kling_v2_1_std_5s\"\n },\n \"voiceoverConfig\": {\n \"enabled\": true,\n \"voiceId\": \"zWDA589rUKXuLnPRDtAG\"\n },\n \"captionsConfig\": {\n \"captionsEnabled\": true,\n \"captionsStyle\": \"tiktok\"\n },\n \"effectsConfig\": {\n \"transition\": \"fade\",\n \"floating\": true\n },\n \"musicConfig\": {\n \"enabled\": true,\n \"musicSlug\": \"gentle_ambient_loop\",\n \"volume\": 0.3,\n \"loop\": true\n },\n \"voice\": \"pNInz6obpgDQGcFmaJgB\",\n \"captionsShow\": true,\n \"captionsStyle\": \"default\",\n \"effects\": {\n \"transition\": \"fade\",\n \"floating\": false\n },\n \"quality\": \"medium\",\n \"motion\": {\n \"enabled\": false,\n \"strength\": 3\n },\n \"music\": \"video-creation/music/dramatic_cinematic_score.mp3\",\n \"duration\": \"5s\",\n \"aspect_ratio\": \"16:9\",\n \"negative_prompt\": \"blur, distort, and low quality\",\n \"cfg_scale\": 0.5,\n \"imageDataUrl\": \"data:image/jpeg;base64,/9j/4AAQ...\",\n \"imageUrl\": \"https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=1024\",\n \"imageAttachmentId\": \"<string>\",\n \"videoUrl\": \"<string>\",\n \"videoDataUrl\": \"<string>\",\n \"video\": \"<string>\",\n \"videoAttachmentId\": \"<string>\",\n \"prompt_optimizer\": true,\n \"num_inference_steps\": 30,\n \"pro_mode\": false,\n \"resolution\": \"720p\",\n \"num_frames\": 81,\n \"frames_per_second\": 16,\n \"seed\": 123,\n \"enable_safety_checker\": true,\n \"showExplicitContent\": false,\n \"enable_prompt_expansion\": true,\n \"acceleration\": true,\n \"shift\": 123,\n \"age_slider\": 18,\n \"audioEnabled\": false,\n \"video_quality\": \"Standard\",\n \"aspect\": \"Portrait\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nano-gpt.com/api/generate-video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"prompt\": \"A serene lake at sunset with gentle ripples on the water\",\n \"script\": \"<string>\",\n \"conversationUUID\": \"<string>\",\n \"projectId\": \"<string>\",\n \"framework\": \"default\",\n \"shortRequestEnhancer\": false,\n \"targetLengthInWords\": 70,\n \"targetLengthInSeconds\": 123,\n \"directorNotes\": \"Warm, cozy lighting with focus on people interacting\",\n \"aspectRatio\": \"9:16\",\n \"scriptConfig\": {\n \"style\": \"default\",\n \"targetLengthInSeconds\": 30\n },\n \"imageConfig\": {\n \"model\": \"hidream_dev\",\n \"loraConfig\": {\n \"loraSlug\": \"ghibsky-comic-book\"\n }\n },\n \"videoConfig\": {\n \"enabled\": true,\n \"model\": \"kling_v2_1_std_5s\"\n },\n \"voiceoverConfig\": {\n \"enabled\": true,\n \"voiceId\": \"zWDA589rUKXuLnPRDtAG\"\n },\n \"captionsConfig\": {\n \"captionsEnabled\": true,\n \"captionsStyle\": \"tiktok\"\n },\n \"effectsConfig\": {\n \"transition\": \"fade\",\n \"floating\": true\n },\n \"musicConfig\": {\n \"enabled\": true,\n \"musicSlug\": \"gentle_ambient_loop\",\n \"volume\": 0.3,\n \"loop\": true\n },\n \"voice\": \"pNInz6obpgDQGcFmaJgB\",\n \"captionsShow\": true,\n \"captionsStyle\": \"default\",\n \"effects\": {\n \"transition\": \"fade\",\n \"floating\": false\n },\n \"quality\": \"medium\",\n \"motion\": {\n \"enabled\": false,\n \"strength\": 3\n },\n \"music\": \"video-creation/music/dramatic_cinematic_score.mp3\",\n \"duration\": \"5s\",\n \"aspect_ratio\": \"16:9\",\n \"negative_prompt\": \"blur, distort, and low quality\",\n \"cfg_scale\": 0.5,\n \"imageDataUrl\": \"data:image/jpeg;base64,/9j/4AAQ...\",\n \"imageUrl\": \"https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=1024\",\n \"imageAttachmentId\": \"<string>\",\n \"videoUrl\": \"<string>\",\n \"videoDataUrl\": \"<string>\",\n \"video\": \"<string>\",\n \"videoAttachmentId\": \"<string>\",\n \"prompt_optimizer\": true,\n \"num_inference_steps\": 30,\n \"pro_mode\": false,\n \"resolution\": \"720p\",\n \"num_frames\": 81,\n \"frames_per_second\": 16,\n \"seed\": 123,\n \"enable_safety_checker\": true,\n \"showExplicitContent\": false,\n \"enable_prompt_expansion\": true,\n \"acceleration\": true,\n \"shift\": 123,\n \"age_slider\": 18,\n \"audioEnabled\": false,\n \"video_quality\": \"Standard\",\n \"aspect\": \"Portrait\"\n}"
response = http.request(request)
puts response.read_body{
"runId": "<string>",
"status": "pending",
"model": "<string>",
"projectId": "<string>",
"seed": 123,
"cost": 123,
"paymentSource": "<string>",
"remainingBalance": 123,
"prechargeLabel": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Endpoint Examples
Video Generation
Generate videos using supported text-to-video, image-to-video, and video-to-video models. The response includes a runId and pending status; poll the status endpoint for completion. See the docs for the current model list and required inputs.
POST
/
generate-video
cURL
curl --request POST \
--url https://api.nano-gpt.com/api/generate-video \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"model": "<string>",
"callback_url": "<string>",
"prompt": "A serene lake at sunset with gentle ripples on the water",
"script": "<string>",
"conversationUUID": "<string>",
"projectId": "<string>",
"framework": "default",
"shortRequestEnhancer": false,
"targetLengthInWords": 70,
"targetLengthInSeconds": 123,
"directorNotes": "Warm, cozy lighting with focus on people interacting",
"aspectRatio": "9:16",
"scriptConfig": {
"style": "default",
"targetLengthInSeconds": 30
},
"imageConfig": {
"model": "hidream_dev",
"loraConfig": {
"loraSlug": "ghibsky-comic-book"
}
},
"videoConfig": {
"enabled": true,
"model": "kling_v2_1_std_5s"
},
"voiceoverConfig": {
"enabled": true,
"voiceId": "zWDA589rUKXuLnPRDtAG"
},
"captionsConfig": {
"captionsEnabled": true,
"captionsStyle": "tiktok"
},
"effectsConfig": {
"transition": "fade",
"floating": true
},
"musicConfig": {
"enabled": true,
"musicSlug": "gentle_ambient_loop",
"volume": 0.3,
"loop": true
},
"voice": "pNInz6obpgDQGcFmaJgB",
"captionsShow": true,
"captionsStyle": "default",
"effects": {
"transition": "fade",
"floating": false
},
"quality": "medium",
"motion": {
"enabled": false,
"strength": 3
},
"music": "video-creation/music/dramatic_cinematic_score.mp3",
"duration": "5s",
"aspect_ratio": "16:9",
"negative_prompt": "blur, distort, and low quality",
"cfg_scale": 0.5,
"imageDataUrl": "data:image/jpeg;base64,/9j/4AAQ...",
"imageUrl": "https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=1024",
"imageAttachmentId": "<string>",
"videoUrl": "<string>",
"videoDataUrl": "<string>",
"video": "<string>",
"videoAttachmentId": "<string>",
"prompt_optimizer": true,
"num_inference_steps": 30,
"pro_mode": false,
"resolution": "720p",
"num_frames": 81,
"frames_per_second": 16,
"seed": 123,
"enable_safety_checker": true,
"showExplicitContent": false,
"enable_prompt_expansion": true,
"acceleration": true,
"shift": 123,
"age_slider": 18,
"audioEnabled": false,
"video_quality": "Standard",
"aspect": "Portrait"
}
'import requests
url = "https://api.nano-gpt.com/api/generate-video"
payload = {
"model": "<string>",
"callback_url": "<string>",
"prompt": "A serene lake at sunset with gentle ripples on the water",
"script": "<string>",
"conversationUUID": "<string>",
"projectId": "<string>",
"framework": "default",
"shortRequestEnhancer": False,
"targetLengthInWords": 70,
"targetLengthInSeconds": 123,
"directorNotes": "Warm, cozy lighting with focus on people interacting",
"aspectRatio": "9:16",
"scriptConfig": {
"style": "default",
"targetLengthInSeconds": 30
},
"imageConfig": {
"model": "hidream_dev",
"loraConfig": { "loraSlug": "ghibsky-comic-book" }
},
"videoConfig": {
"enabled": True,
"model": "kling_v2_1_std_5s"
},
"voiceoverConfig": {
"enabled": True,
"voiceId": "zWDA589rUKXuLnPRDtAG"
},
"captionsConfig": {
"captionsEnabled": True,
"captionsStyle": "tiktok"
},
"effectsConfig": {
"transition": "fade",
"floating": True
},
"musicConfig": {
"enabled": True,
"musicSlug": "gentle_ambient_loop",
"volume": 0.3,
"loop": True
},
"voice": "pNInz6obpgDQGcFmaJgB",
"captionsShow": True,
"captionsStyle": "default",
"effects": {
"transition": "fade",
"floating": False
},
"quality": "medium",
"motion": {
"enabled": False,
"strength": 3
},
"music": "video-creation/music/dramatic_cinematic_score.mp3",
"duration": "5s",
"aspect_ratio": "16:9",
"negative_prompt": "blur, distort, and low quality",
"cfg_scale": 0.5,
"imageDataUrl": "data:image/jpeg;base64,/9j/4AAQ...",
"imageUrl": "https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=1024",
"imageAttachmentId": "<string>",
"videoUrl": "<string>",
"videoDataUrl": "<string>",
"video": "<string>",
"videoAttachmentId": "<string>",
"prompt_optimizer": True,
"num_inference_steps": 30,
"pro_mode": False,
"resolution": "720p",
"num_frames": 81,
"frames_per_second": 16,
"seed": 123,
"enable_safety_checker": True,
"showExplicitContent": False,
"enable_prompt_expansion": True,
"acceleration": True,
"shift": 123,
"age_slider": 18,
"audioEnabled": False,
"video_quality": "Standard",
"aspect": "Portrait"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
callback_url: '<string>',
prompt: 'A serene lake at sunset with gentle ripples on the water',
script: '<string>',
conversationUUID: '<string>',
projectId: '<string>',
framework: 'default',
shortRequestEnhancer: false,
targetLengthInWords: 70,
targetLengthInSeconds: 123,
directorNotes: 'Warm, cozy lighting with focus on people interacting',
aspectRatio: '9:16',
scriptConfig: {style: 'default', targetLengthInSeconds: 30},
imageConfig: {model: 'hidream_dev', loraConfig: {loraSlug: 'ghibsky-comic-book'}},
videoConfig: {enabled: true, model: 'kling_v2_1_std_5s'},
voiceoverConfig: {enabled: true, voiceId: 'zWDA589rUKXuLnPRDtAG'},
captionsConfig: {captionsEnabled: true, captionsStyle: 'tiktok'},
effectsConfig: {transition: 'fade', floating: true},
musicConfig: {enabled: true, musicSlug: 'gentle_ambient_loop', volume: 0.3, loop: true},
voice: 'pNInz6obpgDQGcFmaJgB',
captionsShow: true,
captionsStyle: 'default',
effects: {transition: 'fade', floating: false},
quality: 'medium',
motion: {enabled: false, strength: 3},
music: 'video-creation/music/dramatic_cinematic_score.mp3',
duration: '5s',
aspect_ratio: '16:9',
negative_prompt: 'blur, distort, and low quality',
cfg_scale: 0.5,
imageDataUrl: 'data:image/jpeg;base64,/9j/4AAQ...',
imageUrl: 'https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=1024',
imageAttachmentId: '<string>',
videoUrl: '<string>',
videoDataUrl: '<string>',
video: '<string>',
videoAttachmentId: '<string>',
prompt_optimizer: true,
num_inference_steps: 30,
pro_mode: false,
resolution: '720p',
num_frames: 81,
frames_per_second: 16,
seed: 123,
enable_safety_checker: true,
showExplicitContent: false,
enable_prompt_expansion: true,
acceleration: true,
shift: 123,
age_slider: 18,
audioEnabled: false,
video_quality: 'Standard',
aspect: 'Portrait'
})
};
fetch('https://api.nano-gpt.com/api/generate-video', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => '<string>',
'callback_url' => '<string>',
'prompt' => 'A serene lake at sunset with gentle ripples on the water',
'script' => '<string>',
'conversationUUID' => '<string>',
'projectId' => '<string>',
'framework' => 'default',
'shortRequestEnhancer' => false,
'targetLengthInWords' => 70,
'targetLengthInSeconds' => 123,
'directorNotes' => 'Warm, cozy lighting with focus on people interacting',
'aspectRatio' => '9:16',
'scriptConfig' => [
'style' => 'default',
'targetLengthInSeconds' => 30
],
'imageConfig' => [
'model' => 'hidream_dev',
'loraConfig' => [
'loraSlug' => 'ghibsky-comic-book'
]
],
'videoConfig' => [
'enabled' => true,
'model' => 'kling_v2_1_std_5s'
],
'voiceoverConfig' => [
'enabled' => true,
'voiceId' => 'zWDA589rUKXuLnPRDtAG'
],
'captionsConfig' => [
'captionsEnabled' => true,
'captionsStyle' => 'tiktok'
],
'effectsConfig' => [
'transition' => 'fade',
'floating' => true
],
'musicConfig' => [
'enabled' => true,
'musicSlug' => 'gentle_ambient_loop',
'volume' => 0.3,
'loop' => true
],
'voice' => 'pNInz6obpgDQGcFmaJgB',
'captionsShow' => true,
'captionsStyle' => 'default',
'effects' => [
'transition' => 'fade',
'floating' => false
],
'quality' => 'medium',
'motion' => [
'enabled' => false,
'strength' => 3
],
'music' => 'video-creation/music/dramatic_cinematic_score.mp3',
'duration' => '5s',
'aspect_ratio' => '16:9',
'negative_prompt' => 'blur, distort, and low quality',
'cfg_scale' => 0.5,
'imageDataUrl' => 'data:image/jpeg;base64,/9j/4AAQ...',
'imageUrl' => 'https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=1024',
'imageAttachmentId' => '<string>',
'videoUrl' => '<string>',
'videoDataUrl' => '<string>',
'video' => '<string>',
'videoAttachmentId' => '<string>',
'prompt_optimizer' => true,
'num_inference_steps' => 30,
'pro_mode' => false,
'resolution' => '720p',
'num_frames' => 81,
'frames_per_second' => 16,
'seed' => 123,
'enable_safety_checker' => true,
'showExplicitContent' => false,
'enable_prompt_expansion' => true,
'acceleration' => true,
'shift' => 123,
'age_slider' => 18,
'audioEnabled' => false,
'video_quality' => 'Standard',
'aspect' => 'Portrait'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nano-gpt.com/api/generate-video"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"prompt\": \"A serene lake at sunset with gentle ripples on the water\",\n \"script\": \"<string>\",\n \"conversationUUID\": \"<string>\",\n \"projectId\": \"<string>\",\n \"framework\": \"default\",\n \"shortRequestEnhancer\": false,\n \"targetLengthInWords\": 70,\n \"targetLengthInSeconds\": 123,\n \"directorNotes\": \"Warm, cozy lighting with focus on people interacting\",\n \"aspectRatio\": \"9:16\",\n \"scriptConfig\": {\n \"style\": \"default\",\n \"targetLengthInSeconds\": 30\n },\n \"imageConfig\": {\n \"model\": \"hidream_dev\",\n \"loraConfig\": {\n \"loraSlug\": \"ghibsky-comic-book\"\n }\n },\n \"videoConfig\": {\n \"enabled\": true,\n \"model\": \"kling_v2_1_std_5s\"\n },\n \"voiceoverConfig\": {\n \"enabled\": true,\n \"voiceId\": \"zWDA589rUKXuLnPRDtAG\"\n },\n \"captionsConfig\": {\n \"captionsEnabled\": true,\n \"captionsStyle\": \"tiktok\"\n },\n \"effectsConfig\": {\n \"transition\": \"fade\",\n \"floating\": true\n },\n \"musicConfig\": {\n \"enabled\": true,\n \"musicSlug\": \"gentle_ambient_loop\",\n \"volume\": 0.3,\n \"loop\": true\n },\n \"voice\": \"pNInz6obpgDQGcFmaJgB\",\n \"captionsShow\": true,\n \"captionsStyle\": \"default\",\n \"effects\": {\n \"transition\": \"fade\",\n \"floating\": false\n },\n \"quality\": \"medium\",\n \"motion\": {\n \"enabled\": false,\n \"strength\": 3\n },\n \"music\": \"video-creation/music/dramatic_cinematic_score.mp3\",\n \"duration\": \"5s\",\n \"aspect_ratio\": \"16:9\",\n \"negative_prompt\": \"blur, distort, and low quality\",\n \"cfg_scale\": 0.5,\n \"imageDataUrl\": \"data:image/jpeg;base64,/9j/4AAQ...\",\n \"imageUrl\": \"https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=1024\",\n \"imageAttachmentId\": \"<string>\",\n \"videoUrl\": \"<string>\",\n \"videoDataUrl\": \"<string>\",\n \"video\": \"<string>\",\n \"videoAttachmentId\": \"<string>\",\n \"prompt_optimizer\": true,\n \"num_inference_steps\": 30,\n \"pro_mode\": false,\n \"resolution\": \"720p\",\n \"num_frames\": 81,\n \"frames_per_second\": 16,\n \"seed\": 123,\n \"enable_safety_checker\": true,\n \"showExplicitContent\": false,\n \"enable_prompt_expansion\": true,\n \"acceleration\": true,\n \"shift\": 123,\n \"age_slider\": 18,\n \"audioEnabled\": false,\n \"video_quality\": \"Standard\",\n \"aspect\": \"Portrait\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nano-gpt.com/api/generate-video")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"prompt\": \"A serene lake at sunset with gentle ripples on the water\",\n \"script\": \"<string>\",\n \"conversationUUID\": \"<string>\",\n \"projectId\": \"<string>\",\n \"framework\": \"default\",\n \"shortRequestEnhancer\": false,\n \"targetLengthInWords\": 70,\n \"targetLengthInSeconds\": 123,\n \"directorNotes\": \"Warm, cozy lighting with focus on people interacting\",\n \"aspectRatio\": \"9:16\",\n \"scriptConfig\": {\n \"style\": \"default\",\n \"targetLengthInSeconds\": 30\n },\n \"imageConfig\": {\n \"model\": \"hidream_dev\",\n \"loraConfig\": {\n \"loraSlug\": \"ghibsky-comic-book\"\n }\n },\n \"videoConfig\": {\n \"enabled\": true,\n \"model\": \"kling_v2_1_std_5s\"\n },\n \"voiceoverConfig\": {\n \"enabled\": true,\n \"voiceId\": \"zWDA589rUKXuLnPRDtAG\"\n },\n \"captionsConfig\": {\n \"captionsEnabled\": true,\n \"captionsStyle\": \"tiktok\"\n },\n \"effectsConfig\": {\n \"transition\": \"fade\",\n \"floating\": true\n },\n \"musicConfig\": {\n \"enabled\": true,\n \"musicSlug\": \"gentle_ambient_loop\",\n \"volume\": 0.3,\n \"loop\": true\n },\n \"voice\": \"pNInz6obpgDQGcFmaJgB\",\n \"captionsShow\": true,\n \"captionsStyle\": \"default\",\n \"effects\": {\n \"transition\": \"fade\",\n \"floating\": false\n },\n \"quality\": \"medium\",\n \"motion\": {\n \"enabled\": false,\n \"strength\": 3\n },\n \"music\": \"video-creation/music/dramatic_cinematic_score.mp3\",\n \"duration\": \"5s\",\n \"aspect_ratio\": \"16:9\",\n \"negative_prompt\": \"blur, distort, and low quality\",\n \"cfg_scale\": 0.5,\n \"imageDataUrl\": \"data:image/jpeg;base64,/9j/4AAQ...\",\n \"imageUrl\": \"https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=1024\",\n \"imageAttachmentId\": \"<string>\",\n \"videoUrl\": \"<string>\",\n \"videoDataUrl\": \"<string>\",\n \"video\": \"<string>\",\n \"videoAttachmentId\": \"<string>\",\n \"prompt_optimizer\": true,\n \"num_inference_steps\": 30,\n \"pro_mode\": false,\n \"resolution\": \"720p\",\n \"num_frames\": 81,\n \"frames_per_second\": 16,\n \"seed\": 123,\n \"enable_safety_checker\": true,\n \"showExplicitContent\": false,\n \"enable_prompt_expansion\": true,\n \"acceleration\": true,\n \"shift\": 123,\n \"age_slider\": 18,\n \"audioEnabled\": false,\n \"video_quality\": \"Standard\",\n \"aspect\": \"Portrait\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nano-gpt.com/api/generate-video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"prompt\": \"A serene lake at sunset with gentle ripples on the water\",\n \"script\": \"<string>\",\n \"conversationUUID\": \"<string>\",\n \"projectId\": \"<string>\",\n \"framework\": \"default\",\n \"shortRequestEnhancer\": false,\n \"targetLengthInWords\": 70,\n \"targetLengthInSeconds\": 123,\n \"directorNotes\": \"Warm, cozy lighting with focus on people interacting\",\n \"aspectRatio\": \"9:16\",\n \"scriptConfig\": {\n \"style\": \"default\",\n \"targetLengthInSeconds\": 30\n },\n \"imageConfig\": {\n \"model\": \"hidream_dev\",\n \"loraConfig\": {\n \"loraSlug\": \"ghibsky-comic-book\"\n }\n },\n \"videoConfig\": {\n \"enabled\": true,\n \"model\": \"kling_v2_1_std_5s\"\n },\n \"voiceoverConfig\": {\n \"enabled\": true,\n \"voiceId\": \"zWDA589rUKXuLnPRDtAG\"\n },\n \"captionsConfig\": {\n \"captionsEnabled\": true,\n \"captionsStyle\": \"tiktok\"\n },\n \"effectsConfig\": {\n \"transition\": \"fade\",\n \"floating\": true\n },\n \"musicConfig\": {\n \"enabled\": true,\n \"musicSlug\": \"gentle_ambient_loop\",\n \"volume\": 0.3,\n \"loop\": true\n },\n \"voice\": \"pNInz6obpgDQGcFmaJgB\",\n \"captionsShow\": true,\n \"captionsStyle\": \"default\",\n \"effects\": {\n \"transition\": \"fade\",\n \"floating\": false\n },\n \"quality\": \"medium\",\n \"motion\": {\n \"enabled\": false,\n \"strength\": 3\n },\n \"music\": \"video-creation/music/dramatic_cinematic_score.mp3\",\n \"duration\": \"5s\",\n \"aspect_ratio\": \"16:9\",\n \"negative_prompt\": \"blur, distort, and low quality\",\n \"cfg_scale\": 0.5,\n \"imageDataUrl\": \"data:image/jpeg;base64,/9j/4AAQ...\",\n \"imageUrl\": \"https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=1024\",\n \"imageAttachmentId\": \"<string>\",\n \"videoUrl\": \"<string>\",\n \"videoDataUrl\": \"<string>\",\n \"video\": \"<string>\",\n \"videoAttachmentId\": \"<string>\",\n \"prompt_optimizer\": true,\n \"num_inference_steps\": 30,\n \"pro_mode\": false,\n \"resolution\": \"720p\",\n \"num_frames\": 81,\n \"frames_per_second\": 16,\n \"seed\": 123,\n \"enable_safety_checker\": true,\n \"showExplicitContent\": false,\n \"enable_prompt_expansion\": true,\n \"acceleration\": true,\n \"shift\": 123,\n \"age_slider\": 18,\n \"audioEnabled\": false,\n \"video_quality\": \"Standard\",\n \"aspect\": \"Portrait\"\n}"
response = http.request(request)
puts response.read_body{
"runId": "<string>",
"status": "pending",
"model": "<string>",
"projectId": "<string>",
"seed": 123,
"cost": 123,
"paymentSource": "<string>",
"remainingBalance": 123,
"prechargeLabel": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Image-conditioned models accept eitherimageDataUrl(base64) or a publicimageUrl. The service uses the explicit value you provide before checking any saved attachments.
Overview
POST /generate-video submits an asynchronous job to create, extend, or edit a video. The endpoint responds immediately with runId, id, model, and status: "pending". runId and id are the same NanoGPT job identifier (format vid_...). Poll the unified Video Status endpoint with that job ID until you receive final assets. Duration-based billing is assessed after completion.
Zero Data Retention (ZDR) does not cover video generation or 3D requests through this endpoint. These requests still run when ZDR-only routing is enabled, and providers may store your prompts, input media and outputs. See the Privacy Policy.
error.message (and HTTP status) to help users correct content-policy or validation issues.
Extend Workflows
UsePOST /api/generate-video with an extend model plus prompt and a source video (videoUrl, videoDataUrl, or videoAttachmentId). video is only accepted by select models (for example, wan-wavespeed-25-extend). Max source video length: 120 seconds.
Request Schema
Only include the fields required by your chosenmodel. Unknown keys are ignored, but some models fail when extra media fields are present.
Core Fields
| field | type | required | details |
|---|---|---|---|
model | string | yes | Video model ID. Model availability changes; discover models via GET /api/v1/video-models?detailed=true. |
conversationUUID | string | no | Attach the request to a conversation thread. |
prompt | string | conditional | Required for text-to-video and edit models unless a structured script is supplied. |
negative_prompt | string | no | Suppresses specific content. Respected by Veo, Wan, Runway, Pixverse, and other models noted below. |
script | string | conditional | LongStories models accept full scripts instead of relying on prompt. |
storyConfig | object | conditional | LongStories structured payload (e.g. scenes, narration, voice). |
animation | boolean | no | Enables animation for LongStories outputs. |
language | string | no | Output language for LongStories. |
characters | array | no | Character definitions for LongStories. |
duration | string | conditional | Seconds as a string ("5", "8", "60"). Limits vary per model; see individual entries. |
seconds | string | conditional | Sora-specific duration selector ("4", "8", "12"). |
aspect_ratio | string | conditional | Ratios such as 16:9, 9:16, 1:1, 3:4, 4:3, 21:9, auto. |
orientation | string | conditional | landscape or portrait for Sora and Wan text/image flows. |
resolution | string | conditional | Resolution tokens (480p, 580p, 720p, 1080p, 1792x1024, 2k, 4k). |
size | string | conditional | Output size preset (supported by select models). |
mode | string | no | Operation mode: text-to-video, image-to-video, reference-to-video, video-edit. |
generateAudio | boolean | no | Adds AI audio on Veo 3 and Lightricks models. Defaults to false. |
enhancePrompt | boolean | no | Optional Veo 3 prompt optimizer. Defaults to false. |
pro_mode / pro | boolean | no | High-quality toggle for Sora and Hunyuan families. Defaults to false. |
enable_prompt_expansion | boolean | no | Prompt booster for Wan/Seedance/Minimax variants. Disabled by default. |
enable_safety_checker | boolean | no | Optional safety checker toggle (supported by select models). |
camera_fix / camera_fixed / cameraFixed | boolean | no | Locks the virtual camera for Seedance and Wan variants. |
seed | number or string | no | Optional seed forwarded on model/provider routes that support it. For models with returned seeds, omit it, leave it blank or send -1 for a random seed: NanoGPT picks one and returns it as seed in the submission response. This may improve reproducibility but does not guarantee identical output. |
voiceId | string | conditional | Alternate voice selector for lipsync models. |
voice_id | string | conditional | Required by kling-lipsync-t2v. |
voice_language | string | conditional | en or zh for kling-lipsync-t2v. |
voice_speed | number | conditional | Range 0.8-2.0 for kling-lipsync-t2v. |
videoDuration / billedDuration | number | no | Optional overrides for upscaler billing calculations. |
adjust_fps_for_interpolation | boolean | no | Optional toggle for interpolation-aware upscaling. Defaults to false. |
Media Inputs
| field | type | required | details |
|---|---|---|---|
imageDataUrl | string | conditional | Base64-encoded data URL. Recommended for private assets or files larger than 4 MB. |
imageUrl | string | conditional | HTTPS link to a source image. |
imageAttachmentId | string | conditional | Reference to a library-stored image. |
image | string | conditional | Alternate image field accepted by select models. Prefer imageUrl unless the model explicitly requires image. |
reference_image | string | conditional | Optional still image guiding runwayml-gen4-aleph. |
referenceImages | array | conditional | Multiple reference images for reference-to-video flows. |
referenceVideos | array | conditional | Multiple reference videos. |
audioDataUrl | string | conditional | Base64 data URL for audio-driven models. |
audioDuration | number | conditional | Duration of provided audio in seconds. |
audioUrl | string | conditional | HTTPS audio input. |
audio | string | conditional | Alternate audio field accepted by select models. Prefer audioUrl unless the model explicitly requires audio. |
videoUrl | string | conditional | HTTPS link to a source video (edit, extend, upscaler, or lipsync jobs). |
videoDataUrl | string | conditional | Base64 data URL for a source video. |
video | string | conditional | Alternate video field accepted by select models. Prefer videoUrl unless the model explicitly requires video. |
videoAttachmentId | string | conditional | Reference to a library-stored video. |
swapImage | string | conditional | Swap image (face-swap models). |
targetVideo | string | conditional | Target video (face-swap models). |
targetFaceIndex | number | no | Optional face index (face-swap models). |
Provide only the media fields that your target model expects. Extra media inputs often trigger validation errors. PrefervideoUrl(camelCase) for source videos; only sendvideowhen the model explicitly requires it.
Advanced Controls
| field | type | models |
|---|---|---|
num_frames | integer | Wan 2.2 families, Seedance 22 5B, Wan image-to-video. |
frames_per_second | integer | Wan 2.2 5B. |
num_inference_steps | integer | Wan 2.2 families. |
guidance_scale | number | Wan 2.2 5B. |
shift | number | Wan 2.2 5B. |
interpolator_model | string | Wan 2.2 5B. |
num_interpolated_frames | integer | Wan 2.2 5B. |
movementAmplitude | string | Select models (for example auto, small, medium, large). |
motion | string | Select models (for example low, high). |
style | string | Select models (style/preset strings). |
effectType, effect, cameraMovement, motionMode, soundEffectSwitch, soundEffectPrompt | varies | Pixverse v4.5/v5. |
mode | string | Select models (for example animate, replace). |
prompt_optimizer | boolean | Select models. |
Model Discovery
Video model IDs and supported fields change over time. UseGET /api/v1/models?detailed=true to discover the current list and select a model intended for video generation.
Notes:
- Different models accept different media inputs (for example
imageUrlvs a sourcevideoUrl) and may support different duration / resolution options. - If you see validation errors, first retry with only the minimal required fields for your chosen model.
Returned seeds
For these models NanoGPT picks the seed of a random request itself, sends it to the provider and returns it, so you can reuse it. Random seeds are drawn from 0 to 2147483647.- Wan 2.2, 2.5, 2.6, 2.7 and 3.0 video models, including Spicy, edit, extend and speech-to-video variants, and HappyHorse 1.0 and 1.1
- Veo 3.1 and Veo 3.1 Fast, including Extend
- Seedance 1.0 Pro, 1.0 Pro Fast, 1.5 Pro and 1.5 Pro Fast (including Extend), and the Seedance 2.0, 2.0 Fast, 2.0 Mini and 2.5 Spicy image-to-video models
- P-Video 2 and P-Video 2 Pro
- PixVerse V6 Max:
0also means random, so random seeds start at 1 - HeyGen Video 1: explicit seeds up to 4294967295 are accepted
- LTX-2.3 Spicy and MiniMax H3 Spicy image-to-video
Async Processing & Status Polling
- The submission response includes
{ runId, id, model, status: "pending" }whereidandrunIdare identical. - Submissions to models with returned seeds also return
seed: the seed NanoGPT sent to the provider, including one it picked for a random request. Send it back asseedto reuse it; identical output is not guaranteed. - Poll
/api/video/status?requestId=<runId>(orrunId) until the job reachesstatus: "COMPLETED"orstatus: "FAILED". The legacy/api/generate-video/statusendpoint is deprecated. - Many jobs emit intermediate states (
queued,processing,generating,delivering). Persist them if you need audit trails. - Failed jobs include an
errorobject. Surface the message and adjust prompts or inputs before retrying. - Duration and resolution determine credit usage.
Response example
{
"runId": "vid_m1abc123def456",
"id": "vid_m1abc123def456",
"status": "pending",
"model": "veo2-video",
"cost": 0.35,
"paymentSource": "XNO",
"remainingBalance": 12.5,
"prechargeLabel": "string"
}
Content & Safety Notes
Some models may block prompts that violate content policies. Non-200 responses describe the violation reason; relay these messages verbatim to users or implement automated prompt adjustments.Next Steps
- Poll the Video Status endpoint after every submission to retrieve final assets.
- Keep customer-facing pricing tables in sync with the API behavior you observe in production.
Body
application/json
Parameters for video generation across different models and providers
Optional seed forwarded on model/provider routes that support it. For models with returned seeds (see the video generation guide), omit it, leave it blank or send -1 for a random seed: NanoGPT picks one, sends it to the provider and returns it as seed. This may improve reproducibility but does not guarantee identical output.
Response
Video generation request submitted successfully (asynchronous processing)