Developers
REST API
Create runs, follow progress and fetch finished clips from your own code.
The API exposes the same pipeline as the app: submit a source with a workflow, poll the task, then download the clips. It is intended for automation — a nightly job that clips yesterday's stream, or a pipeline that hands clips to an editor.
Authentication
Create a key in Settings → Agents & API. Send it as a bearer token. Keys are shown once, are scoped to your account, and can be revoked at any time; revoking takes effect immediately.
Authorization: Bearer tk_live_…Create a run
curl -X POST https://www.timoklip.web.id/api/tasks \
-H "Authorization: Bearer $TIMOKLIP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source_url": "https://www.youtube.com/watch?v=…",
"workflow": "highlights",
"clip_length": "auto",
"include_broll": false
}'The response contains the task id. Optional fields mirror the create screen: instructions for a prompt-driven run, a source range, the caption template, the output layout and the cleanup options.
Follow progress
{ "status": "processing", "stage": "transcribing", "progress": 42 }Fetch the result
| Endpoint | Returns |
|---|---|
| GET /api/tasks/{task_id} | Task status and settings |
| GET /api/tasks/{task_id}/clips | Clip list with titles, hooks, ranges and durations |
| GET /api/tasks/{task_id}/clips/{clip_id}/file | The rendered MP4 |
| PATCH /api/tasks/{task_id}/clips/{clip_id} | Update a clip's title or captions |
Limits and errors
- Concurrent runs are limited by your plan; extra submissions queue instead of failing.
- 401 means the key is missing, revoked or wrong.
- 402 means the account is out of minutes for the period.
- 422 means the body was rejected — read the message, it names the field.