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, and a per-frame format:
"output": [
{ "id": "instagram_story_1", "size": "1080x1920" },
{ "id": "instagram_story_2", "size": "1080x1920" },
{ "id": "blog_post_header", "size": "1600x900", "format": "webp" }
]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://cdn.rivermark.ai/rmd_cj4hbqz2w0003mz6x7p9q2xe/k3f8qz1w/instagram_story_1.png",
"format": "png",
"width": 1080,
"height": 1920
},
{
"id": "instagram_story_2",
"url": "https://cdn.rivermark.ai/rmd_cj4hbqz2w0003mz6x7p9q2xe/k3f8qz1w/instagram_story_2.png",
"format": "png",
"width": 1080,
"height": 1920
},
{
"id": "blog_post_header",
"url": "https://cdn.rivermark.ai/rmd_cj4hbqz2w0003mz6x7p9q2xe/k3f8qz1w/blog_post_header.webp",
"format": "webp",
"width": 1600,
"height": 900
}
],
"…": "…"
}Each output entry:
Prop
Type
Bare formats
If you pass just a format string — "png", "jpeg", "webp", "pdf", or "html" — 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. |
html | The live HTML document itself — every frame, fully self-contained. |
Ephemeral URLs, downloadable sources
Rendered URLs are temporary. 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.

