Skip to main content
POST
/
create_video_from_url
Step 3: Generate Video from Product Information
curl --request POST \
  --url https://api.jogg.ai/v1/create_video_from_url \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "product_id": "NTIzMzc0NjI5",
  "aspect_ratio": 0,
  "video_length": "15",
  "language": "english",
  "avatar_id": 1,
  "avatar_type": 0,
  "script_style": "Soft Selling",
  "voice_id": "en-US-ChristopherNeural",
  "music_id": 13,
  "visual_style": "Simple Product Switch",
  "template_id": 123,
  "override_script": "",
  "caption": true,
  "video_name": "My Video"
}
'
import requests

url = "https://api.jogg.ai/v1/create_video_from_url"

payload = {
"product_id": "NTIzMzc0NjI5",
"aspect_ratio": 0,
"video_length": "15",
"language": "english",
"avatar_id": 1,
"avatar_type": 0,
"script_style": "Soft Selling",
"voice_id": "en-US-ChristopherNeural",
"music_id": 13,
"visual_style": "Simple Product Switch",
"template_id": 123,
"override_script": "",
"caption": True,
"video_name": "My Video"
}
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: 'NTIzMzc0NjI5',
aspect_ratio: 0,
video_length: '15',
language: 'english',
avatar_id: 1,
avatar_type: 0,
script_style: 'Soft Selling',
voice_id: 'en-US-ChristopherNeural',
music_id: 13,
visual_style: 'Simple Product Switch',
template_id: 123,
override_script: '',
caption: true,
video_name: 'My Video'
})
};

fetch('https://api.jogg.ai/v1/create_video_from_url', 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/create_video_from_url",
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' => 'NTIzMzc0NjI5',
'aspect_ratio' => 0,
'video_length' => '15',
'language' => 'english',
'avatar_id' => 1,
'avatar_type' => 0,
'script_style' => 'Soft Selling',
'voice_id' => 'en-US-ChristopherNeural',
'music_id' => 13,
'visual_style' => 'Simple Product Switch',
'template_id' => 123,
'override_script' => '',
'caption' => true,
'video_name' => 'My Video'
]),
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/create_video_from_url"

payload := strings.NewReader("{\n \"product_id\": \"NTIzMzc0NjI5\",\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 \"voice_id\": \"en-US-ChristopherNeural\",\n \"music_id\": 13,\n \"visual_style\": \"Simple Product Switch\",\n \"template_id\": 123,\n \"override_script\": \"\",\n \"caption\": true,\n \"video_name\": \"My Video\"\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/create_video_from_url")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": \"NTIzMzc0NjI5\",\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 \"voice_id\": \"en-US-ChristopherNeural\",\n \"music_id\": 13,\n \"visual_style\": \"Simple Product Switch\",\n \"template_id\": 123,\n \"override_script\": \"\",\n \"caption\": true,\n \"video_name\": \"My Video\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.jogg.ai/v1/create_video_from_url")

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\": \"NTIzMzc0NjI5\",\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 \"voice_id\": \"en-US-ChristopherNeural\",\n \"music_id\": 13,\n \"visual_style\": \"Simple Product Switch\",\n \"template_id\": 123,\n \"override_script\": \"\",\n \"caption\": true,\n \"video_name\": \"My Video\"\n}"

response = http.request(request)
puts response.read_body
{
  "code": 123,
  "msg": "<string>",
  "data": {
    "project_id": 123
  }
}

Authorizations

x-api-key
string
header
required

Body

application/json
product_id
string
required

Product ID obtained from Step 1 (POST /product) response data.product_id

Example:

"NTIzMzc0NjI5"

aspect_ratio
enum<integer>
required

Video aspect ratio:

  • 0 - Portrait [9:16]

  • 1 - Landscape [16:9]

  • 2 - Square [1:1]

Available options:
0,
1,
2
Example:

0

video_length
enum<string>
required

Video Length.

Available options:
15,
30,
60
Example:

"15"

language
enum<string>
default:english
required

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

Available options:
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
Example:

"english"

avatar_id
integer
required

Avatar id from Jogg Avatar or Your Avatar.

Example:

1

avatar_type
enum<integer>
required

Avatar source type:

  • 0 - Public avatars

  • 1 - Custom avatars

Available options:
0,
1
Example:

0

script_style
enum<string>
required

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
Available options:
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
Example:

"Soft Selling"

template_type
enum<string>
required

Template source type:

  • public - Template from template library

  • custom - Template from my templates

Available options:
public,
custom
voice_id
string

Voice id from voice list.

Example:

"en-US-ChristopherNeural"

music_id
integer

Music id from music list.

Example:

13

visual_style
string

Visual style of the video from visual list(GET /visual)

Example:

"Simple Product Switch"

template_id
integer

Template ID from template library or custom template

override_script
string

You can enter the script you want to use here to override the existing script.

Example:

""

caption
boolean

Controls subtitle rendering:

  • true - Show subtitles

  • false - Hide subtitles

Example:

true

video_name
string

If you want to specify the name of the generated video, please use this parameter.

Example:

"My Video"

Response

200 - application/json

Success

code
integer
required

Business status code:

  • 0 - Success

  • 10104 - Record not found

  • 10105 - Invalid API key

  • 18020 - Insufficient credit

  • 18025 - No permission to call APIs.

  • 40000 - Parameter error

  • 50000 - System error

msg
string
required

Response message

data
object