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
| Parameter | Type | Description |
|---|---|---|
clip_id | string | ID 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
idand 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
402when the user’s plan doesn’t allow more exports or their subscription is paused or past due, and404(or400) 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
| Parameter | Type | Description |
|---|---|---|
clip_id | string | ID of the exported clip |
export_id | string | ID 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
| Status | Description |
|---|---|
processing | The clip is still rendering |
ready | The MP4 is ready: src_url is a public link to the file |
error | The 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
| Parameter | Type | Description |
|---|---|---|
clip_id | string | ID of the exported clip |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
export_id | string | Recommended | ID 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
504with{ "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, itssrc_urlis a public link to the same MP4.