Create Vertex video task
curl --request POST \
--url https://api.aiohub.org/v1/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/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/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/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/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/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/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": "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
Submit a Seedance video task using Vertex AI, with examples, input limits and full parameters.
POST
/
v1
/
publishers
/
{publisher}
/
models
/
{model}
:predictLongRunning
Create Vertex video task
curl --request POST \
--url https://api.aiohub.org/v1/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/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/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/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/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/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/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": "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"
}Call Seedance through the Vertex AI long-running operation format. Poll with POST and
The response includes the fields below. Save the full
After saving the task identifier, poll the task.
See Video models and pricing for model limits. Arbitrary
If your client includes a project and location, use creation with a project path.
operationName; successful results appear in response.videos.
For a client using Gemini API paths, follow the Gemini API endpoint.
Setup
Usehttps://api.aiohub.org and authenticate with an AIOHub API key. Replace <AIOHUB_API_KEY> with your full sk- key and confirm its group can access the selected Seedance model.
Example request
curl "https://api.aiohub.org/v1/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": "publishers/bytedance/models/doubao-seedance-2-5-260628/operations/task_example",
"done": false
}
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.
If creation times out without a task identifier, check the usage log before resubmitting to avoid duplicate generation and charges. Correct parameters after a 400 and check the API key after a 401. See Authentication for access and quota requirements.
Authorizations
API key (sk-xxx)
Path Parameters
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.