Reve API - Docs

Documentation Overview

The Reve API enables you to generate, edit, and remix high-quality images. To learn more about the pricing for our endpoints, visit the pricing page.

Endpoints

The Reve API provides the following endpoints for different image generation workflows:

POST https://api.reve.com/v2/image/create

Generate images from text with optional ordered reference images. Returns a description layout alongside the image.

Read documentation →

GET https://api.reve.com/v1/image/effect

List the effects available to the project associated with the API token, including saved project effects and built-in presets.

These are experimental layout building blocks that require care and experimentation to achieve good results. For the easiest, "batteries included" workflow, prefer the Create endpoint above.

POST https://api.reve.com/v2/image/extract_layout

Extract a structured layout from an image, optionally guided by a prompt. An experimental building block for layout-driven workflows.

Read documentation →

POST https://api.reve.com/v2/image/create_layout

Generate a structured layout from a text prompt and optional reference images, without rendering an image. An experimental building block for precise composition control.

Read documentation →

POST https://api.reve.com/v2/image/render_layout

Render a final image from a structured layout. An experimental building block that pairs with Create Layout.

Read documentation →

POST https://api.reve.com/v1/image/create

Generate images from text descriptions. Perfect for creating original artwork, illustrations, and visual content from your imagination.

Read documentation →

POST https://api.reve.com/v1/image/edit

Modify existing images using text instructions. Upload an image and describe the changes you want to make.

Read documentation →

POST https://api.reve.com/v1/image/remix

Combine text prompts with reference images to create new variations. Blend styles, concepts, and visual elements.

Read documentation →

Quickstart

cURL

curl -X POST https://api.reve.com/v2/image/create \
  -H "Authorization: Bearer $REVE_API_KEY" \
  -H "Accept: image/webp" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A beautiful sunset over mountains"
  }' -o mountain.webp

Response Formats

All API endpoints support multiple response formats based on the Accept header:

Response Codes

The API uses standard HTTP status codes to indicate the success or failure of requests. They include, but are not limited to:

Response Headers

All API responses include standard headers that provide additional information about the request and response:

Supported input image formats

When providing images to the Reve API, we support the following formats, base64-encoded as inline JSON data. A single image may be at most 40 MB and 33,554,432 pixels (for example 8192x4096), with neither dimension exceeding 8192 pixels. A single call may include at most 50,331,648 pixels and 100 MB of image data (after base64 decoding).

v2 Aspect Ratios

The v2 image and layout endpoints accept the full unified-model aspect-ratio set, including auto. The v1 endpoints intentionally document and accept only the smaller legacy subset.

v2 Latency and Client Timeouts

v2 endpoints perform model inference synchronously, so requests can run longer than many default HTTP client timeouts. Configure clients, load balancers, proxies, and job runners with request timeouts of at least 120 seconds.

Request Tracking with Breadcrumbs

You can add an optional &breadcrumb= query parameter to any API request to help track and identify requests in your logs. This is useful for correlating API requests with client-side actions or debugging specific workflows.

Example

https://api.reve.com/v1/image/create?breadcrumb=my-workflow-step-1

Test Time Scaling

You can optionally spend more time making better images by setting the test_time_scaling parameter to a value between 1 and 5. Any value above 1 will add additional API credits cost to the request.

Example

"test_time_scaling": 3,

Postprocessing: Upscale

You can optionally upscale the generated image by setting the postprocessing parameter to include an upscale object with the desired upscale factor.

Example

"postprocessing": [{ "process": "upscale", "upscale_factor": 2 }]

Postprocessing: Remove Background

You can optionally remove the background from the generated image by setting the postprocessing parameter to include a remove_background object.

Example

"postprocessing": [{ "process": "remove_background" }]

Postprocessing: Fit Image

You can optionally resize the generated image to fit within specified dimensions by setting the postprocessing parameter to include a fit_image object. The image will be scaled down while preserving its aspect ratio.

Example

"postprocessing": [{ "process": "fit_image", "max_dim": 512 }]

Postprocessing: Effect

You can optionally apply a saved effect to the generated image by setting the postprocessing parameter to include an effect object. The effect must be saved in the project associated with your API key.

Example

"postprocessing": [{ "process": "effect", "effect_name": "my-effect" }]

Listing Available Effects

Use GET /v1/image/effect to list all effects available to the project associated with your API token. The default response includes saved project effects and built-in presets, so the returned name values can be used as effect_name in postprocessing requests.

Field Type Description

List effects

JSON

{
  "effects": [
    {
      "name": "cmyk_halftone",
      "description": "CMYK halftone print effect",
      "source": "builtin",
      "category": "textures"
    },
    {
      "name": "my-saved-effect",
      "source": "saved"
    }
  ]
}

v2 Reference Shapes

The references field has different shapes for the high-level image endpoints and the layout pipeline endpoints. Use raw image objects for v2/image/create. Use compound { image, layout, prompt } reference objects for layout generation and rendering endpoints.

Layouts

A layout describes the composition of an image as a set of labeled regions, giving you precise control over what appears where. It is a JSON object with an optional overall prompt and a required regions array. Each region carries a label, a regional prompt, and a normalized bbox; the remaining fields are optional. Keep prompts concise — short noun phrases such as a red hat usually work better than long sentences, and the layout-level prompt is the place for any broader, whole-image description.

Example

{ "prompt": "a person at a cafe", "regions": [{ "label": "person", "prompt": "a woman in a red coat", "bbox": { "x0": 0.1, "y0": 0.1, "x1": 0.6, "y1": 0.9 } }] }

Layout Commands

The create_layout endpoint accepts an optional commands array of ordered, imperative edits applied on top of the prompt and references. Each command has an op plus op-specific fields. Positions (at, to) are either a normalized bounding box { x0, y0, x1, y1 } or a normalized point { x, y }, with coordinates in [0, 1] and a top-left origin. Fields marked with a trailing ? are optional. The valid shapes for each command are:

add

Introduce a new subject, optionally positioned.

{ "op": "add", "label": string } { "op": "add", "description": string } { "op": "add", "label": string, "at": { "x0", "y0", "x1", "y1" } } { "op": "add", "label": string, "at": { "x", "y" } } { "op": "add", "description": string, "at": { "x0", "y0", "x1", "y1" } } { "op": "add", "description": string, "at": { "x", "y" } }

place

Add a subject at a required position.

{ "op": "place", "label": string, "at": { "x0", "y0", "x1", "y1" } } { "op": "place", "label": string, "at": { "x", "y" } } { "op": "place", "description": string, "at": { "x0", "y0", "x1", "y1" } } { "op": "place", "description": string, "at": { "x", "y" } }

shift

Move a subject to a required destination, optionally from a specific image.

{ "op": "shift", "label": string, "to": { "x0", "y0", "x1", "y1" }, "at"?: {…}, "image_index"?: number } { "op": "shift", "label": string, "to": { "x", "y" }, "at"?: {…}, "image_index"?: number } { "op": "shift", "description": string, "to": { "x0", "y0", "x1", "y1" }, "at"?: {…}, "image_index"?: number } { "op": "shift", "description": string, "to": { "x", "y" }, "at"?: {…}, "image_index"?: number }

remove

Remove a subject, optionally scoped to a position or image.

{ "op": "remove", "label": string, "at"?: {…}, "image_index"?: number } { "op": "remove", "description": string, "at"?: {…}, "image_index"?: number }

keep

Preserve a subject; subject is optional.

{ "op": "keep", "at"?: {…}, "image_index"?: number } { "op": "keep", "label": string, "at"?: {…}, "image_index"?: number } { "op": "keep", "description": string, "at"?: {…}, "image_index"?: number }

change

Rewrite a labeled region's description in place.

{ "op": "change", "label": string, "new_description": string }