Skip to main content
POST
/
v2
/
create_video_from_product
/
preview_list
Submit Preview List
curl --request POST \
  --url https://api.jogg.ai/v2/create_video_from_product/preview_list \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "product_id": "NTIzMzc0NjI5",
  "visual_styles": [
    "Simple Product Switch",
    "Dynamic Showcase"
  ],
  "video_spec": {
    "length": "30",
    "aspect_ratio": "landscape",
    "caption": true,
    "name": "My Product Video"
  },
  "avatar": {
    "id": 1,
    "type": 0
  },
  "voice": {
    "id": "en-US-ChristopherNeural"
  },
  "audio": {
    "music_id": 13
  },
  "script": {
    "style": "Storytime"
  },
  "language": "english",
  "override_script": "<string>",
  "webhook_url": "https://example.com/webhook"
}
'
{
  "code": 0,
  "msg": "Success",
  "data": {
    "previews": [
      {
        "visual_style": "Simple Product Switch",
        "preview_id": "preview_456",
        "err_msg": "Generation failed due to invalid parameters"
      }
    ]
  }
}
Submit multiple visual styles for preview generation from a product. This allows you to generate multiple preview videos with different styles simultaneously.

Example Usage

curl --request POST \
  --url 'https://api.jogg.ai/v2/create_video_from_product/preview_list' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "product_id": "NTIzMzc0NjI5",
    "visual_styles": ["Simple Product Switch", "Dynamic Showcase"],
    "video_spec": {
      "aspect_ratio": "landscape",
      "length": "30",
      "caption": true
    },
    "avatar": {
      "id": 1,
      "type": 0
    },
    "voice": {
      "id": "en-US-ChristopherNeural"
    },
    "audio": {},
    "script": {
      "style": "Storytime",
      "language": "english"
    }
  }'

Authorizations

x-api-key
string
header
required

API key for authentication. Obtain your key from the JoggAI dashboard.

Body

application/json
product_id
string
required

Product ID

Example:

"NTIzMzc0NjI5"

visual_styles
string[]
required

List of visual style names to generate previews

Example:
["Simple Product Switch", "Dynamic Showcase"]
video_spec
object
required

Video specification settings

avatar
object
required

Avatar configuration

voice
object
required

Voice configuration

audio
object
required

Audio configuration

script
object
required

Script configuration

language
string

Script generation language

Example:

"english"

override_script
string

Override the auto-generated script

webhook_url
string<uri>

Webhook URL for status notifications

Example:

"https://example.com/webhook"

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

0

msg
string
required

Response message

Example:

"Success"

data
object