remagicaDocs home
API referenceReferences

Create a reference

POST
/references

Needs a key withreferences:write

Adds a style, colour palette, character or element of your own, in the Team or your Private scope. Images are storage keys of the workspace's own images.

Requires scope references:write.

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.

Request Body

application/json
  1. body

A new reference of your own.

category*string

Where your own references go: styles, colorPalettes, characters or elements.

Value in"styles""colorPalettes""characters""elements"
colors?array<>

A palette's colours, in order.

Itemsitems <= 8
description?string

What it is or looks like. Added to the prompt of nodes that use it.

Lengthlength <= 4000
images?array<>

Reference images, in order. Sent with the request.

Itemsitems <= 10
scope?string

team: every member of the workspace sees and uses it. private: only you (in this workspace). API keys act for the workspace, so they use team only.

Default"team"
Value in"private""team"
title*string
Length1 <= length <= 120

Response Body

The reference.

application/json
  1. response

A reference of your workspace's own.

category*string

Where your own references go: styles, colorPalettes, characters or elements.

Value in"styles""colorPalettes""characters""elements"
colors*array<string>
createdAt*string
Formatdate-time
description*string
id*string
images*array<>
ownerUserId*string|null
scope*string

team: every member of the workspace sees and uses it. private: only you (in this workspace). API keys act for the workspace, so they use team only.

Value in"private""team"
title*string
updatedAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.remagica.com/api/v1/references' \  -H 'Content-Type: application/json' \  -d '{  "category": "styles",  "title": "Autumn campaign"}'
Example Response
{  "category": "styles",  "colors": [    "string"  ],  "createdAt": "2026-10-21T12:00:00.000Z",  "description": "Product shots for the autumn campaign.",  "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05",  "images": [    {      "height": 1280,      "key": "generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png",      "libraryItemId": "17c56002-5b3d-4f60-8e2a-1d9c6b4f7e05",      "width": 1024,      "contentType": "image/png",      "url": "https://files.remagica.com/generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png"    }  ],  "ownerUserId": "ba132481-5b3d-4f60-8e2a-1d9c6b4f7e05",  "scope": "private",  "title": "Autumn campaign",  "updatedAt": "2026-10-21T12:00:00.000Z"}