Import an asset (image or TTF/OTF font) from base64 or a public URL

JSON alternative to the multipart POST /assets. Body: {filename, data_base64|url}. Images ≤5MB (inline base64 is additionally bounded by the 2MB request body; for larger files use url, or POST multipart to /assets). Fonts TTF/OTF. Returns the stored asset; its url is a path under /api/v1/files/… that only the owner's key or session can fetch — user assets are private, the renderer reads them internally, so the url works in a layer but is not a link to hand out. Note: MCP tool calls apply a stricter 96KB cap on data_base64 — inline base64 there costs the calling model output tokens.

post/assets/import

Request

  • Base URL: https://rendry.io/api/v1
  • URL: https://rendry.io/api/v1/assets/import
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer

Headers

X-Rendry-Accountstring

Browser/OAuth current member account selector. API keys/embed credentials are bound to their persisted account and reject another account. Omitting this header selects the browser actor personal account.

Request body

filenamestring required
data_base64string
urlstring

Response

Asset created

idstring required
user_idstring
file_namestring required
storage_keystring required

user_assets/{user}/… — what image layers, /images/* and fonts (font_storage_key) refer to

urlstring required

Path under /api/v1/files/… relative to the API origin. NOT a public link: a user asset is served only to its owner's key or session (GET /files/{path}); the renderer reads it internally, so it works in a layer

content_typestring required
sizeinteger required

Bytes

asset_type'image' | 'font' required
font_familystring

Fonts only: the family name to put in a text layer's font

created_via'web' | 'api' | 'derived'

web: uploaded by a person in the browser; api: uploaded with a key; derived: made by a cutout tool

created_atstring required

Changes

No recorded changes to this operation across all 1 revision of this API.