Assets

Upload custom fonts and images to your PixDoc account. Reference them in templates and HTML via stable URLs, and fonts are automatically injected into every render.

Uploading Assets

Upload via the dashboard or API. Supported file types:

  • Fonts: .woff2, .woff, .ttf, .otf
  • Images: .png, .jpg, .jpeg, .svg, .webp

Max file size: 10 MB. Storage limits vary by plan.

Upload via API

curl -X POST https://pixdoc.dev/api/v1/assets \
-H "Authorization: Bearer pd_live_a3b2c4d5..." \
-F "file=@./brand-sans-bold.woff2"

Using Assets in Templates

Reference uploaded assets via their stable proxy URL:

https://pixdoc.dev/api/assets/{assetId}/{filename}

Images

<img src="https://pixdoc.dev/api/assets/abc123/logo.png" alt="Logo" />

Fonts

Uploaded fonts are automatically injected as @font-face declarations into every render. Just use the font-family name:

h1 { font-family: "Brand Sans Bold"; }

Font family names are derived from the filename. Upload "brand-sans-bold.woff2" and use font-family: "Brand Sans Bold".

Storage Limits

PlanStorage
Free10 MB
Starter50 MB
Pro200 MB
Business1 GB

API Reference

List Assets

GET /api/v1/assets

Returns all assets for your account, sorted by most recently uploaded.

curl https://pixdoc.dev/api/v1/assets \
-H "Authorization: Bearer pd_live_a3b2c4d5..."

Upload Asset

POST /api/v1/assets

Upload a file as a multipart form request. Returns 201 on success, 413 if the file exceeds the size limit, or 422 if the file type is unsupported.

curl -X POST https://pixdoc.dev/api/v1/assets \
-H "Authorization: Bearer pd_live_a3b2c4d5..." \
-F "file=@./logo.png"

Delete Asset

DELETE /api/v1/assets/{id}

Deletes an asset you own. Returns 204 on success.

curl -X DELETE https://pixdoc.dev/api/v1/assets/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer pd_live_a3b2c4d5..."