02.2 — Integration· 6 min read

REST API.

Upload videos, kick off clip generation, and list generated clips programmatically. JSON in, JSON out — against the same backend that powers the Klyph dashboard.

Note
Scope of the API today.
The endpoints below cover projects, video upload, clip generation, and listing clips. Publishing to social platforms and analytics are not yet exposed — see the roadmap.
§ 1

Base URL

base-url.txt
https://app.klyph.ai/api

Requests include your workspace account id. The dashboard shows the account id for every workspace you belong to in settings.

§ 2

Create a project

POST /api/dev/create-project
curl https://app.klyph.ai/api/dev/create-project \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fall Interviews",
    "accountId": "acc_01h..."
  }'
FieldTypeDescription
namestringDisplay name — slug is derived and made unique per account
accountIdstringTarget workspace account id
§ 3

Upload a video

Multipart upload. The file is stored under your workspace bucket and a video record is created with status uploaded.

POST /api/dev/upload-video
curl https://app.klyph.ai/api/dev/upload-video \
  -F "file=@./interview.mp4" \
  -F "account_id=acc_01h..." \
  -F "project_id=proj_01h..."
FieldTypeDescription
filefileThe video file (mp4, mov, mkv, webm)
account_idstringTarget workspace account id
project_idstringTarget project id
§ 4

Submit for clip generation

Kick off clip generation for an uploaded video. Returns a callId you can poll for the result.

POST /api/dev/process-video-submit
curl https://app.klyph.ai/api/dev/process-video-submit \
  -H "Content-Type: application/json" \
  -d '{
    "videoId": "vid_01h...",
    "maxClips": 3,
    "minDuration": 30,
    "maxDuration": 60,
    "aspectRatio": "9:16",
    "customInstructions": "prioritize funny moments"
  }'
FieldTypeDescription
videoIdstringId of the uploaded video
maxClipsnumber?Target number of clips (default 3)
minDurationnumber?Minimum clip duration in seconds (default 30)
maxDurationnumber?Maximum clip duration in seconds (default 60)
aspectRatiostring?9:16 | 1:1 | 16:9
customInstructionsstring?Free-form guidance for the clip selector
§ 5

Poll for the result

GET /api/dev/process-video-result?callId=...
# 202 = still running — poll again shortly
# 200 = done, body contains the result payload
# 404 = call not found

curl "https://app.klyph.ai/api/dev/process-video-result?callId=call_789"
§ 6

List clips for a video

GET /api/dev/list-clips?videoId=...
{
  "clips": [
    {
      "id": "clip_01h...",
      "title": "The trick nobody tells you about...",
      "start_seconds": 412.3,
      "end_seconds": 454.1,
      "aspect_ratio": "9:16",
      "status": "ready",
      "preview_url": "https://...signed-url..."
    }
  ]
}

preview_url is a signed URL valid for one hour.

§ 7

Video summary

Lightweight overview of a video’s processing state — useful for dashboards.

GET /api/dev/video-summary?videoId=...
{
  "video": { "id": "vid_01h...", "title": "Interview", "status": "ready" },
  "counts": { "total": 3, "ready": 2, "draft": 1, "failed": 0 }
}
§ 8

Errors

FieldTypeDescription
400 bad_requesterrorMissing or invalid fields — check the error message
404 not_founderrorVideo, project, or call id not found
500 server_errorerrorUnexpected failure — safe to retry with backoff