curl https://api.naga.ac/v1/videos/4b1f0c2e9a7d4e6f8a3b5c1d2e7f9a0b \
-H "Authorization: Bearer $NAGA_API_KEY"import requests
url = "https://api.naga.ac/v1/videos/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.naga.ac/v1/videos/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.naga.ac/v1/videos/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "4b1f0c2e9a7d4e6f8a3b5c1d2e7f9a0b",
"object": "video.generation",
"model": "kling-v3.0-pro",
"status": "completed",
"polling_url": "https://api.naga.ac/v1/videos/4b1f0c2e9a7d4e6f8a3b5c1d2e7f9a0b",
"created_at": 1774000000,
"duration": 8,
"resolution": "720p",
"aspect_ratio": "16:9",
"completed_at": 1774000095,
"urls": [
"https://api.naga.ac/v1/videos/4b1f0c2e9a7d4e6f8a3b5c1d2e7f9a0b/content"
],
"usage": {
"cost": "0.672",
"seconds": 8
}
}{
"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": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}Get a video job
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.
curl https://api.naga.ac/v1/videos/4b1f0c2e9a7d4e6f8a3b5c1d2e7f9a0b \
-H "Authorization: Bearer $NAGA_API_KEY"import requests
url = "https://api.naga.ac/v1/videos/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.naga.ac/v1/videos/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.naga.ac/v1/videos/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "4b1f0c2e9a7d4e6f8a3b5c1d2e7f9a0b",
"object": "video.generation",
"model": "kling-v3.0-pro",
"status": "completed",
"polling_url": "https://api.naga.ac/v1/videos/4b1f0c2e9a7d4e6f8a3b5c1d2e7f9a0b",
"created_at": 1774000000,
"duration": 8,
"resolution": "720p",
"aspect_ratio": "16:9",
"completed_at": 1774000095,
"urls": [
"https://api.naga.ac/v1/videos/4b1f0c2e9a7d4e6f8a3b5c1d2e7f9a0b/content"
],
"usage": {
"cost": "0.672",
"seconds": 8
}
}{
"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": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}Authorizations
An account API key. Send it as Authorization: Bearer <key>.
Path Parameters
The job's id, as POST /v1/videos returned it.
Response
The job as it stands now.
A video job as the gateway reports it.
The job id; the polling and content URLs carry it.
Always video.generation.
"video.generation"
The model the job was submitted for, as the caller named it.
pending, in_progress, completed or failed.
Where to poll this job.
Unix seconds when the job was accepted.
The requested clip length in seconds.
The requested resolution.
The requested aspect ratio.
Unix seconds when the job reached completed or failed.
Links to the finished file; present once the job is completed.