Skip to content
Docs

Uploads API

Your media library: upload and list images, videos, audio and fonts.

View as Markdown
On this page

Authenticate with a personal token as Authorization: Bearer pxp_...; the operations are also MCP tools unless noted. The full machine-readable definition is in the OpenAPI specification.

OperationMethod and pathScope
List uploadsGET /uploadsoverlays:read
Upload media filePOST /uploadsuploads:write
Delete uploadDELETE /uploads/{uploadId}uploads:write
Rename uploadPATCH /uploads/{uploadId}uploads:write

Operations

List uploads

GET/api/v1/uploads

Lists your media library (images, video, audio, fonts) with urls usable as image/media sources in layer settings.

Scope: overlays:read (Read overlays) · MCP tool: list_uploads · Notes: read only

NameInTypeRequiredDescription
kindqueryimage, audio, video, font, alloptional
limitqueryintegeroptional1 to 250
offsetqueryintegeroptionalAt least 0
overlayIdquerystringoptionalOptional: the library of this overlay's owner (shared overlays). Up to 64 characters
Terminal
curl -X GET "https://pxstudio.cloud/api/v1/uploads" \
  -H "Authorization: Bearer $PX_TOKEN"

Upload media file

POST/api/v1/uploads

Uploads one file as the raw request body (Content-Type = the file type: image/png, image/jpeg, image/gif, image/webp, video/mp4, video/webm, audio/, font/). Query: name (display name), overlayId (upload into a shared overlay owner's library). Returns the url to use in layer settings. REST only.

Scope: uploads:write (Upload media) · MCP tool: none (REST only)

NameInTypeRequiredDescription
namequerystringoptionalUp to 120 characters
overlayIdquerystringoptionalOptional: upload for this shared overlay (counts against the owner's storage). Up to 64 characters

Send the raw file bytes as the request body. The type is detected from the content; SVG is not accepted.

Terminal
curl -X POST "https://pxstudio.cloud/api/v1/uploads" \
  -H "Authorization: Bearer $PX_TOKEN" \
  -H "Content-Type: image/png" \
  --data-binary @logo.png

Delete upload

DELETE/api/v1/uploads/{uploadId}

DESTRUCTIVE: deletes a file from your media library. A file that a widget still uses answers 409 upload_in_use; send force:true to delete it anyway (the widget then shows nothing there). Owner only. Cannot be undone.

Scope: uploads:write (Upload media) · MCP tool: delete_upload · Notes: destructive, needs confirmation in MCP

NameInTypeRequiredDescription
uploadIdpathintegerrequiredUpload id (from list_uploads). At least 1
forcequerybooleanoptionalDelete even if a widget still uses the file
Terminal
curl -X DELETE "https://pxstudio.cloud/api/v1/uploads/<uploadId>" \
  -H "Authorization: Bearer $PX_TOKEN"

Rename upload

PATCH/api/v1/uploads/{uploadId}

Changes the display name of a file in your media library. Widgets keep using the file. Owner only.

Scope: uploads:write (Upload media) · MCP tool: rename_upload

NameInTypeRequiredDescription
uploadIdpathintegerrequiredUpload id (from list_uploads). At least 1
namebodystringrequiredUp to 120 characters
Terminal
curl -X PATCH "https://pxstudio.cloud/api/v1/uploads/<uploadId>" \
  -H "Authorization: Bearer $PX_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "..." }'

Was this page helpful?