const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({prompt: '<string>'})
};
fetch('https://www.ninjachat.ai/api/v1/video', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.ninjachat.ai/api/v1/video"
payload = { "prompt": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://www.ninjachat.ai/api/v1/video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>"
}
'{
"id": "<string>",
"object": "video",
"status": "queued",
"model": "<string>",
"cost_usd": 1,
"request_id": "<string>",
"cost": {
"this_request": "<string>",
"per_image": "<string>",
"per_video": "<string>",
"images": 1
},
"balance": "<string>",
"metadata": {
"latency_ms": 1,
"group": "<string>",
"search_depth": "<string>",
"results_count": 1
},
"message": "<string>",
"trace_request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}Create a video job (legacy path)
Supported compatibility surface — kept working indefinitely, but not the path for new integrations. Modern equivalent: POST /videos.
Backward-compatible alias of /videos.
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({prompt: '<string>'})
};
fetch('https://www.ninjachat.ai/api/v1/video', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.ninjachat.ai/api/v1/video"
payload = { "prompt": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://www.ninjachat.ai/api/v1/video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>"
}
'{
"id": "<string>",
"object": "video",
"status": "queued",
"model": "<string>",
"cost_usd": 1,
"request_id": "<string>",
"cost": {
"this_request": "<string>",
"per_image": "<string>",
"per_video": "<string>",
"images": 1
},
"balance": "<string>",
"metadata": {
"latency_ms": 1,
"group": "<string>",
"search_depth": "<string>",
"results_count": 1
},
"message": "<string>",
"trace_request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}Authorizations
Use an API key created in the NinjaChat developer console.
Headers
Safely retry the same logical write without duplicate billing or execution.
1 - 255Body
1 - 4000nova-reel, runway-gen4.5, flux-3-video, minimax-h3, hailuo-2.3, hailuo-2.3-fast, happyhorse-1.1, ray-3.2, seedance-2.5, seedance-2, seedance-2.0-fast, seedance-2-mini, seedance-2.0, seedance-1.5-pro, seedance-lite, seedance-pro, grok-imagine-video, grok-imagine-video-1.5, kling-2.5-turbo, kling-3, kling-3-pro, kling-3-turbo, kling-3-omni, wan-2.7, wan-2.7-i2v, wan-2.7-r2v, wan-2.6, wan-2.6-i2v, wan-2.2-t2v-a14b, fast-wan-2.2, fast-wan-qad, pruna-p-video, pixverse-6, pixverse-6-i2v, cosmos-3-nano, cosmos-3-super, vidu-q3, veo-3.1, veo-3.1-fast, gemini-omni-flash, kling-video, google-veo-2, google-veo-3-fast, google-veo-3.1, google-veo-3.1-fast, google-veo, seedance-2-video, seedance-video 3 <= x <= 1516:9, 9:16, 1:1 4Revise a finished clip in place instead of starting from scratch: the id returned by POST /videos. The prompt then describes the change (task edit, the default) or what happens next (task extend). Only gemini-omni-flash clips can be revised, and model must match the clip; leave model out to inherit it.
^vid_[A-Za-z0-9-]+$With video_id: edit keeps the clip's length and changes its content; extend appends duration seconds (3–10) of new footage, up to 40 seconds total. Defaults to edit.
edit, extend Response
Queued video job.
video queued 1 - 160x >= 0Show child attributes
Show child attributes
Show child attributes
Show child attributes
Original request receipt ID, also returned in X-Request-ID. Use id or request_id to poll the video job.