curl --request POST \
--url https://api.octen.ai/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"duration": 123,
"frame_images": [
{
"image": "<string>"
}
],
"input_references": [
{
"image": "<string>"
}
],
"generate_audio": true,
"seed": 123,
"extra_params": {}
}
'import requests
url = "https://api.octen.ai/v1/videos"
payload = {
"prompt": "<string>",
"duration": 123,
"frame_images": [{ "image": "<string>" }],
"input_references": [{ "image": "<string>" }],
"generate_audio": True,
"seed": 123,
"extra_params": {}
}
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({
prompt: '<string>',
duration: 123,
frame_images: [{image: '<string>'}],
input_references: [{image: '<string>'}],
generate_audio: true,
seed: 123,
extra_params: {}
})
};
fetch('https://api.octen.ai/v1/videos', 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.octen.ai/v1/videos",
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([
'prompt' => '<string>',
'duration' => 123,
'frame_images' => [
[
'image' => '<string>'
]
],
'input_references' => [
[
'image' => '<string>'
]
],
'generate_audio' => true,
'seed' => 123,
'extra_params' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.octen.ai/v1/videos"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"frame_images\": [\n {\n \"image\": \"<string>\"\n }\n ],\n \"input_references\": [\n {\n \"image\": \"<string>\"\n }\n ],\n \"generate_audio\": true,\n \"seed\": 123,\n \"extra_params\": {}\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))
}HttpResponse<String> response = Unirest.post("https://api.octen.ai/v1/videos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"frame_images\": [\n {\n \"image\": \"<string>\"\n }\n ],\n \"input_references\": [\n {\n \"image\": \"<string>\"\n }\n ],\n \"generate_audio\": true,\n \"seed\": 123,\n \"extra_params\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.octen.ai/v1/videos")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"frame_images\": [\n {\n \"image\": \"<string>\"\n }\n ],\n \"input_references\": [\n {\n \"image\": \"<string>\"\n }\n ],\n \"generate_audio\": true,\n \"seed\": 123,\n \"extra_params\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"model": "<string>",
"status": "queued",
"created": 123
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"code": 123,
"msg": "<string>",
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}Video Generation
Generates a video from a text prompt, optionally guided by reference images.
curl --request POST \
--url https://api.octen.ai/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"duration": 123,
"frame_images": [
{
"image": "<string>"
}
],
"input_references": [
{
"image": "<string>"
}
],
"generate_audio": true,
"seed": 123,
"extra_params": {}
}
'import requests
url = "https://api.octen.ai/v1/videos"
payload = {
"prompt": "<string>",
"duration": 123,
"frame_images": [{ "image": "<string>" }],
"input_references": [{ "image": "<string>" }],
"generate_audio": True,
"seed": 123,
"extra_params": {}
}
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({
prompt: '<string>',
duration: 123,
frame_images: [{image: '<string>'}],
input_references: [{image: '<string>'}],
generate_audio: true,
seed: 123,
extra_params: {}
})
};
fetch('https://api.octen.ai/v1/videos', 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.octen.ai/v1/videos",
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([
'prompt' => '<string>',
'duration' => 123,
'frame_images' => [
[
'image' => '<string>'
]
],
'input_references' => [
[
'image' => '<string>'
]
],
'generate_audio' => true,
'seed' => 123,
'extra_params' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.octen.ai/v1/videos"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"frame_images\": [\n {\n \"image\": \"<string>\"\n }\n ],\n \"input_references\": [\n {\n \"image\": \"<string>\"\n }\n ],\n \"generate_audio\": true,\n \"seed\": 123,\n \"extra_params\": {}\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))
}HttpResponse<String> response = Unirest.post("https://api.octen.ai/v1/videos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"frame_images\": [\n {\n \"image\": \"<string>\"\n }\n ],\n \"input_references\": [\n {\n \"image\": \"<string>\"\n }\n ],\n \"generate_audio\": true,\n \"seed\": 123,\n \"extra_params\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.octen.ai/v1/videos")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"frame_images\": [\n {\n \"image\": \"<string>\"\n }\n ],\n \"input_references\": [\n {\n \"image\": \"<string>\"\n }\n ],\n \"generate_audio\": true,\n \"seed\": 123,\n \"extra_params\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"model": "<string>",
"status": "queued",
"created": 123
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"code": 123,
"msg": "<string>",
"request_id": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}Authorizations
Bearer token used for request authentication. Alternatively, you can send the API key in the x-api-key header. Note: A payment method is required to use the API.
Body
JSON request body for the Video Generation API.
The model to use.
minimax/minimax-h3, bytedance/seedance-2.5, google/veo-3.1, google/veo-3.1-fast, google/veo-3.1-lite The text description of the video.
Video length in seconds. When omitted, the model default applies.
Output resolution. When omitted, the model default applies.
480p, 720p, 768p, 1080p, 2K Aspect ratio. adaptive lets the model follow the input. When omitted, the model default applies.
16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive Images to use as the first and last frames of the video.
Show child attributes
Show child attributes
Reference images that guide generation without locking specific frames.
Show child attributes
Show child attributes
Whether to generate audio along with the video.
Random seed, for more reproducible results.
Vendor-specific parameters, passed through to the upstream model without validation. Keys that duplicate a unified parameter, or that control upstream storage, notification, sample count, or platform behavior, are rejected.
Response
Successful video generation response. The task starts in queued.
Was this page helpful?