Navigation

API Documentation

Render a videoBeta

The renderVideo endpoint renders a video template as an MP4 and returns its id and URL, or streams the progress of the render.

POST https://api.bannerify.co/v1/templates/renderVideo

Beta. Render a video template as an MP4, save the file, and return its id and URL. With `stream=true` the answer is a stream of server-sent events: `created` with the id of the video, `queued` while the video waits for a renderer, `progress` while its frames render, then `done` with the URL, or `error`. The video renders to its end also when the connection drops: read it again with `GET /v1/videos/{id}`. Each second of the video counts as one generation, and as two at 60 fps. A failed video counts nothing.

Query parameters

NameTypeDescription
waitstring`false` answers `202` with the id of the video at once, without waiting for the render. Read the video later with `GET /v1/videos/{id}`.
streamstring`true` streams the progress as server-sent events.

Request body

NameTypeDescription
apiKey (required)stringYour API key. Create one on the API Keys page of the dashboard, and keep it on the server.
templateId (required)stringThe id of the template to render. In the dashboard, open the menu on a template card and choose Copy Template ID.
modificationsarray of Modification or object or stringThe values to change in the template, as an array of modifications. Each modification names a layer and sets one or more fields, and a layer without a modification keeps the values from the template. An object keyed by layer name and a JSON string of either shape also work. See https://bannerify.co/docs/essentials/modifications.

Responses

  • 200: The stored video, or the events of its render.
  • 202: With `wait=false`: the video renders, and its id is ready.
  • 400: The request cannot be processed. BAD_REQUEST means a field is invalid, the API key is unknown, or a signed URL has a wrong signature. FETCH_IMAGE_ERROR means Bannerify could not download an image from a src URL. A rate limit on the PDF and stored endpoints also uses status 400 with the code TOO_MANY_REQUESTS. Read error.code to tell them apart.
  • 403: The plan of your workspace does not include the feature. FORBIDDEN means s3Config came from a workspace on the Free or Automate plan.
  • 404: The template does not exist.
  • 500: The server could not finish the request. INTERNAL_SERVER_ERROR means an unexpected failure, such as a render error or a failed upload to your S3 bucket. USAGE_EXCEEDED means your workspace reached its daily or monthly generation limit, and RATE_LIMITED means the API key sent too many requests. Read error.code to tell them apart.