Export Endpoints

A clip must be exported (rendered to an MP4 file) before it can be downloaded or used outside Klap. Export endpoints act on a single clip: {clip_id} is the id of a Clip Object.

Start Export

Start rendering a clip to MP4.

Endpoint: POST /projects/{clip_id}/exports

Request

POST /projects/{clip_id}/exports
Authorization: Bearer <access_token>
Content-Type: application/json
 
{}

Path Parameters

ParameterTypeDescription
clip_idstringID of the clip to export

Request Body

Send an empty JSON object: {}.

Response

Returns the new export’s record. Read its id, then call Get Export to follow the render and get the Export Object. The other fields of this response are internal and may change.

{
  "id": "3f6c1a52-8d4e-4b7a-9c1e-2f5d8a7b6c90",
  "status": "processing",
  "projectId": "hT4kq9ZpW2xe",
  "estimatedReadyAt": "2026-10-07T12:20:42.000Z",
  ...
}

Notes

  • Allowance: Exports count toward the user’s plan export allowance (on paid plans, each clip counts once, however many times it’s exported).
  • Not idempotent: Each call starts a new render. Keep the export id and poll it instead of starting another export for the same clip.
  • Render time: Rendering takes about as long as the clip itself (typically 20 to 120 seconds).
  • Errors: Returns 402 when the user’s plan doesn’t allow more exports or their subscription is paused or past due, and 404 (or 400) when the clip isn’t in the user’s account. See Errors.

Get Export

Get the status of an export and, once it’s ready, the URL of its MP4 file.

Endpoint: GET /projects/{clip_id}/exports/{export_id}

Request

GET /projects/{clip_id}/exports/{export_id}
Authorization: Bearer <access_token>

Path Parameters

ParameterTypeDescription
clip_idstringID of the exported clip
export_idstringID of the export, from Start Export

Response

Returns an Export Object with the current status:

{
  "id": "3f6c1a52-8d4e-4b7a-9c1e-2f5d8a7b6c90",
  "status": "ready",
  "src_url": "https://storage.googleapis.com/klap-renders/3f6c1a52-8d4e-4b7a-9c1e-2f5d8a7b6c90.mp4",
  "estimated_ready_at": "2026-10-07T12:20:42.000Z",
  "project_id": "hT4kq9ZpW2xe",
  "created_at": "2026-10-07T12:20:00.000Z",
  "finished_at": "2026-10-07T12:20:51.000Z",
  "name": "Why most startups fail",
  "author_id": "5f1c2e9a-3b7d-4c8e-9f60-2a1b3c4d5e6f",
  "folder_id": "aB3dE5fG",
  "descriptions": null,
  "watermarked": false
}

Possible Status Values

StatusDescription
processingThe clip is still rendering
readyThe MP4 is ready: src_url is a public link to the file
errorThe render failed. Start a new export to try again

Poll every few seconds until status is ready or error. Returns 404 if the export doesn’t exist, belongs to another user, or belongs to another clip.

Download Export

Download an export’s MP4 file through the API. This request waits until the export is ready, then streams the file.

Endpoint: GET /projects/{clip_id}/download

Request

GET /projects/{clip_id}/download?export_id={export_id}
Authorization: Bearer <access_token>

Path Parameters

ParameterTypeDescription
clip_idstringID of the exported clip

Query Parameters

ParameterTypeRequiredDescription
export_idstringRecommendedID of the export, from Start Export

Response

The MP4 file, with these headers:

HTTP/1.1 200 OK
Content-Type: video/mp4
Content-Disposition: attachment; filename="Why_most_startups_fail.mp4"

The file name is the clip’s name, with every character other than letters, digits, ., _ and - replaced by _.

Notes

  • Always pass export_id. Without it, Klap reuses an export of this clip that is still rendering or, if there is none, starts a new render, which counts toward the user’s export allowance.
  • Blocking: If the export is still rendering, the request waits for it (up to 10 minutes) before the file starts streaming. Use a long request timeout.
  • Failure: Returns 504 with { "error": "Export timed out or failed." } if the export fails or isn’t ready within 10 minutes.
  • You don’t need this endpoint to get the file: once an export is ready, its src_url is a public link to the same MP4.