remagicaDocs home
API referenceGenerations

List generations

GET
/generations

Needs a key withgenerations:read

Lists your workspace's generations, newest first, a page at a time: filter by kind, status, where they were requested from (sources, or leave some out with excludeSources) and whether you asked for them (mine). Each output carries the Library item it was filed as.

Requires scope generations: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.

Query Parameters

cursor?string

nextCursor from the previous page.

Lengthlength <= 500
excludeSources?array<>|

Leave out the ones requested with one of these sources (comma-separated, metadata.source), e.g. tool:sprites. Those with no source stay.

kind?string

What the model makes: image, video, speech, sound_effect, music or background_removal (a cutout of an image).

Value in"image""video""speech""sound_effect""music""background_removal"
kinds?array<>|

Only these kinds (comma-separated), e.g. speech,music,sound_effect.

limit?integer

How many to return, newest first (1-100).

Range1 <= value <= 100
Default50
mine?|

Only the ones you asked for (not teammates').

sources?array<>|

Only the ones requested with one of these sources (comma-separated, metadata.source), e.g. tool:thumbnail.

statuses?array<>|

Only these statuses (comma-separated), e.g. queued,running.

Response Body

A page of generations.

application/json
  1. response
generations*array<>
nextCursor*|

Pass as cursor for the next page; null on the last.

Example Request
curl -X GET 'https://api.remagica.com/api/v1/generations'
Example Response
{  "generations": [    {      "completedAt": "2026-10-21T12:00:00.000Z",      "createdAt": "2026-09-30T12:00:00.000Z",      "createdByUserId": "f3656abb-5b3d-4f60-8e2a-1d9c6b4f7e05",      "credits": 12,      "creditsRefunded": true,      "error": null,      "id": "7a1c9e42-5b3d-4f60-8e2a-1d9c6b4f7e05",      "input": {        "prompt": "A lighthouse on a cliff at dusk, cinematic"      },      "kind": "image",      "metadata": {        "seed": 42      },      "model": "google/nano-banana-pro",      "organizationId": "9a863583-5b3d-4f60-8e2a-1d9c6b4f7e05",      "outputs": [        {          "contentType": "image/png",          "durationSeconds": 5,          "exportOf": {            "format": "string",            "index": 1          },          "height": 1280,          "key": "generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png",          "kind": "image",          "previews": [            {              "height": 1280,              "url": "https://files.remagica.com/generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png",              "width": 1024            }          ],          "previewUrl": "https://files.remagica.com/generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png",          "role": "output",          "sizeBytes": 2457600,          "url": "https://files.remagica.com/generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png",          "width": 1024,          "deleted": true,          "libraryItemId": "17c56002-5b3d-4f60-8e2a-1d9c6b4f7e05"        }      ],      "publishedAt": "2026-10-21T12:00:00.000Z",      "references": [        {          "fileIds": [            "string"          ],          "itemId": "59c47fe8-5b3d-4f60-8e2a-1d9c6b4f7e05",          "label": "string",          "version": 3,          "versionId": "772c657e-5b3d-4f60-8e2a-1d9c6b4f7e05"        }      ],      "status": "queued",      "stopRequested": true,      "updatedAt": "2026-10-21T12:00:00.000Z",      "visibility": "private",      "libraryItemId": "17c56002-5b3d-4f60-8e2a-1d9c6b4f7e05"    }  ],  "nextCursor": "string"}