REST APIAPI reference
Media
Uploaded files and thumbnails
26 operations, generated from apps/api/openapi.yaml (OpenAPI 3.2). Each page has the parameters, request body, responses and code samples, and a Send button to try the request against your cloud instance.
- GET
/v1/mediaThe media libraryThe media library (media:read), newest first by default - POST
/v1/mediaUpload a fileUpload a file (media:write). Type is detected from content; SVG/HTML are rejected. - POST
/v1/media/deleteMove several files to Deleted, or delete them for good with permanentMove several files to Deleted, or delete them for good with permanent (posts:delete) - POST
/v1/media-foldersCreate a folder, at the top level or inside anotherCreate a folder, at the top level or inside another (media:write) - DELETE
/v1/media-folders/{id}Delete a folderDelete a folder (media:write); its files and subfolders move up to its parent, no file is deleted - PATCH
/v1/media-folders/{id}Rename a folder or move it under another oneRename a folder or move it under another one (media:write) - GET
/v1/media/{id}/infoA file's detailsA file's details (media:read); the file itself is GET /v1/media/{id} - POST
/v1/media/{id}/restoreTake a file out of Deleted, back where it wasTake a file out of Deleted, back where it was (posts:delete) - POST
/v1/media/{id}/keepKeep this file of a set of identical onesKeep this file of a set of identical ones (posts:delete and posts:write) - POST
/v1/media/{id}/replaceReplace a file with its editReplace a file with its edit (media:write, posts:write, posts:delete) - GET
/v1/media-projectsThe media editor's projects, newest firstThe media editor's projects, newest first (media:read) - POST
/v1/media-projectsSave an editable project of the media editorSave an editable project of the media editor (media:write) - GET
/v1/media-projects/{id}A project's factsA project's facts (media:read) - PUT
/v1/media-projects/{id}Save a new version of a projectSave a new version of a project (media:write) - DELETE
/v1/media-projects/{id}Delete a project and its fileDelete a project and its file; the files it was made from stay (posts:delete) - GET
/v1/media-projects/{id}/fileDownload a project's .gpex fileDownload a project's .gpex file (media:read) - GET
/v1/aiWhether the media editor's AI tools work, with which modelWhether the media editor's AI tools work, with which model (media:read) - PUT
/v1/aiSet the workspace's OpenAI key and image modelSet the workspace's OpenAI key and image model (admin) - DELETE
/v1/aiForget the workspace's AI keyForget the workspace's AI key (admin) - POST
/v1/ai/images/{op}Make a picture with the workspace's AI keyMake a picture with the workspace's AI key (media:write) - GET
/v1/media/{id}/usagePosts that use a filePosts that use a file (media:read; empty without posts:read), newest first, at most 50 - GET
/v1/media/{id}Download/preview a fileDownload/preview a file (media:read). Supports Range requests. - DELETE
/v1/media/{id}Move a file to DeletedMove a file to Deleted (restorable for 30 days), or delete it for good with permanent=true (posts:delete)