Create Vertex video task with project path
curl --request POST \
--url https://api.aiohub.org/v1/projects/{project}/locations/{location}/publishers/{publisher}/models/{model}:predictLongRunning \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instances": [
{
"prompt": "A blue ceramic cup on a wooden table in daylight."
}
],
"parameters": {
"durationSeconds": 4,
"aspectRatio": "16:9",
"resolution": "720p",
"generateAudio": true,
"sampleCount": 1
}
}
'import requests
url = "https://api.aiohub.org/v1/projects/{project}/locations/{location}/publishers/{publisher}/models/{model}:predictLongRunning"
payload = {
"instances": [{ "prompt": "A blue ceramic cup on a wooden table in daylight." }],
"parameters": {
"durationSeconds": 4,
"aspectRatio": "16:9",
"resolution": "720p",
"generateAudio": True,
"sampleCount": 1
}
}
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({
instances: [{prompt: 'A blue ceramic cup on a wooden table in daylight.'}],
parameters: {
durationSeconds: 4,
aspectRatio: '16:9',
resolution: '720p',
generateAudio: true,
sampleCount: 1
}
})
};
fetch('https://api.aiohub.org/v1/projects/{project}/locations/{location}/publishers/{publisher}/models/{model}:predictLongRunning', 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.aiohub.org/v1/projects/{project}/locations/{location}/publishers/{publisher}/models/{model}:predictLongRunning",
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([
'instances' => [
[
'prompt' => 'A blue ceramic cup on a wooden table in daylight.'
]
],
'parameters' => [
'durationSeconds' => 4,
'aspectRatio' => '16:9',
'resolution' => '720p',
'generateAudio' => true,
'sampleCount' => 1
]
]),
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.aiohub.org/v1/projects/{project}/locations/{location}/publishers/{publisher}/models/{model}:predictLongRunning"
payload := strings.NewReader("{\n \"instances\": [\n {\n \"prompt\": \"A blue ceramic cup on a wooden table in daylight.\"\n }\n ],\n \"parameters\": {\n \"durationSeconds\": 4,\n \"aspectRatio\": \"16:9\",\n \"resolution\": \"720p\",\n \"generateAudio\": true,\n \"sampleCount\": 1\n }\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.aiohub.org/v1/projects/{project}/locations/{location}/publishers/{publisher}/models/{model}:predictLongRunning")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instances\": [\n {\n \"prompt\": \"A blue ceramic cup on a wooden table in daylight.\"\n }\n ],\n \"parameters\": {\n \"durationSeconds\": 4,\n \"aspectRatio\": \"16:9\",\n \"resolution\": \"720p\",\n \"generateAudio\": true,\n \"sampleCount\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiohub.org/v1/projects/{project}/locations/{location}/publishers/{publisher}/models/{model}:predictLongRunning")
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 \"instances\": [\n {\n \"prompt\": \"A blue ceramic cup on a wooden table in daylight.\"\n }\n ],\n \"parameters\": {\n \"durationSeconds\": 4,\n \"aspectRatio\": \"16:9\",\n \"resolution\": \"720p\",\n \"generateAudio\": true,\n \"sampleCount\": 1\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "projects/my-project/locations/us-central1/publishers/bytedance/models/doubao-seedance-2-5-260628/operations/task_example",
"done": false
}{
"code": "invalid_duration",
"message": "duration must be between 4 and 30 seconds for this model"
}Create video · Vertex AI project path
Create a Seedance video through the Vertex AI path with project and location.
POST
/
v1
/
projects
/
{project}
/
locations
/
{location}
/
publishers
/
{publisher}
/
models
/
{model}
:predictLongRunning
Create Vertex video task with project path
curl --request POST \
--url https://api.aiohub.org/v1/projects/{project}/locations/{location}/publishers/{publisher}/models/{model}:predictLongRunning \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instances": [
{
"prompt": "A blue ceramic cup on a wooden table in daylight."
}
],
"parameters": {
"durationSeconds": 4,
"aspectRatio": "16:9",
"resolution": "720p",
"generateAudio": true,
"sampleCount": 1
}
}
'import requests
url = "https://api.aiohub.org/v1/projects/{project}/locations/{location}/publishers/{publisher}/models/{model}:predictLongRunning"
payload = {
"instances": [{ "prompt": "A blue ceramic cup on a wooden table in daylight." }],
"parameters": {
"durationSeconds": 4,
"aspectRatio": "16:9",
"resolution": "720p",
"generateAudio": True,
"sampleCount": 1
}
}
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({
instances: [{prompt: 'A blue ceramic cup on a wooden table in daylight.'}],
parameters: {
durationSeconds: 4,
aspectRatio: '16:9',
resolution: '720p',
generateAudio: true,
sampleCount: 1
}
})
};
fetch('https://api.aiohub.org/v1/projects/{project}/locations/{location}/publishers/{publisher}/models/{model}:predictLongRunning', 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.aiohub.org/v1/projects/{project}/locations/{location}/publishers/{publisher}/models/{model}:predictLongRunning",
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([
'instances' => [
[
'prompt' => 'A blue ceramic cup on a wooden table in daylight.'
]
],
'parameters' => [
'durationSeconds' => 4,
'aspectRatio' => '16:9',
'resolution' => '720p',
'generateAudio' => true,
'sampleCount' => 1
]
]),
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.aiohub.org/v1/projects/{project}/locations/{location}/publishers/{publisher}/models/{model}:predictLongRunning"
payload := strings.NewReader("{\n \"instances\": [\n {\n \"prompt\": \"A blue ceramic cup on a wooden table in daylight.\"\n }\n ],\n \"parameters\": {\n \"durationSeconds\": 4,\n \"aspectRatio\": \"16:9\",\n \"resolution\": \"720p\",\n \"generateAudio\": true,\n \"sampleCount\": 1\n }\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.aiohub.org/v1/projects/{project}/locations/{location}/publishers/{publisher}/models/{model}:predictLongRunning")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instances\": [\n {\n \"prompt\": \"A blue ceramic cup on a wooden table in daylight.\"\n }\n ],\n \"parameters\": {\n \"durationSeconds\": 4,\n \"aspectRatio\": \"16:9\",\n \"resolution\": \"720p\",\n \"generateAudio\": true,\n \"sampleCount\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiohub.org/v1/projects/{project}/locations/{location}/publishers/{publisher}/models/{model}:predictLongRunning")
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 \"instances\": [\n {\n \"prompt\": \"A blue ceramic cup on a wooden table in daylight.\"\n }\n ],\n \"parameters\": {\n \"durationSeconds\": 4,\n \"aspectRatio\": \"16:9\",\n \"resolution\": \"720p\",\n \"generateAudio\": true,\n \"sampleCount\": 1\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "projects/my-project/locations/us-central1/publishers/bytedance/models/doubao-seedance-2-5-260628/operations/task_example",
"done": false
}{
"code": "invalid_duration",
"message": "duration must be between 4 and 30 seconds for this model"
}Use this path when the client includes a project and location. Authenticate with an AIOHub API key; the example publisher is
The response includes the fields below. Save the full
Save the full
See Video models and pricing for model limits. Arbitrary
bytedance, and model is the full Seedance model name.
Example request
curl "https://api.aiohub.org/v1/projects/<PROJECT>/locations/<LOCATION>/publishers/bytedance/models/doubao-seedance-2-5-260628:predictLongRunning" \
-H "Authorization: Bearer <AIOHUB_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"instances": [{
"prompt": "A blue ceramic cup on a wooden table in daylight."
}],
"parameters": {
"durationSeconds": 4,
"aspectRatio": "16:9",
"resolution": "720p",
"generateAudio": true,
"sampleCount": 1
}
}'
name, including the model path and operations/, rather than only its final ID segment.
{
"name": "projects/<PROJECT>/locations/<LOCATION>/publishers/bytedance/models/doubao-seedance-2-5-260628/operations/task_example",
"done": false
}
name, then poll with the project path.
Inputs and parameters
Omitted controls default to 5 seconds, 720p,adaptive aspect ratio and audio enabled. First/last frames and reference images are separate input modes; do not combine them in the same instances[0].
Example image object:
{"bytesBase64Encoded": "<BASE64_IMAGE>", "mimeType": "image/png"}
gs:// inputs, video extension and the full Veo parameter set are not supported. Use Ark / Seedance for reference audio, reference video or video editing.Authorizations
API key (sk-xxx)
Path Parameters
Project identifier in the client's path.
Example:
"my-project"
Location identifier in the client's path.
Example:
"us-central1"
Model publisher; Seedance examples use bytedance.
Example:
"bytedance"
Full Seedance model name.
Example:
"doubao-seedance-2-5-260628"
Body
application/json
This schema covers Seedance. lastFrame requires image; reference images cannot be combined with first/last frames. Video extension, masks, seed, negativePrompt and other unlisted controls are unsupported.