Reve API - Docs - v2/create_layout

Create Layout

Create or edit a structured layout from a prompt, ordered mixed references, and optional commands. This endpoint is experimental and best suited for agents and custom tooling. For image generation, consider using the create endpoint instead. To learn more about pricing, visit the pricing page.


Working with references

This endpoint takes ordered compound references. Each entry may contain an image, a layout, a descriptive prompt, or any combination of those fields. Use image-only references for visual freedom and include layouts when structure must be preserved.


Compound references

The layout endpoints (create_layout and render_layout) take compound references — objects that pair an image with a layout — rather than raw image objects. Each entry provides an optional image, an optional layout, and an optional prompt.

{
  "image": { "data": "<base64>" },  // or { "ref": "id:<uuid>" }; optional
  "layout": { "prompt": "...", "regions": [ ... ] },  // optional
  "prompt": "..."  // optional
}

The image follows the same shape as any image input (exactly one of data or ref), and the layout follows the layout schema described.


Request Headers


Request Body


JSON Response Body

Successful responses (200)


Layouts

A layout describes the content and composition of an image. It includes:

Regions

Each region has:


Example JSON Response

{
  "layout": {
    "regions": [
      {
        "label": "<bottle 1>",
        "prompt": "Tall, slender glass bottle filled with a salmon-pink rosé wine...",
        "bbox": { "x0": 0.371, "x1": 0.511, "y0": 0.07, "y1": 0.869 },
        "color_palette": [ { "r": 242, "g": 115, "b": 83 }, { "r": 249, "g": 172, "b": 159 } ],
        "region_type": "coarse_detail"
      },
      {
        "label": "<label 1>",
        "prompt": "Off-white rectangular paper label with centered black serif text...",
        "bbox": { "x0": 0.379, "x1": 0.507, "y0": 0.562, "y1": 0.756 },
        "parent": "<bottle 1>",
        "region_type": "fine_detail"
      }
    ],
    "prompt": "A professional product photo shows a bottle of rosé wine...",
    "width": 4672,
    "height": 3520
  },
  "content_violation": false,
  "request_id": "rsid-...",
  "credits_used": 80,
  "credits_remaining": 880
}