remagicaDocs home
API referenceLibrary

File generations as assets

POST
/library/generations/sync

Needs a key withlibrary:write

Files the workspace's completed generations that aren't assets yet (newest first, up to 100). Finished generations are filed as they complete; this catches older ones.

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

Response Body

How many assets were added.

application/json
  1. response
filed*integer

Assets added.

Example Request
curl -X POST 'https://api.remagica.com/api/v1/library/generations/sync'
Example Response
{  "filed": 1}