Outputs
Name the frames you expect, and map them back reliably in code.
The output parameter of POST /design tells Rivermark what frames to produce. It takes either a list of expected outputs, or a single render format.
Named outputs
When your code needs to know exactly what came back, which is nearly always in production, declare each expected output with an ID. Each entry may include a size, a human-readable description of what the frame is for, a per-frame format, and a scale (see Scale):
"output": [
{ "id": "instagram_story_1", "size": "1080x1920" },
{ "id": "instagram_story_2", "size": "1080x1920" },
{ "id": "blog_post_header", "size": "1600x900", "format": "webp", "scale": 1 }
]The response's output array maps back to those IDs, so you can programmatically handle multiple outputs:
{
"design_id": "rmd_cj4hbqz2w0003mz6x7p9q2xe",
"output": [
{
"id": "instagram_story_1",
"url": "https://api.rivermark.ai/renders/rmd_cj4hbqz2w0003mz6x7p9q2xe/k3f8qz1w/instagram_story_1.png?exp=1793577600&sig=x7Kq2v9Wb3",
"format": "png",
"width": 2160,
"height": 3840,
"scale": 2
},
{
"id": "instagram_story_2",
"url": "https://api.rivermark.ai/renders/rmd_cj4hbqz2w0003mz6x7p9q2xe/k3f8qz1w/instagram_story_2.png?exp=1793577600&sig=x7Kq2v9Wb3",
"format": "png",
"width": 2160,
"height": 3840,
"scale": 2
},
{
"id": "blog_post_header",
"url": "https://api.rivermark.ai/renders/rmd_cj4hbqz2w0003mz6x7p9q2xe/k3f8qz1w/blog_post_header.webp?exp=1793577600&sig=x7Kq2v9Wb3",
"format": "webp",
"width": 1600,
"height": 900,
"scale": 1
}
],
"…": "…"
}Each output entry:
Prop
Type
Bare formats
If you pass just a format string ("png", "jpeg", "webp", or "pdf"), you'll receive all created and edited frames in that format, without IDs. This is handy for quick one-off requests:
"output": "png"Omitting output entirely is equivalent to "png".
Formats
| Format | Use |
|---|---|
png | Default. Lossless, best for design output with flat colors and text. |
jpeg | Smaller files for photographic content. |
webp | Modern web delivery, smaller than both at similar quality. |
pdf | Print and document workflows; one page per frame. |
Scale
A frame's size is the size its design is laid out at. Outputs render at a scale on top of it: at the default of 2, a 1080x1350 frame comes back as a 2160x2700 image, sharp on high-density screens. Set default_scale on the request to change it for every output, or scale on an output entry to change it for that output alone. Scales are whole numbers from 1 to 4; a bare format renders every frame at default_scale.
Ephemeral URLs, downloadable sources
Rendered URLs are temporary: they are signed links that work for 48 hours, and preview links for one hour. When a design completes, download anything you need to keep:
for (const frame of design.output) {
const res = await fetch(frame.url);
await writeFile(`${frame.id}.${frame.format}`, Buffer.from(await res.arrayBuffer()));
}The changes list additionally includes the created and edited HTML sources and generated images, each with its own temporary URL — useful if you want to host or post-process the HTML itself (see the API reference).
Multi-format requests
One request can produce frames in different sizes and formats — include size and format per output entry. The resizing guide covers reflow-aware adaptation in depth.

