Videos
Video Placeholders

Dynamic Video Placeholders

When working with dynamic video templates, you can retrieve information about the placeholders available in a specific template. This is useful for understanding what fields you can modify when creating a video.

Get Template Placeholders

Retrieve a list of all placeholders available in a specific dynamic video template.

Endpoint: GET /api/dynamic/video/fields

Headers:

  • X-API-KEY: Your API key (required)

Query Parameters:

  • templateId: The ID of the dynamic video template (required)

Response:

The response will be an array of objects, each representing a placeholder in the template:

[
    {
        "key": "title",
        "label": "title",
        "type": "string",
        "placeholder": "Enter text..."
    },
    {
        "key": "background_video",
        "label": "background_video",
        "type": "file",
        "placeholder": "Enter URL..."
    }
]

Response Fields:

  • key: The unique identifier for the placeholder (same as placeholder_key in the template)
  • label: A human-readable label for the placeholder (currently same as key)
  • type: The type of content expected for this placeholder. Can be either:
    • "string" for text content
    • "file" for image or video content (expects a URL)
  • placeholder: A hint text for what kind of content to enter

Error Responses:

  • 400 Bad Request: If the templateId query parameter is missing
  • 401 Unauthorized: If the API key is missing or invalid

Example Usage:

curl -X GET 'https://krumzi.com/api/dynamic/video/fields?templateId=your_template_id' \
-H 'X-API-KEY: your_api_key_here'

This endpoint allows you to retrieve information about the placeholders available in a specific dynamic video template. You can use this information to understand what modifications you can make when creating a video using this template.

Using Placeholders

When creating a dynamic video, you'll use the placeholder key values in your modifications object. For example:

const modifications = {
    title: {
        content: "My Dynamic Video Title"
    },
    background_video: {
        content: "https://example.com/my-background-video.mp4"
    }
};

This modifications object specifies the content for the title and background_video placeholders in the dynamic video template.

By using the placeholder keys in the modifications object, you can dynamically populate the video with the desired content.

Refer to the Create a Video documentation for more details on how to use these placeholders when creating a dynamic video.