{
"error": {
"type": "invalid_api_key",
"message": "The provided API key is invalid. Please ensure your API key is correct and active. You can find more information about obtaining a key on our website: https://naga.ac If you just created this key, wait a few minutes and try again."
}
}
{
"error": {
"type": "insufficient_quota",
"message": "More credits required to process this request. Visit https://naga.ac/dashboard/credits to add credits."
}
}
Starts a video job and answers 202 at once: a clip takes from half a minute to several minutes. Requires an API key. Poll GET /v1/videos/{id} until status is completed or failed, then fetch the file from GET /v1/videos/{id}/content. NagaAI holds the full price of the clip on the balance while the job runs and charges it once, when the clip is ready. A job that fails is not charged.
POST
https://api.naga.ac
/
v1
/
videos
curl
curl https://api.naga.ac/v1/videos \ -H "Authorization: Bearer $NAGA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "kling-v3.0-pro", "prompt": "A red paper boat drifting on a calm lake at dawn", "duration": 8, "resolution": "720p", "aspect_ratio": "16:9", "generate_audio": true}'
import requests
url = "https://api.naga.ac/v1/videos"
payload = {
"model": "kling-v3.0-pro",
"prompt": "A red paper boat drifting on a calm lake at dawn"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'kling-v3.0-pro',
prompt: 'A red paper boat drifting on a calm lake at dawn'
})
};
fetch('https://api.naga.ac/v1/videos', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.naga.ac/v1/videos"
payload := strings.NewReader("{\n \"model\": \"kling-v3.0-pro\",\n \"prompt\": \"A red paper boat drifting on a calm lake at dawn\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}
{
"error": {
"type": "invalid_api_key",
"message": "The provided API key is invalid. Please ensure your API key is correct and active. You can find more information about obtaining a key on our website: https://naga.ac If you just created this key, wait a few minutes and try again."
}
}
{
"error": {
"type": "insufficient_quota",
"message": "More credits required to process this request. Visit https://naga.ac/dashboard/credits to add credits."
}
}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"NagaAI Documentation","colors":{"primary":"#6467f2","light":"#60a5fa","dark":"#18181b"},"logo":{"light":"https://mintcdn.com/nagaai-60f8697b/3Tc2Ajidq18FPFoC/static/img/logo-light.svg?fit=max\u0026auto=format\u0026n=3Tc2Ajidq18FPFoC\u0026q=85\u0026s=18d579338bd90baa596e41e2e2322393","dark":"https://mintcdn.com/nagaai-60f8697b/3Tc2Ajidq18FPFoC/static/img/logo-dark.svg?fit=max\u0026auto=format\u0026n=3Tc2Ajidq18FPFoC\u0026q=85\u0026s=f4927df5611f5a22c6984a3e7b91b6a0"},"favicon":"https://mintcdn.com/nagaai-60f8697b/nbl1KDrtw3_cqedh/static/img/favicon.ico?fit=max\u0026auto=format\u0026n=nbl1KDrtw3_cqedh\u0026q=85\u0026s=a8361945277b5cce4de483745aa5c21c","api":{"params":{"expanded":"all"},"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python","javascript","go"],"prefill":true},"url":"full"},"appearance":{"default":"dark"},"background":{"color":{"dark":"#09090b"}},"navbar":{"links":[{"href":"https://naga.ac","label":"Home"},{"href":"https://naga.ac/models","label":"Models"},{"href":"https://naga.ac/playground","label":"Playground"}]},"footer":{"socials":{"discord":"https://discord.naga.ac","github":"https://github.com/naga-ai-hub","x":"https://x.com/NagaAIProject","reddit":"https://www.reddit.com/r/NagaAI"},"links":[{"header":"Community","items":[{"label":"Status","href":"https://status.naga.ac"},{"label":"Announcements","href":"https://naga.ac/announcements"},{"label":"Support","href":"https://discord.naga.ac"}]},{"header":"Resources","items":[{"label":"Models","href":"https://naga.ac/models"},{"label":"Playground","href":"https://naga.ac/playground"},{"label":"Chat","href":"https://chat.naga.ac"}]},{"header":"Legal","items":[{"label":"Privacy","href":"https://naga.ac/legal/privacy"},{"label":"Terms","href":"https://naga.ac/legal/terms"}]}]},"contextual":{"options":["copy","view","download-spec","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"nagaai-60f8697b","hasAudioNarration":false,"actualSubdomain":"nagaai-60f8697b","customDomains":["docs.naga.ac"],"gitSource":{"type":"github","owner":"naga-ai-hub","repo":"naga-ai","deployBranch":"master","contentDirectory":"docs-site","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae5161182ccf06a27992d9c","collectionId":"0dc46fec-872a-4384-86ac-58d0f591d2a2","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae5161182ccf06a27992d9c"},"entitlements":{},"buildId":"6ae5161182ccf06a27992d9c","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"default","tag":"Docs","count":50},{"language":"default","tag":"API guides","count":26},{"language":"default","tag":"API Reference","count":24},{"language":"default","tag":"Endpoints","count":23},{"language":"default","tag":"Integrations","count":12},{"language":"default","tag":"Account","count":11},{"language":"default","tag":"Responses","count":8},{"language":"default","tag":"Features","count":8},{"language":"default","tag":"Chat Completions","count":7},{"language":"default","tag":"Coding agents","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/videos/create-a-video","slug":"/api-reference/videos/create-a-video","pageMetadata":{"title":"Create a video","description":"Starts a video job and answers `202` at once: a clip takes from half a minute to several minutes. Requires an API key. Poll `GET /v1/videos/{id}` until `status` is `completed` or `failed`, then fetch the file from `GET /v1/videos/{id}/content`. NagaAI holds the full price of the clip on the balance while the job runs and charges it once, when the clip is ready. A job that fails is not charged.","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/videos","href":"/api-reference/videos/create-a-video","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Starts a video job and answers \", _jsx(_components.code, {\n children: \"202\"\n }), \" at once: a clip takes from half a minute to several minutes. Requires an API key. Poll \", _jsx(_components.code, {\n children: \"GET /v1/videos/{id}\"\n }), \" until \", _jsx(_components.code, {\n children: \"status\"\n }), \" is \", _jsx(_components.code, {\n children: \"completed\"\n }), \" or \", _jsx(_components.code, {\n children: \"failed\"\n }), \", then fetch the file from \", _jsx(_components.code, {\n children: \"GET /v1/videos/{id}/content\"\n }), \". NagaAI holds the full price of the clip on the balance while the job runs and charges it once, when the clip is ready. A job that fails is not charged.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a video","description":"Starts a video job and answers `202` at once: a clip takes from half a minute to several minutes. Requires an API key. Poll `GET /v1/videos/{id}` until `status` is `completed` or `failed`, then fetch the file from `GET /v1/videos/{id}/content`. NagaAI holds the full price of the clip on the balance while the job runs and charges it once, when the clip is ready. A job that fails is not charged.","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/videos","href":"/api-reference/videos/create-a-video","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Videos"],"summary":"Create a video","description":"Starts a video job and answers `202` at once: a clip takes from half a minute to several minutes. Requires an API key. Poll `GET /v1/videos/{id}` until `status` is `completed` or `failed`, then fetch the file from `GET /v1/videos/{id}/content`. NagaAI holds the full price of the clip on the balance while the job runs and charges it once, when the clip is ready. A job that fails is not charged.","operationId":"create_video","requestBody":"629f2913-79a6-48c1-81d1-15bda4eaa917","responses":{"202":"1d03afbb-9a9a-4fb5-9e9c-69b20464837a","400":"0287277a-c0cb-4cd5-a8b1-a35910e4f8d8","401":"5d25fa29-fb0c-46c2-b2d5-81e7841e280f","402":"db69449f-2d5d-457e-aefa-eac8cca87b0f","403":"181e0828-ac57-4872-ae7d-1601abeb49f5","413":"cf0f0de0-572f-4d9c-a746-b3bbc940409f","500":"1ee02657-ac97-47f1-a82e-77e4f5cfcd62","503":"f81a809b-b521-4337-83af-00c118e89987"},"security":["8ebc1036-5b75-4bc5-b47e-9d3291a12cce","c871a446-cb36-4593-88c7-3b1d6403971e"],"x-codeSamples":[{"lang":"bash","label":"curl","source":"curl https://api.naga.ac/v1/videos \\\n -H \"Authorization: Bearer $NAGA_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"kling-v3.0-pro\",\n \"prompt\": \"A red paper boat drifting on a calm lake at dawn\",\n \"duration\": 8,\n \"resolution\": \"720p\",\n \"aspect_ratio\": \"16:9\",\n \"generate_audio\": true\n}'"}],"x-mcp":{"name":"naga_create_video","annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true}},"method":"post","type":"path","servers":["a46560f1-0d6b-4caf-b4af-585cacc5d4a5"],"path":"/v1/videos","baseUrlOptions":["https://api.naga.ac"],"title":"Create a video","codeSamples":[{"label":"curl","lang":"bash","source":"curl https://api.naga.ac/v1/videos \\\n -H \"Authorization: Bearer $NAGA_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"kling-v3.0-pro\",\n \"prompt\": \"A red paper boat drifting on a calm lake at dawn\",\n \"duration\": 8,\n \"resolution\": \"720p\",\n \"aspect_ratio\": \"16:9\",\n \"generate_audio\": true\n}'"}],"requestExampleLanguages":["bash","python","javascript","go"],"requiredOnlyExamples":true,"requestExampleType":"codeSamples","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.model":"kling-v3.0-pro","body.prompt":"A red paper boat drifting on a calm lake at dawn","body.duration.oneOf.0":8,"body.resolution.oneOf.0":"720p","body.aspect_ratio.oneOf.0":"16:9","body.generate_audio.oneOf.0":true}],"urlDisplay":"full"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"Start one video generation job.","required":["model","prompt"],"properties":{"model":{"type":"string","description":"The video model, named by its id or alias.","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"prompt":{"type":"string","description":"What to generate, in words. One to 8192 characters, and moderation screens it first.","isRequired":true,"uniqueKey":"prompt","typeLabel":"string"},"duration":{"oneOf":[{"type":"integer","format":"int64","description":"Clip length in seconds; one of the model's `supported_durations`. Absent takes the model's default.","uniqueKey":"duration.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"Clip length in seconds; one of the model's `supported_durations`. Absent takes the model's default.","uniqueKey":"duration.oneOf.1","typeLabel":"null"}],"uniqueKey":"duration","typeLabel":"integer\u003cint64> | null"},"resolution":{"oneOf":[{"type":"string","description":"One of the model's `supported_resolutions`, such as `720p`. Absent takes the model's default.","uniqueKey":"resolution.oneOf.0","typeLabel":"string"},{"type":"null","description":"One of the model's `supported_resolutions`, such as `720p`. Absent takes the model's default.","uniqueKey":"resolution.oneOf.1","typeLabel":"null"}],"uniqueKey":"resolution","typeLabel":"string | null"},"aspect_ratio":{"oneOf":[{"type":"string","description":"One of the model's `supported_aspect_ratios`, such as `16:9`. Absent takes the model's default.","uniqueKey":"aspect_ratio.oneOf.0","typeLabel":"string"},{"type":"null","description":"One of the model's `supported_aspect_ratios`, such as `16:9`. Absent takes the model's default.","uniqueKey":"aspect_ratio.oneOf.1","typeLabel":"null"}],"uniqueKey":"aspect_ratio","typeLabel":"string | null"},"frame_images":{"oneOf":[{"type":"array","items":{"type":"object","description":"One frame image: an image URL and the frame it pins.","required":["type","image_url","frame_type"],"properties":{"type":{"type":"string","description":"Always `image_url`.","isRequired":true,"uniqueKey":"frame_images.oneOf.0.items.[INDEX].type","typeLabel":"string"},"image_url":{"type":"object","description":"The image, as a public `https` URL or a `data:` URI.","required":["url"],"properties":{"url":{"type":"string","description":"A public `https` URL or a `data:` URI.","isRequired":true,"uniqueKey":"frame_images.oneOf.0.items.[INDEX].image_url.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"frame_images.oneOf.0.items.[INDEX].image_url","typeLabel":"object"},"frame_type":{"type":"string","description":"`first_frame` or `last_frame`.","isRequired":true,"uniqueKey":"frame_images.oneOf.0.items.[INDEX].frame_type","typeLabel":"string"}},"uniqueKey":"frame_images.oneOf.0.items.[INDEX]","typeLabel":"object"},"description":"Images that become the first or the last frame, one per frame type.","uniqueKey":"frame_images.oneOf.0","typeLabel":"object[]"},{"type":"null","items":{"type":"object","description":"One frame image: an image URL and the frame it pins.","required":["type","image_url","frame_type"],"properties":{"type":{"type":"string","description":"Always `image_url`."},"image_url":{"type":"object","description":"The image, as a public `https` URL or a `data:` URI.","required":["url"],"properties":{"url":{"type":"string","description":"A public `https` URL or a `data:` URI."}}},"frame_type":{"type":"string","description":"`first_frame` or `last_frame`."}}},"description":"Images that become the first or the last frame, one per frame type.","uniqueKey":"frame_images.oneOf.1","typeLabel":"null"}],"uniqueKey":"frame_images","typeLabel":"object[] | null"},"generate_audio":{"oneOf":[{"type":"boolean","description":"Ask for a soundtrack. Only a model with `generate_audio` accepts `true`, and the audio price applies.","uniqueKey":"generate_audio.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Ask for a soundtrack. Only a model with `generate_audio` accepts `true`, and the audio price applies.","uniqueKey":"generate_audio.oneOf.1","typeLabel":"null"}],"uniqueKey":"generate_audio","typeLabel":"boolean | null"},"seed":{"oneOf":[{"type":"integer","format":"int64","description":"A seed for repeatable output, where the model supports one.","uniqueKey":"seed.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"A seed for repeatable output, where the model supports one.","uniqueKey":"seed.oneOf.1","typeLabel":"null"}],"uniqueKey":"seed","typeLabel":"integer\u003cint64> | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"basic":{"title":"basic","value":{"model":"kling-v3.0-pro","prompt":"A red paper boat drifting on a calm lake at dawn","duration":8,"resolution":"720p","aspect_ratio":"16:9","generate_audio":true}}},"exampleType":"examples"}},"required":true,"exampleType":"examples"},"responses":{"1d03afbb-9a9a-4fb5-9e9c-69b20464837a":{"description":"The job, accepted and queued. Poll `polling_url` until `status` is `completed` or `failed`.","content":{"application/json":{"schema":{"type":"object","description":"A video job as the gateway reports it.","required":["id","object","model","status","polling_url","created_at","duration","resolution","aspect_ratio"],"properties":{"id":{"type":"string","description":"The job id; the polling and content URLs carry it.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","description":"Always `video.generation`.","example":"video.generation","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"model":{"type":"string","description":"The model the job was submitted for, as the caller named it.","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"status":{"type":"string","description":"`pending`, `in_progress`, `completed` or `failed`.","isRequired":true,"uniqueKey":"status","typeLabel":"string"},"polling_url":{"type":"string","description":"Where to poll this job.","isRequired":true,"uniqueKey":"polling_url","typeLabel":"string"},"created_at":{"type":"integer","format":"int64","description":"Unix seconds when the job was accepted.","isRequired":true,"uniqueKey":"created_at","typeLabel":"integer\u003cint64>"},"duration":{"type":"integer","format":"int64","description":"The requested clip length in seconds.","isRequired":true,"uniqueKey":"duration","typeLabel":"integer\u003cint64>"},"resolution":{"type":"string","description":"The requested resolution.","isRequired":true,"uniqueKey":"resolution","typeLabel":"string"},"aspect_ratio":{"type":"string","description":"The requested aspect ratio.","isRequired":true,"uniqueKey":"aspect_ratio","typeLabel":"string"},"completed_at":{"oneOf":[{"type":"integer","format":"int64","description":"Unix seconds when the job reached `completed` or `failed`.","uniqueKey":"completed_at.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"Unix seconds when the job reached `completed` or `failed`.","uniqueKey":"completed_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"completed_at","typeLabel":"integer\u003cint64> | null"},"urls":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"urls.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Links to the finished file; present once the job is `completed`.","uniqueKey":"urls.oneOf.0","typeLabel":"string[]"},{"type":"null","items":{"type":"string"},"description":"Links to the finished file; present once the job is `completed`.","uniqueKey":"urls.oneOf.1","typeLabel":"null"}],"uniqueKey":"urls","typeLabel":"string[] | null"},"usage":{"oneOf":[{"type":"object","description":"What the job was charged; present once the job is `completed`.","required":["cost","seconds"],"properties":{"cost":{"type":"string","description":"Credits charged, as a decimal string.","isRequired":true,"uniqueKey":"usage.oneOf.0.cost","typeLabel":"string"},"seconds":{"type":"integer","format":"int64","description":"Seconds of video the charge counts.","isRequired":true,"uniqueKey":"usage.oneOf.0.seconds","typeLabel":"integer\u003cint64>"}},"uniqueKey":"usage.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"usage.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage","typeLabel":"object | null"},"error":{"oneOf":[{"type":"object","description":"Why the job failed; present only when it is `failed`. A failed job is not charged.","required":["message","type"],"properties":{"message":{"type":"string","description":"A short, provider-neutral reason.","isRequired":true,"uniqueKey":"error.oneOf.0.message","typeLabel":"string"},"type":{"type":"string","description":"`upstream_error`, `moderation` or `timeout`.","isRequired":true,"uniqueKey":"error.oneOf.0.type","typeLabel":"string"}},"uniqueKey":"error.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"error.oneOf.1","typeLabel":"null"}],"uniqueKey":"error","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"basic":{"title":"basic","value":{"id":"4b1f0c2e9a7d4e6f8a3b5c1d2e7f9a0b","object":"video.generation","model":"kling-v3.0-pro","status":"pending","polling_url":"https://api.naga.ac/v1/videos/4b1f0c2e9a7d4e6f8a3b5c1d2e7f9a0b","created_at":1774000000,"duration":8,"resolution":"720p","aspect_ratio":"16:9"}}},"exampleType":"examples"}},"x-retry-safe":false,"exampleType":"examples"},"0287277a-c0cb-4cd5-a8b1-a35910e4f8d8":{"description":"The request is malformed: a field failed its constraint, the body is not valid JSON, the model is unknown, or a value is not one the model supports.","content":{"application/json":{"schema":{"type":"object","description":"`{\"error\": {…}}` — the body of every non-2xx answer outside `/v1/messages`.","required":["error"],"properties":{"error":{"type":"object","description":"The failure itself, and the envelope's only member.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; a provider's own class can reach you unchanged.","examples":["invalid_request_error","authentication_required","invalid_api_key","invalid_provisioning_key","invalid_session_token","disabled_api_key","disabled_provisioning_key","expired_api_key","credit_limit_exceeded","rate_limit_exceeded","model_deprecated","inappropriate_content","billing_metering_incomplete","billing_request_id_invalid","billing_writer_missing","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"The human-readable sentence shown to the caller.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","description":"The finer-grained code, when the failure has one.","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"The finer-grained code, when the failure has one.","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"param":{"oneOf":[{"type":"string","description":"The request field the failure is about, when it is about one.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"The request field the failure is about, when it is about one.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request_error","message":"\u003cstring>","code":"\u003cstring>","param":"\u003cstring>"}}}},"exampleType":"generated"}},"x-retry-safe":false,"exampleType":"generated"},"5d25fa29-fb0c-46c2-b2d5-81e7841e280f":{"description":"The API key is missing, malformed, disabled, or does not belong to an account that may call this route.","content":{"application/json":{"schema":{"type":"object","description":"`{\"error\": {…}}` — the body of every non-2xx answer outside `/v1/messages`.","required":["error"],"properties":{"error":{"type":"object","description":"The failure itself, and the envelope's only member.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; a provider's own class can reach you unchanged.","examples":["invalid_request_error","authentication_required","invalid_api_key","invalid_provisioning_key","invalid_session_token","disabled_api_key","disabled_provisioning_key","expired_api_key","credit_limit_exceeded","rate_limit_exceeded","model_deprecated","inappropriate_content","billing_metering_incomplete","billing_request_id_invalid","billing_writer_missing","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"The human-readable sentence shown to the caller.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","description":"The finer-grained code, when the failure has one.","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"The finer-grained code, when the failure has one.","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"param":{"oneOf":[{"type":"string","description":"The request field the failure is about, when it is about one.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"The request field the failure is about, when it is about one.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"invalid-api-key":{"title":"invalid-api-key","value":{"error":{"type":"invalid_api_key","message":"The provided API key is invalid. Please ensure your API key is correct and active. You can find more information about obtaining a key on our website: https://naga.ac If you just created this key, wait a few minutes and try again."}}}},"exampleType":"examples"}},"x-retry-safe":false,"exampleType":"examples"},"db69449f-2d5d-457e-aefa-eac8cca87b0f":{"description":"The balance, less the holds of the account's running video jobs, does not cover the full price of this one.","content":{"application/json":{"schema":{"type":"object","description":"`{\"error\": {…}}` — the body of every non-2xx answer outside `/v1/messages`.","required":["error"],"properties":{"error":{"type":"object","description":"The failure itself, and the envelope's only member.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; a provider's own class can reach you unchanged.","examples":["invalid_request_error","authentication_required","invalid_api_key","invalid_provisioning_key","invalid_session_token","disabled_api_key","disabled_provisioning_key","expired_api_key","credit_limit_exceeded","rate_limit_exceeded","model_deprecated","inappropriate_content","billing_metering_incomplete","billing_request_id_invalid","billing_writer_missing","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"The human-readable sentence shown to the caller.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","description":"The finer-grained code, when the failure has one.","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"The finer-grained code, when the failure has one.","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"param":{"oneOf":[{"type":"string","description":"The request field the failure is about, when it is about one.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"The request field the failure is about, when it is about one.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"insufficient-credits":{"title":"insufficient-credits","value":{"error":{"type":"insufficient_quota","message":"More credits required to process this request. Visit https://naga.ac/dashboard/credits to add credits."}}}},"exampleType":"examples"}},"x-retry-safe":false,"exampleType":"examples"},"181e0828-ac57-4872-ae7d-1601abeb49f5":{"description":"The prompt was blocked by the moderation policy, or what is left of the key's credit limit does not cover the price.","content":{"application/json":{"schema":{"type":"object","description":"`{\"error\": {…}}` — the body of every non-2xx answer outside `/v1/messages`.","required":["error"],"properties":{"error":{"type":"object","description":"The failure itself, and the envelope's only member.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; a provider's own class can reach you unchanged.","examples":["invalid_request_error","authentication_required","invalid_api_key","invalid_provisioning_key","invalid_session_token","disabled_api_key","disabled_provisioning_key","expired_api_key","credit_limit_exceeded","rate_limit_exceeded","model_deprecated","inappropriate_content","billing_metering_incomplete","billing_request_id_invalid","billing_writer_missing","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"The human-readable sentence shown to the caller.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","description":"The finer-grained code, when the failure has one.","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"The finer-grained code, when the failure has one.","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"param":{"oneOf":[{"type":"string","description":"The request field the failure is about, when it is about one.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"The request field the failure is about, when it is about one.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request_error","message":"\u003cstring>","code":"\u003cstring>","param":"\u003cstring>"}}}},"exampleType":"generated"}},"x-retry-safe":false,"exampleType":"generated"},"cf0f0de0-572f-4d9c-a746-b3bbc940409f":{"description":"The request body is larger than the 32 MiB this gateway accepts.","content":{"application/json":{"schema":{"type":"object","description":"`{\"error\": {…}}` — the body of every non-2xx answer outside `/v1/messages`.","required":["error"],"properties":{"error":{"type":"object","description":"The failure itself, and the envelope's only member.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; a provider's own class can reach you unchanged.","examples":["invalid_request_error","authentication_required","invalid_api_key","invalid_provisioning_key","invalid_session_token","disabled_api_key","disabled_provisioning_key","expired_api_key","credit_limit_exceeded","rate_limit_exceeded","model_deprecated","inappropriate_content","billing_metering_incomplete","billing_request_id_invalid","billing_writer_missing","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"The human-readable sentence shown to the caller.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","description":"The finer-grained code, when the failure has one.","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"The finer-grained code, when the failure has one.","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"param":{"oneOf":[{"type":"string","description":"The request field the failure is about, when it is about one.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"The request field the failure is about, when it is about one.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request_error","message":"\u003cstring>","code":"\u003cstring>","param":"\u003cstring>"}}}},"exampleType":"generated"}},"x-retry-safe":false,"exampleType":"generated"},"1ee02657-ac97-47f1-a82e-77e4f5cfcd62":{"description":"The gateway failed for a reason of its own. Report it — this status marks NagaAI's own bugs, never an upstream verdict.","content":{"application/json":{"schema":{"type":"object","description":"`{\"error\": {…}}` — the body of every non-2xx answer outside `/v1/messages`.","required":["error"],"properties":{"error":{"type":"object","description":"The failure itself, and the envelope's only member.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; a provider's own class can reach you unchanged.","examples":["invalid_request_error","authentication_required","invalid_api_key","invalid_provisioning_key","invalid_session_token","disabled_api_key","disabled_provisioning_key","expired_api_key","credit_limit_exceeded","rate_limit_exceeded","model_deprecated","inappropriate_content","billing_metering_incomplete","billing_request_id_invalid","billing_writer_missing","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"The human-readable sentence shown to the caller.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","description":"The finer-grained code, when the failure has one.","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"The finer-grained code, when the failure has one.","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"param":{"oneOf":[{"type":"string","description":"The request field the failure is about, when it is about one.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"The request field the failure is about, when it is about one.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request_error","message":"\u003cstring>","code":"\u003cstring>","param":"\u003cstring>"}}}},"exampleType":"generated"}},"x-retry-safe":true,"exampleType":"generated"},"f81a809b-b521-4337-83af-00c118e89987":{"description":"No upstream could take the job, or a store the gateway needs did not respond. `Retry-After`, when present, carries the suggested wait.","headers":{"Retry-After":{"schema":{"type":"string"},"description":"How long to wait before retrying, in seconds."}},"content":{"application/json":{"schema":{"type":"object","description":"`{\"error\": {…}}` — the body of every non-2xx answer outside `/v1/messages`.","required":["error"],"properties":{"error":{"type":"object","description":"The failure itself, and the envelope's only member.","required":["type","message"],"properties":{"type":{"type":"string","description":"The class of the failure; a provider's own class can reach you unchanged.","examples":["invalid_request_error","authentication_required","invalid_api_key","invalid_provisioning_key","invalid_session_token","disabled_api_key","disabled_provisioning_key","expired_api_key","credit_limit_exceeded","rate_limit_exceeded","model_deprecated","inappropriate_content","billing_metering_incomplete","billing_request_id_invalid","billing_writer_missing","server_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"The human-readable sentence shown to the caller.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","description":"The finer-grained code, when the failure has one.","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","description":"The finer-grained code, when the failure has one.","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"},"param":{"oneOf":[{"type":"string","description":"The request field the failure is about, when it is about one.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"The request field the failure is about, when it is about one.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request_error","message":"\u003cstring>","code":"\u003cstring>","param":"\u003cstring>"}}}},"exampleType":"generated"}},"x-retry-safe":true,"exampleType":"generated"}},"security":{"8ebc1036-5b75-4bc5-b47e-9d3291a12cce":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An account API key. Send it as `Authorization: Bearer \u003ckey>`.","scopes":[],"schemeName":"bearerAuth"}},"c871a446-cb36-4593-88c7-3b1d6403971e":{"xApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"An account API key. Send it as `x-api-key: \u003ckey>`, the header Anthropic-style clients use.","scopes":[],"schemeName":"xApiKeyAuth"}}},"servers":{"a46560f1-0d6b-4caf-b4af-585cacc5d4a5":{"url":"https://api.naga.ac","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"An account API key. Send it as `Authorization: Bearer \u003ckey>`.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"An account API key. Send it as `Authorization: Bearer \u003ckey>`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"},{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"An account API key. Send it as `x-api-key: \u003ckey>`, the header Anthropic-style clients use.","scopes":[],"schemeName":"xApiKeyAuth"},"schema":{"title":"x-api-key","type":"string","description":"An account API key. Send it as `x-api-key: \u003ckey>`, the header Anthropic-style clients use.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"xApiKeyAuth","name":"x-api-key"}],"title":"xApiKeyAuth"}]},"originalFileLocation":"openapi/naga-api.json"},"subdomain":"nagaai-60f8697b","siteName":"NagaAI Documentation","title":"Create a video - NagaAI Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-30T21:50:43.765Z","originalFileLocation":"api-reference/videos/create-a-video.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Starts a video job and answers 202 at once: a clip takes from half a minute to several minutes. Requires an API key. Poll GET /v1/videos/{id} until status is completed or failed, then fetch the file from GET /v1/videos/{id}/content. NagaAI holds the full price of the clip on the balance while the job runs and charges it once, when the clip is ready. A job that fails is not charged.\">\u003cmeta data-mint-head name=\"application-name\" content=\"NagaAI Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a video - NagaAI Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Starts a video job and answers 202 at once: a clip takes from half a minute to several minutes. Requires an API key. Poll GET /v1/videos/{id} until status is completed or failed, then fetch the file from GET /v1/videos/{id}/content. NagaAI holds the full price of the clip on the balance while the job runs and charges it once, when the clip is ready. A job that fails is not charged.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"NagaAI Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.naga.ac/api-reference/videos/create-a-video\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://nagaai-60f8697b.mintlify.app/_mintlify/api/og/v2?division=Videos\u0026amp;title=Create+a+video\u0026amp;description=Starts+a+video+job+and+answers+%60202%60+at+once%3A+a+clip+takes+from+half+a+minute+to+several+minutes.+Requires+an+API+key.+Poll+%60GET+%2Fv1%2Fvideos%2F%7Bid%7D%60+until+%60status%60\u0026amp;theme=989a06cbb0921617168d151b\u0026amp;signature=2f6d39ff2aa48b90398e4c3d6c27004980d00697c824a7c1cc0f0f9769f11d7f\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create a video - NagaAI Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Starts a video job and answers 202 at once: a clip takes from half a minute to several minutes. Requires an API key. Poll GET /v1/videos/{id} until status is completed or failed, then fetch the file from GET /v1/videos/{id}/content. NagaAI holds the full price of the clip on the balance while the job runs and charges it once, when the clip is ready. A job that fails is not charged.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://nagaai-60f8697b.mintlify.app/_mintlify/api/og/v2?division=Videos\u0026amp;title=Create+a+video\u0026amp;description=Starts+a+video+job+and+answers+%60202%60+at+once%3A+a+clip+takes+from+half+a+minute+to+several+minutes.+Requires+an+API+key.+Poll+%60GET+%2Fv1%2Fvideos%2F%7Bid%7D%60+until+%60status%60\u0026amp;theme=989a06cbb0921617168d151b\u0026amp;signature=2f6d39ff2aa48b90398e4c3d6c27004980d00697c824a7c1cc0f0f9769f11d7f\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/nagaai-60f8697b/GL7s2nR26U7RrKZ8/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"NagaAI Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6467f2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.naga.ac/api-reference/videos/create-a-video\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/videos/create-a-video.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.naga.ac/#organization\",\"name\":\"NagaAI Documentation\",\"url\":\"https://docs.naga.ac\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/nagaai-60f8697b/3Tc2Ajidq18FPFoC/static/img/logo-light.svg?fit=max\u0026auto=format\u0026n=3Tc2Ajidq18FPFoC\u0026q=85\u0026s=18d579338bd90baa596e41e2e2322393\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.naga.ac#website\",\"name\":\"NagaAI Documentation\",\"url\":\"https://docs.naga.ac\",\"publisher\":{\"@id\":\"https://docs.naga.ac/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.naga.ac/api-reference/videos/create-a-video#webpage\",\"url\":\"https://docs.naga.ac/api-reference/videos/create-a-video\",\"name\":\"Create a video\",\"description\":\"Starts a video job and answers 202 at once: a clip takes from half a minute to several minutes. Requires an API key. Poll GET /v1/videos/{id} until status is completed or failed, then fetch the file from GET /v1/videos/{id}/content. NagaAI holds the full price of the clip on the balance while the job runs and charges it once, when the clip is ready. A job that fails is not charged.\",\"dateModified\":\"2026-10-30T21:50:43.765Z\",\"isPartOf\":{\"@id\":\"https://docs.naga.ac#website\"},\"breadcrumb\":{\"@id\":\"https://docs.naga.ac/api-reference/videos/create-a-video#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.naga.ac/api-reference/videos/create-a-video#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.naga.ac/api-reference/responses/create-a-response\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a video\",\"item\":\"https://docs.naga.ac/api-reference/videos/create-a-video\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.naga.ac/api-reference/videos/create-a-video#apireference\",\"headline\":\"Create a video\",\"name\":\"Create a video\",\"description\":\"Starts a video job and answers 202 at once: a clip takes from half a minute to several minutes. Requires an API key. Poll GET /v1/videos/{id} until status is completed or failed, then fetch the file from GET /v1/videos/{id}/content. NagaAI holds the full price of the clip on the balance while the job runs and charges it once, when the clip is ready. A job that fails is not charged.\",\"url\":\"https://docs.naga.ac/api-reference/videos/create-a-video\",\"mainEntityOfPage\":{\"@id\":\"https://docs.naga.ac/api-reference/videos/create-a-video#webpage\"},\"dateModified\":\"2026-10-30T21:50:43.765Z\",\"publisher\":{\"@id\":\"https://docs.naga.ac/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.naga.ac#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"NagaAI Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"NagaAI Documentation","nav":{"global":null,"tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":"/get-started/overview"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API reference","sidebarTitle":"Overview","icon":"book","href":"/api-reference/overview"}]},{"group":"Endpoints","pages":[{"group":"Responses","expanded":false,"pages":[{"title":"Create a response","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/responses","href":"/api-reference/responses/create-a-response"}]},{"group":"Chat Completions","expanded":false,"pages":[{"title":"Create a chat completion","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/chat/completions","href":"/api-reference/chat-completions/create-a-chat-completion"}]},{"group":"Messages","expanded":false,"pages":[{"title":"Create a message","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/messages","href":"/api-reference/messages/create-a-message"}]},{"group":"Models","expanded":false,"pages":[{"title":"List models","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/models","href":"/api-reference/models/list-models"}]},{"group":"Startups","expanded":false,"pages":[{"title":"List startups","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/startups","href":"/api-reference/startups/list-startups"}]},{"group":"Embeddings","expanded":false,"pages":[{"title":"Create embeddings","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/embeddings","href":"/api-reference/embeddings/create-embeddings"}]},{"group":"Moderations","expanded":false,"pages":[{"title":"Classify content","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/moderations","href":"/api-reference/moderations/classify-content"}]},{"group":"Audio","expanded":false,"pages":[{"title":"Create speech","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/audio/speech","href":"/api-reference/audio/create-speech"},{"title":"Create a transcription","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/audio/transcriptions","href":"/api-reference/audio/create-a-transcription"},{"title":"Create a translation","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/audio/translations","href":"/api-reference/audio/create-a-translation"}]},{"group":"Images","expanded":false,"pages":[{"title":"Create an image","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/images/generations","href":"/api-reference/images/create-an-image"},{"title":"Edit an image","description":"Edits uploaded images against a text prompt and charges the account for what it counted. Requires an API key. `/v1/images/generations` draws from a prompt alone.","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/images/edits","href":"/api-reference/images/edit-an-image"}]},{"group":"Videos","expanded":false,"pages":[{"title":"Create a video","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/videos","href":"/api-reference/videos/create-a-video"},{"title":"Get a video job","description":"Returns a video job as it stands now. Requires the API key of the account that created it. `urls` and `usage` appear when `status` is `completed`, `error` when it is `failed`.","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/videos/{id}","href":"/api-reference/videos/get-a-video-job"},{"title":"Download a video","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/videos/{id}/content","href":"/api-reference/videos/download-a-video"},{"title":"List video models","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/videos/models","href":"/api-reference/videos/list-video-models"}]},{"group":"Account","expanded":false,"pages":[{"title":"Get the account balance","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/account/balance","href":"/api-reference/account/get-the-account-balance"},{"title":"Get account activity","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/account/activity","href":"/api-reference/account/get-account-activity"},{"group":"API Keys","expanded":false,"pages":[{"title":"List API keys","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/account/keys","href":"/api-reference/api-keys/list-api-keys"},{"title":"Create an API key","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json post /v1/account/keys","href":"/api-reference/api-keys/create-an-api-key"},{"title":"Get an API key","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json get /v1/account/keys/{key_id}","href":"/api-reference/api-keys/get-an-api-key"},{"title":"Update an API key","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json patch /v1/account/keys/{key_id}","href":"/api-reference/api-keys/update-an-api-key"},{"title":"Delete an API key","deprecated":null,"version":null,"openapi":"/openapi/naga-api.json delete /v1/account/keys/{key_id}","href":"/api-reference/api-keys/delete-an-api-key"}]}]}]}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/agents/claude-code"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Create a video - NagaAI Documentation","buildId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","deploymentId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-B7XKH4J3.js","utils-lOYzL7z-.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DF6jUUIM.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dpsj5f7C.js","snippetPresets-CYeiDe8v.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CUFz1YZ_.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-D8H_iLS4.js","shallow-DdluZBHX.js","getApiPlaygroundDisplay-B9922vev.js","CodeSnippet-CMoRNGYs.js","CodeSnippets-DwyrPHuw.js","Page-DSVu9Ucl.js","getPastedJson-G-zIvlHh.js","icon-B03fnEy0.js","MethodPill-CW7teklc.js","DuplicateIcon-CtO8eekd.js","createIcon-DZTKdM_A.js","DynamicMarkdown-D5M2At0B.js","SectionHeading-C_2NaA2U.js","axios-vUo_bRtp.js","Markdown-D7QRHV3m.js","clsx-D1Z-ELXV.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-lvhuD9Du.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CKfC4ywL.js"]}