remagicaDocs home
API referenceClip exports

Re-export a clip

POST
/clips/{clipId}/exports

Needs a key withclips:submit

Re-renders one of your clips with a new caption style, a changed hook (text, look, position or hidden) and/or edited words. Nothing is re-transcribed or re-cut: the worker burns the clip's clean picture again, so an export takes seconds.

Everything in the body is optional; whatever is left out stays as the clip has it. The response is 202 Accepted with the export id; poll GET /clips/{clipId}/exports/{exportId} until status is completed (then videoUrl is the new clip) or failed.

Clips made before re-exports existed have no words.json and answer 409 CONFLICT.

An export costs credits for the clip's length (a base plus each minute), charged when it starts (402 when the workspace can't cover it) and refunded if it fails.

Requires scope clips:submit.

Authorization

apiKey
headerx-api-key<token>

An API key of your workspace (rmg_…), created in the web app. It acts for that workspace, not for a person, and keeps working when its creator leaves.

Path Parameters

clipId*string

Id of one of your clips (clips[].id from GET /clip-jobs/{jobId}).

Length1 <= length <= 128

Header Parameters

Idempotency-Key?string

Makes the request safe to retry: send a unique value (a UUID, say). The same request sent again with the same key within 24 hours gets the first one's response back, and nothing runs or is charged twice. Reusing a key for a different request, or while the first is still running, is 409 CONFLICT. A request that fails frees its key.

Length1 <= length <= 255

Request Body

application/json
  1. body

The clip to re-export (path) and what to change (body). An empty body re-renders the clip as it is.

captionStyle?

Caption look: preset (one of the ids below) plus optional overrides, each patching one field of the preset's style: font (family, weight, italic, size, color, letterSpacing), stroke (enabled, color, width), shadow (enabled, color, x, y, blur), uppercase, animation (name, highlightColor, bgColor), highlight (primary, secondary), background (enabled, color, opacity), layout (lines, maxLines, maxWordsPerLine, maxCharsPerLine, maxSeconds) and position (anchor, offset). Sizes are reference units (1 unit = the frame's short side / 540 px); colours are #RRGGBB or #RRGGBBAA.

Presets: none, bold-pop, karaoke, deep-diver, youshaei, pod-p, simple, beasty, mozi, popline, think-media, soft-landing, baby-earthquake, breathe, seamless-bounce, focus, blur-switch, grow, glitch-infinite, highlighter-box, blur-in, with-backdrop, baby-steps, neon-glow, stream-pop, stream-box, one-word. none burns no captions.

Omit it to keep the clip's own style.

captions?boolean

Burn the captions. Omit it to keep what the clip did (captions on unless the job turned them off).

hook?

The hook card. Omit the whole object to keep the clip's hook as it is.

words?array<>

The clip's words, edited: fix a transcription typo or retime a word. At most 3000 words, sorted by start, all ending within the clip. Start from words in the clip's words.json (wordsUrl). Omit it to keep the clip's words.

Itemsitems <= 3000

Response Body

Accepted: the export is queued.

application/json
  1. response

The queued export.

exportId*string

Id of the new export. Poll GET /clips/{clipId}/exports/{exportId}.

Example Request
curl -X POST 'https://api.remagica.com/api/v1/clips/9d2e7a61-3b0f-4c1e-b5a8-7f4d2c6e1a93/exports' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "exportId": "3c7b1e90-52d4-4f8a-9e61-0b2d7a4c5f18"}