API reference
POST /upload
Upload a file — or snapshot a webpage — for use as a reference.
Uploads a file and returns a persistent ID that can be used as an input reference anywhere in the API. Files can be uploaded once and referenced in any number of requests.
POST https://api.rivermark.ai/uploadUploading a file
Send the file as multipart/form-data:
const form = new FormData();
form.append("file", new Blob([await fs.readFile("hero.png")], { type: "image/png" }), "hero.png");
const file = await fetch("https://api.rivermark.ai/upload", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.RIVERMARK_API_KEY}` },
body: form,
}).then((r) => r.json());{
"id": "rmf_cj4hbqz9x0001v2x8n6tqz7e",
"name": "hero.png",
"mime_type": "image/png",
"size": 842113,
"kind": "image"
}Snapshotting a webpage
Send a JSON body with a url to have Rivermark fetch and extract the page once, giving you a stable reference that won't change if the page does:
curl -X POST https://api.rivermark.ai/upload \
-H "Authorization: Bearer $RIVERMARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://acmecoffee.co/about" }' | jq{
"id": "rmf_cj4hbr01k0007v2x8n6tqz8f",
"name": "acmecoffee.co/about",
"mime_type": "text/html",
"size": 51203,
"kind": "webpage"
}Response
Prop
Type
Supported types
Currently supported:
- Images (PNG, JPEG, WebP, SVG, AVIF)
- Text files (
.txt,.md, CSV) - HTML/CSS files
.ziparchives (guidelines, asset drops, nested content)- Webpage URLs (fetched and extracted once)
- Canva designs
On request:
- PDFs
- Figma designs
.docx(Word) documents.pptx(PowerPoint)
Uploads are limited to 50 MB per file; larger archives should be split or trimmed. There is no limit on the number of files.
Notes
- Files are private to your organization.
- Deleting a design does not delete the files you uploaded — manage uploads from the API dashboard.
- There is no charge for storage; the cost of reading references is included in the requests that use them.

