Generate Video from Template
POST
https://api.konpro.ai/v1/templates/{template_id}/generateCreate 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
| TIME | STATUS | USER AGENT |
|---|---|---|
| Make a request to see history. | ||
0 Requests This Month
Path Parameter
| Parameter | Type | Description |
|---|---|---|
| template_id | string | Unique identifier of the video template (required) |
Request Body Parameters
| Field | Type | Description |
|---|---|---|
| caption | boolean | Enable subtitles or captions in the video. Default is false. |
| title | string | Title assigned to the generated video. |
| variables | JSON | JSON object containing dynamic variables to replace placeholders within the template. |
| dimension | object | Custom video resolution (width, height). Must respect the template's aspect ratio. |
| include_gif | boolean | Optionally include a GIF preview URL in callback responses. Default is false. |
| enable_sharing | boolean | If true, the video is made public and shareable immediately after creation. |
| folder_id | string | Folder ID where the video will be saved. |
| brand_voice_id | string | ID of a brand-specific voice to apply to the video audio. |
| callback_url | string | URL to receive POST notifications on video rendering completion with status updates. |
| scene_ids | array of strings | Optional array specifying the order of scenes to generate within the video. |
Response
| Field | Type | Description |
|---|---|---|
| video_id | string | Unique 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
LANGUAGE
CREDENTIALS
HEADER
RESPONSE
Examples
Choose an example:
application/json
200 - Result
400 - Result