Uploads API
Upload an image to your media library and get a URL to use as a reference, start frame or post media.
Upload an image from your machine and get back a URL that every Mostly tool accepts: a reference image for slides and images, a start frame for video, or media for a post. Public https URLs work as they are, so only upload local files.
Upload an image
POST /api/v1/uploadsSend multipart/form-data:
| Field | Type | Description |
|---|---|---|
file | file | The image (PNG, JPG, WebP or GIF), up to 100 MB. (Required) |
brandId | string | Brand to file it under. Defaults to the x-mostly-brand-id header, then your only brand. |
curl -X POST https://mostly.so/api/v1/uploads \
-H "Authorization: Bearer mst_live_..." \
-F "file=@./product-shot.png"{
"id": "8f1c…",
"url": "https://…signed…"
}url is signed, so it works without your key. Pass it to the tools right away rather than storing it. The file stays in your media library on mostly.so.
Errors
| Status | error | When |
|---|---|---|
400 | BAD_REQUEST | No file field, not an image, or over 100 MB. |
402 | INSUFFICIENT_STORAGE | Your media library is full for your plan. |