remagicaDocs home
API referenceBrand kits

Create a brand kit from a file

POST
/brand-kits/from-file

Needs a key withbrand:write

Makes a brand kit from a brand file you uploaded (a PDF or Word brand book, up to 50 MB): its text is summarised into the kit's sections and its pictures become the kit's photography.

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

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
fileName*string

The file's name, for the kit's name if the file has none.

Length1 <= length <= 255
key*string

Storage key of an upload of yours (POST /uploads): a PDF or Word (.docx) file of up to 50 MB.

Length1 <= length <= 1024
scope?string

Where the new kit goes: your Private kits (default) or the Team.

Default"private"
Value in"private""team"

Response Body

The new kit.

application/json
  1. response
brandKit*

A brand kit.

summarised*boolean

Whether a language model wrote its sections; when false it holds only what was found (name, colours, fonts, pictures).

Example Request
curl -X POST 'https://api.remagica.com/api/v1/brand-kits/from-file' \  -H 'Content-Type: application/json' \  -d '{  "fileName": "Brand book.pdf",  "key": "generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png"}'
Example Response
{  "brandKit": {    "createdAt": "2026-10-21T12:00:00.000Z",    "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05",    "ownerUserId": "ba132481-5b3d-4f60-8e2a-1d9c6b4f7e05",    "scope": "private",    "updatedAt": "2026-10-21T12:00:00.000Z",    "colors": [      {        "hex": "#ff8800",        "name": "Sunrise"      }    ],    "donts": [      "string"    ],    "dos": [      "string"    ],    "fonts": [      {        "family": "Inter",        "role": "display"      }    ],    "guidelines": "string",    "logos": [      {        "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"      }    ],    "mission": "string",    "name": "Autumn campaign",    "photography": {      "colorTreatment": [        "string"      ],      "composition": [        "string"      ],      "lighting": [        "string"      ],      "mood": [        "string"      ]    },    "references": [      {        "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"      }    ],    "sourceUrl": "https://files.remagica.com/generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png",    "spacing": {      "notes": "string",      "preset": "compact"    },    "tone": "string",    "values": [      "string"    ]  },  "summarised": true}