RivermarkRivermark
API reference

POST /design

Perform an agentic design task.

Performs an agentic design task and returns the rendered frames and a persistent design ID. The returned design ID can be used in a subsequent /design call as a reference or continue_from ID.

Endpoint
POST https://api.rivermark.ai/design

Request body

Full example
{
  "task": "Create an Instagram story for the summer sale. Headline: 'Summer sale — 30% off everything'. Subline: 'This weekend only.'",
  "user_prompt": "make it feel sunny",
  "references": [
    { "type": "design", "id": "rmd_cj4hbqz4f0005mz6x7p9q2xr" },
    { "type": "file", "id": "rmf_cj4hbqz9x0001v2x8n6tqz7e" }
  ],
  "output": [
    { "id": "instagram_story_1", "size": "1080x1920" },
    { "id": "instagram_story_2", "size": "1080x1920" }
  ],
  "default_scale": 2,
  "creativity": 1,
  "effort": "low",
  "continue_from": null,
  "image_source": "ai",
  "allow_fetch": false,
  "auto_review": { "type": "self" }
}

Parameters

Prop

Type

Output entries

Each entry in the output array:

Prop

Type

Response

200 OK
{
  "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
    }
  ],
  "change_summary": "Created two Instagram story options for the summer sale",
  "change_description": "Both options use the brand kit's Oat background with Roast typography; option 1 leads with a photo, option 2 with a typographic treatment. Verified safe zones and legibility.",
  "changes": [
    {
      "kind": "created",
      "path": "frames/page-1/instagram_story_1.html",
      "url": "https://api.rivermark.ai/renders/rmd_cj4hbqz2w0003mz6x7p9q2xe/k3f8qz1w/source/page-1/instagram_story_1.html?exp=1793577600&sig=x7Kq2v9Wb3"
    },
    {
      "kind": "created",
      "path": "frames/page-1/instagram_story_2.html",
      "url": "https://api.rivermark.ai/renders/rmd_cj4hbqz2w0003mz6x7p9q2xe/k3f8qz1w/source/page-1/instagram_story_2.html?exp=1793577600&sig=x7Kq2v9Wb3"
    },
    {
      "kind": "image",
      "path": "images/hero.png",
      "url": "https://api.rivermark.ai/renders/rmd_cj4hbqz2w0003mz6x7p9q2xe/k3f8qz1w/source/images/hero.png?exp=1793577600&sig=x7Kq2v9Wb3"
    }
  ],
  "cost": 0.104
}

Prop

Type

Source bundles

With "include_source": true, the response also has a source link to a zip of the delivered outputs as HTML:

source.zip
instagram_story_1.html
instagram_story_2.html
assets/instagram_story_1.css
assets/instagram_story_2.css
assets/hero.png

Each HTML file is a complete page at the output's size: it opens straight from disk in a browser, or can be hosted, embedded, or edited. The stylesheets are compiled, so no build step is needed. Google fonts load from Google Fonts, so a page renders its type only when online; custom and licensed fonts are in assets/fonts/. Rendered in another browser or version than Rivermark's, text can wrap slightly differently from the PNG. For pixel-exact results, use the rendered outputs.

Reply-only turns

With user_prompt and continue_from, the agent may answer instead of changing the design, for example when the user asks a question. The response then has a user_response, empty output and changes, and null summaries:

200 OK, reply only
{
  "design_id": "rmd_cj4hbqz7k0009mz6x7p9q2xg",
  "output": [],
  "change_summary": null,
  "change_description": null,
  "changes": [],
  "cost": 0.004,
  "user_response": "The headline is set in Fraunces, the brand's display face. Want me to try a heavier weight?"
}

The answer is part of the new design's conversation. Continue the next turn from the returned design_id, not from the one you sent.

Long requests

Without streaming, a request can take several minutes. The response starts at once with status 200, and the body arrives when the design is done. Until then, the connection is kept alive with whitespace. A failure after that point can't change the status anymore, so the body is an error object under status 200. Check for an error field before reading the design.

Change entries

Prop

Type

Streaming

Add ?stream=true to receive SSE events: progress, preview, and a terminal completed (or error) with the same payload as above. See Streaming.

Example tasks

Create an Instagram post from the provided brand kit with the following
text: '…'

Resize the provided design to Instagram story and LinkedIn post sizes

Based on the provided carousel template, create a short explainer
carousel for the referenced blog post.

Create 6 ad creative ideas for the user's brand based on the provided
best-selling product list.

On this page