Generate Video from Template

POSThttps://api.konpro.ai/v1/templates/{template_id}/generate

Create a video using a specified template, with support for dynamic variable replacement, custom dimensions, and callback notifications.

Request History

Log in to see full request history

TIMESTATUSUSER AGENT
Make a request to see history.

0 Requests This Month

Path Parameter

ParameterTypeDescription
template_idstringUnique identifier of the video template (required)

Request Body Parameters

FieldTypeDescription
captionbooleanEnable subtitles or captions in the video. Default is false.
titlestringTitle assigned to the generated video.
variablesJSONJSON object containing dynamic variables to replace placeholders within the template.
dimensionobjectCustom video resolution (width, height). Must respect the template's aspect ratio.
include_gifbooleanOptionally include a GIF preview URL in callback responses. Default is false.
enable_sharingbooleanIf true, the video is made public and shareable immediately after creation.
folder_idstringFolder ID where the video will be saved.
brand_voice_idstringID of a brand-specific voice to apply to the video audio.
callback_urlstringURL to receive POST notifications on video rendering completion with status updates.
scene_idsarray of stringsOptional array specifying the order of scenes to generate within the video.

Response

FieldTypeDescription
video_idstringUnique identifier of the submitted video

cURL Request

shell
curl --request POST \
--url https://api.konpro.ai/v1/templates/<template_id>/generate \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{
  "caption": false,
  "title": "Product Launch Video",
  "variables": {
    "product_name": "KonPro AI",
    "tagline": "Next-generation video creation"
  },
  "dimension": {
    "width": 1280,
    "height": 720
  },
  "include_gif": false,
  "enable_sharing": true,
  "folder_id": "folder123",
  "brand_voice_id": "voice_brand_456",
  "callback_url": "https://yourapp.com/webhook",
  "scene_ids": ["scene1", "scene2"]
}'

Example Usage

Shell
curl --request POST \
--url https://api.konpro.ai/v1/templates/<template_id>/generate \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{
  "caption": false,
  "title": "Product Launch Video",
  "variables": {
    "product_name": "KonPro AI",
    "tagline": "Next-generation video creation"
  },
  "dimension": {
    "width": 1280,
    "height": 720
  },
  "include_gif": false,
  "enable_sharing": true,
  "folder_id": "folder123",
  "brand_voice_id": "voice_brand_456",
  "callback_url": "https://yourapp.com/webhook",
  "scene_ids": ["scene1", "scene2"]
}'

LANGUAGE

CREDENTIALS

HEADER

RESPONSE

Examples

Choose an example:

application/json
200 - Result
400 - Result