Skip to main content

🚀 Quickstart Guide

This document will help you understand the basic workflow to get started with our API to enhance your videos with dynamic, automated subtitles.

Getting Started

To begin, you will need an API key, which authenticates your requests to the ZapCap API. Ensure you have your key ready before you proceed.

Uploading a Video

Start by uploading a video to the ZapCap API. Use the POST /videos endpoint to upload your video file. This endpoint supports video formats such as video/mp4 and video/quicktime. Once the upload is successful, you'll receive a response that includes a unique id for the uploaded video. This id is crucial as it will be used in subsequent requests.

POST /videos

Creating a Video Task

After uploading your video, the next step is to create a processing task for it using the POST /videos/{videoId}/task endpoint. You will need to specify the video ID received from the upload response. In this request, you can also select a template ID obtained from the GET /templates endpoint and set options like the desired language for your subtitles. If you would like to render the video without verifying the transcript manually, you can set the autoApprove flag to true.

Additionally, you can use the transcriptTaskId parameter to copy the transcript from another task. This is useful for workflows where you want to use the same transcript for multiple rendering tasks. If the transcript's duration is longer than the video's duration, the transcript will be truncated. If the video's duration is longer, the video will not be truncated. It will simply be rendered without the subtitles beyond the provided transcript.

  • transcriptTaskId: string - ID of the task to copy the transcript from.
  • language: string - Language the subtitles should be in.

Valid languages include:

['af','am','ar','as','az','ba','be','bg','bn','bo','br','bs','ca','cs','cy','da','de','el','en','es','et','eu','fa','fi','fo','fr','gl','gu','ha','haw','he','hi','hr','ht','hu','hy','id','is','it','ja','jw','ka','kk','km','kn','ko','la','lb','ln','lo','lt','lv','mg','mi','mk','ml','mn','mr','ms','mt','my','ne','nl','nn','no','oc','pa','pl','ps','pt','ro','ru','sa','sd','si','sk','sl','sn','so','sq','sr','su','sv','sw','ta','te','tg','th','tk','tl','tr','tt','uk','ur','uz','vi','yi','yo','zh','yue'.]

POST /videos/{videoId}/task

GET /templates

Monitoring Task Progress

The processing of the video task is asynchronous. To check the status of your video task, use the GET /videos/{videoId}/task/{id} endpoint, where you will need to provide the video ID and the task ID received from the task creation step. This will let you know the current status of the task and whether the subtitles are ready.

GET /videos/{videoId}/task/{id}

Approving Transcripts

Once the transcription is completed, you might need to approve it before the final rendering starts, depending on your workflow settings. Use the POST /videos/{videoId}/task/{id}/approve-transcript endpoint to approve the transcription and allow the task to proceed to the next stage of processing.

POST /videos/{videoId}/task/{id}/approve-transcript

Fetching the Final Video and Transcript

After the video task is completed and approved, you can download the final video and the transcript. Links to download these will be available through the GET /videos/{videoId}/task/{id} endpoint response, typically valid for 1 hour.

GET /videos/{videoId}/task/{id} transcript download

By following these steps, you can start integrating the ZapCap API into your applications and begin processing videos with automated, stylized subtitles.