Assets

Upload, list, and manage images, videos, fonts, and other binary assets. Assets are stored on Cloudflare R2 CDN and auto-analyzed by Claude Vision for descriptions.

POST/api/v1/sites/:id/assets

Upload an asset. Two modes: base64 (pass content_base64 + content_type) or URL (pass url to download from external source).

Auth: Bearer token

URL Parameters

idSite ID

Request Body

FieldTypeDescription
filenamestringFilename (e.g., "hero-bg.jpg")
content_base64string (optional)Base64-encoded content (mode 1)
content_typestring (optional)MIME type for base64 mode
urlstring (optional)External URL to download (mode 2)

Response

200 OK
{ "data": { "filename": "hero-bg.jpg", "url": "https://slug.vibesites.link/assets/hero-bg.jpg", "description": "..." } }
GET/api/v1/sites/:id/assets

List all assets with CDN URLs, auto-generated descriptions, and tags.

Auth: Bearer token

URL Parameters

idSite ID

Response

200 OK
{ "data": [{ "filename": "hero-bg.jpg", "url": "...", "description": "...", "tags": ["hero", "photo"] }] }