Videos
Create a Video

Create a Video

Creating an image is done by sending a POST request to the following URL:

https://krumzi.com/api/dynamic/video

Due to the time it takes to render a video as opposed to an image, the video creation process is asynchronous. This means that the video will be created into the background and you will not receive the generated video immediately. Once the video is ready, you will receive a webhook request with the video URL and it will be visible in the dashboard.

Request Headers

The following header is required:

  • X-API-KEY: Your API key

Request Body

The request body should contain the following attributes:

AttributeTypeRequiredDescription
template_idstringYesThe ID of the dynamic template that you want to use to create the video.
resolution720P or FULL_HDYesThe resolution in which the video will be rendered.
modificationsobjectYesAn object containing the modifications to be made to the video. Each key in the object represents the placeholder_key of each element that you defined as a placeholder in your dynamic template. The value of each key is an object with a content key, which is the content that you want to replace the placeholder with.

Modifications Object Values

AttributeTypeRequiredDescription
contentstringYesThe content that you want to replace the placeholder with. If the placeholder is an image or video, the content should be the URL that points to the new image or video.
hidebooleanNoIf true, the placeholder will be hidden.

Example Request

SAMPLE REQUEST
const data = {
  template_id : "550e8400-e29b-41d4-a716-446655440000",
  resolution: '720P',
  modifications: {
    first_placeholder: {
      content: "Example content 1",
      hide: false
    },
    second_placeholder: {
      content: "Example content 2",
      hide: true
    }
  }
}
 
fetch('https://krumzi.com/api/dynamic/video', {
  method: 'POST',
  body: JSON.stringify(data),
  headers: {
    'Content-Type' : 'application/json',
    'API-KEY' : `${API_KEY}`
  }
})

Response Body

SAMPLE RESPONSE
{
  id: "3qei76kgl",
  status: "pending",
  credits_used: 10
}

Important Notes

  1. This endpoint is not available for free plan users. You must have a paid plan to use this feature.
  2. Each video second creation consumes 1 automation credit from your account. If the video is 10 seconds, it will consume 10 automation credits.
  3. There is a rate limit of 10 requests per 10 seconds for this endpoint.
  4. Ensure you have sufficient automation credits before making a request.

Error Responses

  • 401 Unauthorized: If the API key is missing or invalid
  • 402 Payment Required: If you don't have enough automation credits
  • 403 Forbidden: If you're on a free plan
  • 429 Too Many Requests: If you exceed the rate limit
  • 500 Internal Server Error: If there's an issue creating the image