Upload Asset
Upload an image asset to the current workspace.
Upload PNG, JPEG, WebP, GIF, or SVG images up to 10 MB. Uploaded files remain private to the workspace; reading the returned URL requires an API key or dashboard session. Pass this URL to an image parameter when rendering.
Endpoint
POST https://api.pixmato.com/v1/assets
Request
curl -X POST "https://api.pixmato.com/v1/assets" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@./hero-product.png"
Response
{
"asset": {
"id": "asset_01JY7R8Q7S2K3B4A5C6D7E8F9G",
"name": "hero-product.png",
"kind": "IMAGE",
"contentType": "image/png",
"size": 148203,
"url": "https://api.pixmato.com/workspaces/ws_01/assets/asset_01JY7R8Q7S2K3B4A5C6D7E8F9G/hero-product.png",
"storageKey": "workspaces/ws_01/assets/asset_01JY7R8Q7S2K3B4A5C6D7E8F9G/hero-product.png",
"tags": [],
"createdAt": "2026-11-06T12:00:00.000Z"
}
}
Errors
| Status | Meaning |
|---|---|
400 |
The multipart request did not include a file. |
413 |
The uploaded file is larger than 10 MB. |
415 |
The file type is not a supported image format. |
401 |
API key or dashboard session is missing or invalid. |