API Documentation

Integrate video caption generation into your workflow with our REST API. This documentation covers API access, key creation, and how to automate caption rendering programmatically.

1

Get API key

Sign up on CaptionGenWizard, then open the Dashboard and go to the API tab to get API access. Click Create New Key. You can create up to 5 active keys per account for programmatic integration.

2

Request a caption render

Use the REST API to request caption generation programmatically. Send a POST request to the /caption endpoint with your API key in the X-API-Key header and the caption text in the body. You can optionally pass style_id and aspect_ratio. The response includes a task_id for polling.

Request body:

  • text (required) – Caption text to render.
  • style_id (optional) – Caption style. Use the "Copy style ID" option in the app to get valid IDs (e.g. default, typewriter, closed-caption, inspirational). Default: default.
  • aspect_ratio (optional) – Output aspect ratio: 9:16 (vertical), 4:5 (portrait), 1:1 (square), or 16:9 (landscape). Default: 9:16.

Example request

curl -X POST "https://api.captiongenwizard.com/caption" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cap_live_YOUR_API_KEY" \
  -d '{"text": "Hello world. This is a caption.", "style_id": "default", "aspect_ratio": "9:16"}'

Example response (202 Accepted)

{
  "success": true,
  "data": {
    "task_id": "renderid",
    "message": "Render task created successfully"
  }
}

Save task_id for the next step.

3

Get render status

Get the POST /status endpoint with the task_id to check render progress. The response includes status and completion percentage for your workflow integration.

Example request

curl -X POST "https://api.captiongenwizard.com/status" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cap_live_YOUR_API_KEY" \
  -d '{"task_id": "renderid"}'

Response while pending (200 OK)

{
  "success": true,
  "data": {
    "status": "pending",
    "progress": 0.45
  }
}

Response when ready (200 OK)

{
  "success": true,
  "data": {
    "status": "success",
    "url": "URL to download the asset",
    "size": 564072
  }
}
4

Download the asset

Once the render is successfully completed, the status response includes a presigned URL to download the video. The download URL is only valid for 1 hour.

  • Check status: Poll until data.status is "success".
  • Download: Use data.url (download URL, expires in ~1 hour) to fetch the video.
  • Handle errors: If status is "failed", check data.error.