Upload an asset
upload_fileStore an image, font or PDF in the account's asset bucket and get back a kamy://asset/<id> reference you can drop anywhere inside a render_pdf / render_html data payload — Kamy swaps it for a fresh signed URL at render time. That reference is the point of this tool: it is how a logo, signature image or custom font gets into a template without hosting it yourself. Pass contentBase64 and this server performs the upload for you, returning { id, assetRef, bytes, uploaded: true }. Omit contentBase64 for files too big to pass through a tool call and you get the raw slot instead — { uploadUrl, uploadMethod, uploadHeaders, expiresAt, uploaded: false } — then PUT the bytes yourself within 15 minutes. Inline uploads are capped at 5 MB here; the API itself allows 100 MB via that URL. Only the listed MIME types are accepted. Requires a Kamy API key with the uploads:write scope; without a key, returns dashboard setup instructions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Name to store the asset under. Characters outside [A-Za-z0-9._-] are replaced with '_'. | |
| sizeBytes | No | Declared size in bytes. Computed automatically when contentBase64 is supplied. Max 100 MB. | |
| contentType | Yes | MIME type. The API rejects anything outside this list. | |
| contentBase64 | No | Base64 bytes to upload. When supplied, this server PUTs them to the pre-signed URL and the asset is immediately usable. Omit for files too large to pass through a tool call — you then get uploadUrl back and PUT the bytes yourself within 15 minutes. |