Generate an AI video ad. Two approaches: "exact" (talking actor reads your exact script — requires actorId from list_avatars) or "realistic" (cinematic UGC from a scene prompt). Returns a projectId immediately — poll get_generation_status for results. Video is expensive; credits are reserved up front.
curl --request POST \
--url https://app.adstellar.ai/api/v1/tools/generate_video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scriptText": "<string>",
"actorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voiceId": "<string>",
"scenePrompt": "<string>",
"model": "<string>",
"durationSeconds": 32,
"variationCount": 2,
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productImageUrl": "<string>",
"tone": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://app.adstellar.ai/api/v1/tools/generate_video"
payload = {
"scriptText": "<string>",
"actorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voiceId": "<string>",
"scenePrompt": "<string>",
"model": "<string>",
"durationSeconds": 32,
"variationCount": 2,
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productImageUrl": "<string>",
"tone": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
scriptText: '<string>',
actorId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
voiceId: '<string>',
scenePrompt: '<string>',
model: '<string>',
durationSeconds: 32,
variationCount: 2,
productId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
productImageUrl: '<string>',
tone: '<string>',
workspaceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://app.adstellar.ai/api/v1/tools/generate_video', 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://app.adstellar.ai/api/v1/tools/generate_video",
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([
'scriptText' => '<string>',
'actorId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'voiceId' => '<string>',
'scenePrompt' => '<string>',
'model' => '<string>',
'durationSeconds' => 32,
'variationCount' => 2,
'productId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'productImageUrl' => '<string>',
'tone' => '<string>',
'workspaceId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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://app.adstellar.ai/api/v1/tools/generate_video"
payload := strings.NewReader("{\n \"scriptText\": \"<string>\",\n \"actorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voiceId\": \"<string>\",\n \"scenePrompt\": \"<string>\",\n \"model\": \"<string>\",\n \"durationSeconds\": 32,\n \"variationCount\": 2,\n \"productId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"productImageUrl\": \"<string>\",\n \"tone\": \"<string>\",\n \"workspaceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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://app.adstellar.ai/api/v1/tools/generate_video")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scriptText\": \"<string>\",\n \"actorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voiceId\": \"<string>\",\n \"scenePrompt\": \"<string>\",\n \"model\": \"<string>\",\n \"durationSeconds\": 32,\n \"variationCount\": 2,\n \"productId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"productImageUrl\": \"<string>\",\n \"tone\": \"<string>\",\n \"workspaceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.adstellar.ai/api/v1/tools/generate_video")
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 \"scriptText\": \"<string>\",\n \"actorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voiceId\": \"<string>\",\n \"scenePrompt\": \"<string>\",\n \"model\": \"<string>\",\n \"durationSeconds\": 32,\n \"variationCount\": 2,\n \"productId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"productImageUrl\": \"<string>\",\n \"tone\": \"<string>\",\n \"workspaceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_bodyAPI Reference
Generate an AI video ad. Two approaches: "exact" (talking actor reads your exact script — requires actorId from list_avatars) or "realistic" (cinematic UGC from a scene prompt). Returns a projectId immediately — poll get_generation_status for results. Video is expensive; credits are reserved up front.
Generate an AI video ad. Two approaches: “exact” (talking actor reads your exact script — requires actorId from list_avatars) or “realistic” (cinematic UGC from a scene prompt). Returns a projectId immediately — poll get_generation_status for results. Video is expensive; credits are reserved up front.
POST
/
tools
/
generate_video
Generate an AI video ad. Two approaches: "exact" (talking actor reads your exact script — requires actorId from list_avatars) or "realistic" (cinematic UGC from a scene prompt). Returns a projectId immediately — poll get_generation_status for results. Video is expensive; credits are reserved up front.
curl --request POST \
--url https://app.adstellar.ai/api/v1/tools/generate_video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scriptText": "<string>",
"actorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voiceId": "<string>",
"scenePrompt": "<string>",
"model": "<string>",
"durationSeconds": 32,
"variationCount": 2,
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productImageUrl": "<string>",
"tone": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://app.adstellar.ai/api/v1/tools/generate_video"
payload = {
"scriptText": "<string>",
"actorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voiceId": "<string>",
"scenePrompt": "<string>",
"model": "<string>",
"durationSeconds": 32,
"variationCount": 2,
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productImageUrl": "<string>",
"tone": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
scriptText: '<string>',
actorId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
voiceId: '<string>',
scenePrompt: '<string>',
model: '<string>',
durationSeconds: 32,
variationCount: 2,
productId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
productImageUrl: '<string>',
tone: '<string>',
workspaceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://app.adstellar.ai/api/v1/tools/generate_video', 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://app.adstellar.ai/api/v1/tools/generate_video",
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([
'scriptText' => '<string>',
'actorId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'voiceId' => '<string>',
'scenePrompt' => '<string>',
'model' => '<string>',
'durationSeconds' => 32,
'variationCount' => 2,
'productId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'productImageUrl' => '<string>',
'tone' => '<string>',
'workspaceId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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://app.adstellar.ai/api/v1/tools/generate_video"
payload := strings.NewReader("{\n \"scriptText\": \"<string>\",\n \"actorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voiceId\": \"<string>\",\n \"scenePrompt\": \"<string>\",\n \"model\": \"<string>\",\n \"durationSeconds\": 32,\n \"variationCount\": 2,\n \"productId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"productImageUrl\": \"<string>\",\n \"tone\": \"<string>\",\n \"workspaceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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://app.adstellar.ai/api/v1/tools/generate_video")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scriptText\": \"<string>\",\n \"actorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voiceId\": \"<string>\",\n \"scenePrompt\": \"<string>\",\n \"model\": \"<string>\",\n \"durationSeconds\": 32,\n \"variationCount\": 2,\n \"productId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"productImageUrl\": \"<string>\",\n \"tone\": \"<string>\",\n \"workspaceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.adstellar.ai/api/v1/tools/generate_video")
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 \"scriptText\": \"<string>\",\n \"actorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voiceId\": \"<string>\",\n \"scenePrompt\": \"<string>\",\n \"model\": \"<string>\",\n \"durationSeconds\": 32,\n \"variationCount\": 2,\n \"productId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"productImageUrl\": \"<string>\",\n \"tone\": \"<string>\",\n \"workspaceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
Response
Tool result