curl --request POST \
--url https://api.jogg.ai/v1/preview \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"product_id": "8xUNyTgckMBsX4jn4Lxf",
"aspect_ratio": 0,
"video_length": "15",
"language": "english",
"avatar_id": 1,
"avatar_type": 0,
"script_style": "Soft Selling",
"template_type": "custom",
"voice_id": "en-US-ChristopherNeural",
"visual_style": "Simple split screen template",
"template_id": 0,
"override_script": "",
"caption": true
}
'import requests
url = "https://api.jogg.ai/v1/preview"
payload = {
"product_id": "8xUNyTgckMBsX4jn4Lxf",
"aspect_ratio": 0,
"video_length": "15",
"language": "english",
"avatar_id": 1,
"avatar_type": 0,
"script_style": "Soft Selling",
"template_type": "custom",
"voice_id": "en-US-ChristopherNeural",
"visual_style": "Simple split screen template",
"template_id": 0,
"override_script": "",
"caption": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product_id: '8xUNyTgckMBsX4jn4Lxf',
aspect_ratio: 0,
video_length: '15',
language: 'english',
avatar_id: 1,
avatar_type: 0,
script_style: 'Soft Selling',
template_type: 'custom',
voice_id: 'en-US-ChristopherNeural',
visual_style: 'Simple split screen template',
template_id: 0,
override_script: '',
caption: true
})
};
fetch('https://api.jogg.ai/v1/preview', 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.jogg.ai/v1/preview",
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([
'product_id' => '8xUNyTgckMBsX4jn4Lxf',
'aspect_ratio' => 0,
'video_length' => '15',
'language' => 'english',
'avatar_id' => 1,
'avatar_type' => 0,
'script_style' => 'Soft Selling',
'template_type' => 'custom',
'voice_id' => 'en-US-ChristopherNeural',
'visual_style' => 'Simple split screen template',
'template_id' => 0,
'override_script' => '',
'caption' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.jogg.ai/v1/preview"
payload := strings.NewReader("{\n \"product_id\": \"8xUNyTgckMBsX4jn4Lxf\",\n \"aspect_ratio\": 0,\n \"video_length\": \"15\",\n \"language\": \"english\",\n \"avatar_id\": 1,\n \"avatar_type\": 0,\n \"script_style\": \"Soft Selling\",\n \"template_type\": \"custom\",\n \"voice_id\": \"en-US-ChristopherNeural\",\n \"visual_style\": \"Simple split screen template\",\n \"template_id\": 0,\n \"override_script\": \"\",\n \"caption\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.jogg.ai/v1/preview")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": \"8xUNyTgckMBsX4jn4Lxf\",\n \"aspect_ratio\": 0,\n \"video_length\": \"15\",\n \"language\": \"english\",\n \"avatar_id\": 1,\n \"avatar_type\": 0,\n \"script_style\": \"Soft Selling\",\n \"template_type\": \"custom\",\n \"voice_id\": \"en-US-ChristopherNeural\",\n \"visual_style\": \"Simple split screen template\",\n \"template_id\": 0,\n \"override_script\": \"\",\n \"caption\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jogg.ai/v1/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_id\": \"8xUNyTgckMBsX4jn4Lxf\",\n \"aspect_ratio\": 0,\n \"video_length\": \"15\",\n \"language\": \"english\",\n \"avatar_id\": 1,\n \"avatar_type\": 0,\n \"script_style\": \"Soft Selling\",\n \"template_type\": \"custom\",\n \"voice_id\": \"en-US-ChristopherNeural\",\n \"visual_style\": \"Simple split screen template\",\n \"template_id\": 0,\n \"override_script\": \"\",\n \"caption\": true\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"msg": "<string>",
"data": {
"project_id": 123
}
}Generate Preview Video from Product Information
You can generate a preview video using the product_id obtained from the Upload URL to create a product. Set the relevant video parameters to create the preview. You can obtain the preview video result using the project_id at the Get Generated Video endpoint.
curl --request POST \
--url https://api.jogg.ai/v1/preview \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"product_id": "8xUNyTgckMBsX4jn4Lxf",
"aspect_ratio": 0,
"video_length": "15",
"language": "english",
"avatar_id": 1,
"avatar_type": 0,
"script_style": "Soft Selling",
"template_type": "custom",
"voice_id": "en-US-ChristopherNeural",
"visual_style": "Simple split screen template",
"template_id": 0,
"override_script": "",
"caption": true
}
'import requests
url = "https://api.jogg.ai/v1/preview"
payload = {
"product_id": "8xUNyTgckMBsX4jn4Lxf",
"aspect_ratio": 0,
"video_length": "15",
"language": "english",
"avatar_id": 1,
"avatar_type": 0,
"script_style": "Soft Selling",
"template_type": "custom",
"voice_id": "en-US-ChristopherNeural",
"visual_style": "Simple split screen template",
"template_id": 0,
"override_script": "",
"caption": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product_id: '8xUNyTgckMBsX4jn4Lxf',
aspect_ratio: 0,
video_length: '15',
language: 'english',
avatar_id: 1,
avatar_type: 0,
script_style: 'Soft Selling',
template_type: 'custom',
voice_id: 'en-US-ChristopherNeural',
visual_style: 'Simple split screen template',
template_id: 0,
override_script: '',
caption: true
})
};
fetch('https://api.jogg.ai/v1/preview', 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.jogg.ai/v1/preview",
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([
'product_id' => '8xUNyTgckMBsX4jn4Lxf',
'aspect_ratio' => 0,
'video_length' => '15',
'language' => 'english',
'avatar_id' => 1,
'avatar_type' => 0,
'script_style' => 'Soft Selling',
'template_type' => 'custom',
'voice_id' => 'en-US-ChristopherNeural',
'visual_style' => 'Simple split screen template',
'template_id' => 0,
'override_script' => '',
'caption' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.jogg.ai/v1/preview"
payload := strings.NewReader("{\n \"product_id\": \"8xUNyTgckMBsX4jn4Lxf\",\n \"aspect_ratio\": 0,\n \"video_length\": \"15\",\n \"language\": \"english\",\n \"avatar_id\": 1,\n \"avatar_type\": 0,\n \"script_style\": \"Soft Selling\",\n \"template_type\": \"custom\",\n \"voice_id\": \"en-US-ChristopherNeural\",\n \"visual_style\": \"Simple split screen template\",\n \"template_id\": 0,\n \"override_script\": \"\",\n \"caption\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.jogg.ai/v1/preview")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": \"8xUNyTgckMBsX4jn4Lxf\",\n \"aspect_ratio\": 0,\n \"video_length\": \"15\",\n \"language\": \"english\",\n \"avatar_id\": 1,\n \"avatar_type\": 0,\n \"script_style\": \"Soft Selling\",\n \"template_type\": \"custom\",\n \"voice_id\": \"en-US-ChristopherNeural\",\n \"visual_style\": \"Simple split screen template\",\n \"template_id\": 0,\n \"override_script\": \"\",\n \"caption\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jogg.ai/v1/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_id\": \"8xUNyTgckMBsX4jn4Lxf\",\n \"aspect_ratio\": 0,\n \"video_length\": \"15\",\n \"language\": \"english\",\n \"avatar_id\": 1,\n \"avatar_type\": 0,\n \"script_style\": \"Soft Selling\",\n \"template_type\": \"custom\",\n \"voice_id\": \"en-US-ChristopherNeural\",\n \"visual_style\": \"Simple split screen template\",\n \"template_id\": 0,\n \"override_script\": \"\",\n \"caption\": true\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"msg": "<string>",
"data": {
"project_id": 123
}
}Authorizations
Body
Product ID obtained from Step 1 (POST /product) response data.product_id
"8xUNyTgckMBsX4jn4Lxf"
Video aspect ratio:
-
0 - Portrait [9:16]
-
1 - Landscape [16:9]
-
2 - Square [1:1]
0, 1, 2 0
Video Length.
15, 30, 60 "15"
Script generation language (defaults to English if not specified):
-
english - English
-
filipino - Filipino
-
french - French
-
german - German
-
hindi - Hindi
-
indonesian - Indonesian
-
italian - Italian
-
japanese - Japanese
-
korean - Korean
-
malay - Malay
-
portuguese - Portuguese
-
russian - Russian
-
spanish - Spanish
-
thai - Thai
-
vietnamese - Vietnamese
-
arabic - Arabic
-
greek - Greek
-
turkish - Turkish
-
slovenian - Slovenian
-
croatian - Croatian
-
romanian - Romanian
-
chinese - Simplified Chinese
-
bengali - Bengali
-
urdu - Urdu
-
hungarian - Hungarian
-
traditional-chinese - Traditional Chinese
-
polish - Polish
-
cantonese - Cantonese
-
danish - Danish
-
malayalam - Malayalam
-
tamil - Tamil
-
telugu - Telugu
-
czech - Czech
-
hebrew - Hebrew
-
zulu - Zulu
-
swedish - Swedish
-
lithuanian - Lithuanian
-
dutch - Dutch
-
flemish - Flemish
-
norwegian - Norwegian
-
finnish - Finnish
-
bulgarian - Bulgarian
-
latvian - Latvian
-
ukrainian - Ukrainian
-
mongolian - Mongolian
-
persian - Persian
-
odia - Odia
-
assamese - Assamese
-
kannada - Kannada
-
tagalog - Tagalog
-
amharic - Amharic
-
serbian - Serbian
-
slovak - Slovak
-
swahili - Swahili
english, filipino, french, german, hindi, indonesian, italian, japanese, korean, malay, portuguese, russian, spanish, thai, vietnamese, arabic, greek, turkish, slovenian, croatian, romanian, chinese, bengali, urdu, hungarian, traditional-chinese, polish, cantonese, danish, malayalam, tamil, telugu, czech, hebrew, zulu, swedish, lithuanian, dutch, flemish, norwegian, finnish, bulgarian, latvian, ukrainian, mongolian, persian, odia, assamese, kannada, tagalog, amharic, serbian, slovak, swahili "english"
Avatar id from Jogg Avatar or Your Avatar.
1
Avatar source type:
-
0 - Public avatars
-
1 - Custom avatars
0, 1 0
Script writing style for video content:
- Don't Worry - Casual and reassuring tone
- Discovery - Exploratory and revealing style
- Data - Fact-based and analytical presentation
- Top 3 reasons - List-based persuasive format
- Soft Selling - Gentle persuasion focusing on trust-building over hard pitching
- Humor & Meme - Light-hearted engagement with funny, relatable content
- Feature Explainer - Clear breakdown of product/service functionalities
- Soft Storytelling with Twist - Emotional narrative with an unexpected plot turn
- Expert Advice - Authoritative guidance based on industry experience
- Unboxing & Review - Immersive first-hand experience sharing
- Challenge - Interactive task prompting audience participation
- Problem/Solution - Clear identification of issues with practical remedies
- Comparison - Side-by-side analysis of pros/cons for informed decisions
- Creative/Innovative - Original concepts breaking conventional boundaries
- Emotional Appeal - Empathetic connection through shared feelings
- Immersive Storytelling - Vivid narrative creating strong audience immersion
Don't Worry, Discovery, Data, Top 3 reasons, Soft Selling, Humor & Meme, Feature Explainer, Soft Storytelling with Twist, Expert Advice, Unboxing & Review, Challenge, Problem/Solution, Comparison, Creative/Innovative, Emotional Appeal, Immersive Storytelling "Soft Selling"
Template source type:
-
public - Template from template library
-
custom - Template from my templates
public, custom "custom"
Voice id from voice list.
"en-US-ChristopherNeural"
Visual style of the video from visual list(GET /visual)
"Simple split screen template"
Template ID from template library or custom template
0
You can enter the script you want to use here to override the existing script.
""
Controls subtitle rendering:
-
true - Show subtitles
-
false - Hide subtitles
true
Response
Success

