remagicaDocs home

Make clips

Turn a long video into short vertical clips with captions and a hook, then re-export them with changes.

A clip job finds the strongest moments of a long video, reframes them (9:16 by default), and adds word-by-word captions and a hook card.

Needs uploads:write to upload, clips:submit to start jobs and exports, and clips:read to follow them.

1. Upload the video

Upload it as in Uploading files and keep its key.

2. Start a job

curl https://api.remagica.com/api/v1/clip-jobs \
  -H "x-api-key: $REMAGICA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "sourceKey": "uploads/…/keynote.mp4",
    "aspectRatio": "9:16",
    "clipLength": "s30_59",
    "hookStyle": "pill"
  }'

Only sourceKey is required. The options you'll use most:

  • aspectRatio: 9:16 (default), 1:1, 16:9 or 4:5.
  • clipLength: auto (15 s to 3 min), or a range such as lt30 or s30_59.
  • captions, captionStyle: burn captions in (on by default) and how they look.
  • hook, hookStyle: the headline card over each clip's first seconds.
  • maxMinutes: only process the start of the video.
  • sourceSeconds: the video's length, if you know it, so the right credits are set aside up front.

The reference lists them all. You get 202 Accepted with the job's jobId.

3. Wait for it

A job takes minutes, depending on the video's length.

  • Stream: GET /clip-jobs/{jobId}/events sends server-sent events: the current state, then a message each time the stage or percent changes, then done when it finishes.
  • Poll: GET /clip-jobs/{jobId} about every 5 seconds. status goes queued → processing → completed or failed. While it runs, progress says which stage it's in (preparing, transcribing, selecting, rendering, finalizing) with a percent.
  • Webhooks: clip_job.succeeded and clip_job.failed.

When it's completed, clips lists each clip with its title, score, startSeconds and endSeconds, the finished videoUrl, a posterUrl, and wordsUrl (the transcript with word timings).

4. Re-export a clip

To change a clip without cutting again, export it with new options: another caption style, a different hook, or corrected words.

curl https://api.remagica.com/api/v1/clips/CLIP_ID/exports \
  -H "x-api-key: $REMAGICA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "hook": { "text": "The one tip nobody tells you" } }'

An export takes seconds. Poll GET /clips/{clipId}/exports/{exportId} until it's done, then download its videoUrl.

Clip download URLs expire after an hour. Fetch the job or export again for fresh ones.

On this page