remagicaDocs home
API referenceClip jobs

Stream a clip job's progress

GET
/clip-jobs/{jobId}/events

Needs a key withclips:read

Streams one of your jobs' status and progress as server-sent events (text/event-stream): the current state at once, then a message event whenever the stage, percent, message or status changes. Each event's data is JSON (id, status, error, progress, as on GET /clip-jobs/{jobId}).

Once the job is completed or failed, its final state is sent as a message, then a done event ({"status": "completed"} or "failed") ends the stream: close your EventSource on done, or it reconnects and gets the final state again. A stream closed without done (after 30 minutes at most, or a server restart) means the job is still running: reconnect to keep watching. The server checks the job every 2 seconds and sends a keep-alive comment every 15 seconds. An unknown job, or someone else's, is a 404 before the stream starts.

Requires scope clips:read.

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

jobId*string

Id returned by POST /clip-jobs.

Length1 <= length <= 128

Response Body

An event stream of the job's updates, ending when it completes or fails.

text/event-stream
  1. response
event*unknown
data*

The job's status, progress and saved clip count, sent when any of them changes. Fetch the job for its clips when clipCount grows, and once more when status is completed.

id?string
retry?number
Example Request
curl -X GET 'https://api.remagica.com/api/v1/clip-jobs/5f0c2a4e-1d7b-4b9e-8a3c-2e6f9d1b7c40/events'
Example Response
{  "event": "message",  "data": {    "clipCount": 2,    "error": null,    "id": "5f0c2a4e-1d7b-4b9e-8a3c-2e6f9d1b7c40",    "progress": {      "clipsDone": 2,      "clipsTotal": 6,      "etaSeconds": 95,      "message": "Rendering clip 3 of 6",      "percent": 55.7,      "stage": "rendering",      "stageStartedAt": "2026-09-27T12:00:52.000Z",      "startedAt": "2026-09-27T12:00:04.000Z",      "updatedAt": "2026-09-27T12:01:40.000Z"    },    "status": "processing"  },  "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05",  "retry": 1}