remagicaDocs home
API referenceProjects

Save a project as a template

POST
/projects/{workflowId}/template

Needs a key withtemplates:write

Saves a project as a template of your workspace's: its canvas, with each node's newest result kept as the template's example. team templates show for everyone in the workspace, personal ones for you only. Later edits to the project don't change it.

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

Path Parameters

workflowId*string
Length1 <= length <= 128

Request Body

application/json
  1. body
categories?array<>

Its categories on the Templates page.

Itemsitems <= 4
Default[]
description?string

What it makes; the project's description when left out.

Lengthlength <= 1000
title?string

Its name; the project's when left out.

Length1 <= length <= 200
visibility?string

team: everyone in the workspace sees it (the Templates page's Team chip). personal: only you (My templates).

Default"team"
Value in"personal""team"

Response Body

The template.

application/json
  1. response
coverThumbnailUrl*|

A small WebP of the cover (download URL) for cards and tiles; null where none was made, so show coverUrl.

coverUrl*|

The card's image at full size (download URL), once previews are made.

outputKind*string

What it mainly makes.

Value in"image""video""audio"
previewUrl*|

A short clip the card plays on hover (video templates).

canDelete*boolean

You saved it, so you can delete it.

categories*array<>
description*string
ownerName*|

Who saved it (a workspace's own); null for ours.

slug*string
title*string
visibility*|

A workspace's own: personal (its maker only) or team. Null for ours, which everyone sees.

Example Request
curl -X POST 'https://api.remagica.com/api/v1/projects/cb35dcdb-5b3d-4f60-8e2a-1d9c6b4f7e05/template' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "coverThumbnailUrl": "https://files.remagica.com/generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.jpg",  "coverUrl": "https://files.remagica.com/generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.jpg",  "outputKind": "image",  "previewUrl": "https://files.remagica.com/generations/e661f4c9-5b3d-4f60-8e2a-1d9c6b4f7e05/0.png",  "canDelete": true,  "categories": [    "cinematic"  ],  "description": "Product shots for the autumn campaign.",  "ownerName": "string",  "slug": "string",  "title": "Autumn campaign",  "visibility": "personal"}