POST
/
create_video_with_template
curl --request POST \
  --url https://api.jogg.ai/v1/create_video_with_template \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "template_id": 1234,
  "lang": "english",
  "template_type": "common",
  "avatar_id": 1,
  "avatar_type": 0,
  "voice_id": "en-US-ChristopherNeural",
  "caption": true,
  "music_id": 1,
  "variables": [
    {
      "type": "text",
      "name": "<string>",
      "properties": {
        "content": "<string>",
        "url": "<string>",
        "asset_id": 123
      }
    }
  ]
}'
{
  "code": 123,
  "msg": "<string>",
  "data": {
    "project_id": "12345"
  }
}

Authorizations

x-api-key
string
header
required

Body

application/json
template_id
integer
required

Template ID

lang
string
required

Language for text-to-speech conversion

template_type
enum<string>
required

Template source type:

  • common - Template from template library

  • user - Template from user templates

Available options:
common,
user
variables
object[]
required

Variables to replace in the template

avatar_id
integer

Digital person ID

avatar_type
enum<integer>

Avatar source type:

  • 0 - Public avatars

  • 1 - Custom avatars

Available options:
0,
1
voice_id
string

Voice ID for text-to-speech

caption
boolean

Whether to enable captions

music_id
integer

Background music ID

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