Create an upload
POST https://useshareable.com/api/v1/uploads
Use this when an agent has the file on disk and a shell. It’s the fastest way to publish any HTML
page over ~50 KB, and the way to send a PDF or image over ~3 MB without hosting it somewhere
first. Inline html or file_base64 is slow for large files because the model types every
byte, and it is capped at ~4 MB by the request-body limit. With an upload, one curl sends the
file from disk to storage, and you publish it by passing the upload_id. The MCP servers expose
this as the create_upload tool.
The file’s name with its extension. It sets the type:
.html/.htm makes a page, and
.pdf/.png/.jpg/.webp/.gif makes a file. It can be a path; the returned curl
reads exactly what you pass, and only the base name is kept.The file’s exact size in bytes. The uploaded file must match it exactly. A PDF/image can be up
to your plan’s per-file cap (Free 5 MB, Pro 50 MB). An HTML page is limited to 7 MB for
now, because larger pages time out when saved. For a bigger page, move images out into a
deck as assets.
Optional hex SHA-256 of the file. If given, an HTML upload whose bytes don’t match is refused
with
422 when you use it.-
Send the file. Run the returned
curl, orPUTthe raw bytes toupload_urlwith the givenheaders. -
Use it. Pass
upload_idin place of the content:- an HTML upload to
POST /pagesto create a page, or toPATCH /pages/{id}to replace a page’s draft HTML; - a PDF/image upload to
POST /pagesto publish it.
title,access, controls) work as usual. HTML writes returnreceived: { bytes, sha256 }, so you can confirm the server got exactly your file. - an HTML upload to
Rules
- An
upload_idbelongs to the account that created it and expires after 30 minutes. - It works once: using it consumes the stored file. Retrying a PDF/image publish with the same id returns the page it already created.
- If a write fails (for example a duplicate title), the upload is kept, so you can retry with the same id.
- Files are stored in a private staging area until they are used. Unused uploads are deleted automatically.