Create Project

Generate clips from a video source

Info

Required scope: clips.write

Warning

This method requires authentication

Start generating clips from a source. Restream's AI analyzes the source and produces clips asynchronously — the response returns immediately. Poll Project Details to retrieve clips as they become available; generatingClipsNow indicates whether more are still being generated.

Each source has one clip project. The first call creates it; later calls for the same source add clips to that project instead of starting a new one. What gets processed depends on whether you pass selectedTimeRange:

  • Without selectedTimeRange — Restream clips the whole video. If it was already clipped this way, the request returns 409 ClipsInputAlreadyProcessed instead of clipping again. That's a no-op, not a real failure, so a repeated call is harmless. To clip the whole video again from scratch, set forceReprocess: true.
  • With selectedTimeRange — Restream clips only that span and adds the results to the project. Call again with a different range to clip another part of the same video.

The video must be at least 10 seconds long, whether you clip all of it or a selectedTimeRange.

curl -X POST \
     -H "Authorization: Bearer [access token]" \
     -H "Content-Type: application/json" \
     -d '{"sourceType": "VideoStorageFile", "videoStorageFileId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "title": "My webinar"}' \
     https://api.restream.io/v2/user/clips/projects

Request Body

FieldTypeDescription
sourceTypestringType of video source. Currently only "VideoStorageFile" is supported (required).
videoStorageFileIdstringUUID of the Video Storage file to clip (required).
titlestringProject title (optional).
singleClipModebooleanTurn the whole video into one clip instead of letting AI pick highlights (optional). See below.
selectedTimeRangeobjectLimit clip generation to a portion of the video (optional). See below.
forceReprocessbooleanClip the whole video again even if it was already processed (optional). Only applies when selectedTimeRange is omitted; ignored otherwise.

singleClipMode:

By default Restream's AI scans the video, picks the most engaging moments, and produces several clips. With singleClipMode: true it skips that step and turns the video into a single clip as-is. Use selectedTimeRange to pick which part becomes the clip, or omit it to use the whole video. The clip is capped at 10 minutes; anything longer fails with 400 InvalidBodyParams.

selectedTimeRange:

FieldTypeDescription
startOffsetSecondsnumberStart of the range in seconds from the beginning (0 or greater).
endOffsetSecondsnumberEnd of the range in seconds from the beginning. Must not exceed the file's duration.

Response

Success (201)
Error (Invalid Body)
Error (Insufficient Scope)
Error (Feature Not Active)
Error (Usage Limit Reached)
Error (File Not Found)
Error (Already Processed)
{
  "projectId": "31a1e161-67aa-4a9e-a95b-3cb37ab6ea89",
  "sourceTypeName": "VideoStorageFile",
  "sourceIdentifier": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "title": "My webinar",
  "createdAt": "2026-01-28T15:50:30.420Z"
}