v1

latestOpenAPI 3.0.1MIT2026-07-2638658.5 KB
Video

Create video from template

Create a video using a template with custom variables and settings. Templates support various variable types including text, image, video, and script.

post/v2/create_video_with_template

Request body

template_idinteger required

Template ID

video_namestring

Custom name for the video

avatar_idinteger

Digital person ID

avatar_type0 | 1

Source type of the avatar:

  • 0 - Public avatar
  • 1 - Custom avatar
voice_languagestring required

Voice language for text-to-speech

voice_idstring

Voice ID for text-to-speech

captions_enabledboolean

Enable captions/subtitles

background_music_idinteger

Background music ID

disable_random_transboolean

Disable random transitions

disable_random_movingboolean

Disable random image effects

disable_transboolean

Disable all transitions

disable_movingboolean

Disable all image effects

Example request

{
  "template_id": 1234,
  "video_name": "My Template Video",
  "avatar_id": 1,
  "voice_language": "english",
  "voice_id": "en-US-ChristopherNeural",
  "captions_enabled": true,
  "background_music_id": 1,
  "variables": [
    {
      "properties": {
        "content": "Product description text",
        "url": "https://res.jogg.ai/media/image.jpg",
        "asset_id": 12345,
        "webhook_url": "https://example.com/webhook"
      }
    }
  ]
}

Response

Success

codeinteger 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
msgstring required

Response message

Example response

{
  "msg": "Success",
  "data": {
    "video_id": "video_123456"
  }
}