# Remix

Create images from a text description and reference images. To learn more about the pricing for this endpoint, visit the [pricing page](https://api.reve.com/console/pricing).

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

### Playground

API Key

Reference Images (2/6)

0

1

Upload

Prompt

Aspect Ratio

16:9 3:2 4:3 1:1 auto

Version

latest

latest-fast

reve-remix@20250915

reve-remix-fast@20251030

Test Time Scaling

Postprocessing

Add Post-processor

Generate Image

### Result

## Request Headers

Authorization string required

The API Key provided as a bearer token.

Accept string

One of image/png, image/jpeg, image/webp or application/json. For images, the response will be the bytes directly with the additional information provided as custom headers. For JSON, the response will be an object with the image base64 encoded (png) with additional information provided as separate properties.

Default: application/json

## Request Body

prompt string required

The text description of the desired image. The text description may include xml img tags to refer to specific images by their index in the reference_images list. The maximum length is 2560 characters. This prompt will be automatically enhanced by the model.

reference_images list of images required

A list of base64 encoded reference images. You must provide between 1 and 6 reference images (inclusive). Each image must be no more than 40 MB and 33,554,432 pixels. Across all reference images, the total pixel count must be no more than 50,331,648 pixels and the total size no more than 100 MB.

aspect_ratio string

The desired aspect ratio of the generated image: One of 16:9, 9:16, 3:2, 2:3, 4:3, 3:4, or 1:1.

Default: Smartly chosen by the model

version string

The specific model version to use when generating the image. Using latest will default to our most recently released image model. The only supported version strings are:

- latest-fast
- latest
- reve-remix-fast@20251030
- reve-remix@20250915

Default: latest

postprocessing array

An optional argument. If you include it, the image will be processed further after generation. The supported postprocessing operations are:

- [{ "process": "upscale", "upscale_factor": 2 }] to upscale the image after generation. Supported upscale factors are 2, 3, and 4. Beware that a 4x upscaled image will be quite large.
- [{ "process": "remove_background" }] to attempt to keep only the central subject, and make the background part of the image transparent.
- [{ "process": "fit_image", "max_dim": 512 }] to resize the image to fit within specified dimensions while preserving aspect ratio. You can use max_dim to constrain the longest side, max_width to constrain width, or max_height to constrain height. At least one must be set. Maximum value for each is 4096. This operation has no additional cost.
- [{ "process": "effect", "effect_name": "cmyk_halftone" }] to apply a post-processing effect to the image. Use the GET /v1/image/effect endpoint to list available effect names. You can optionally include effect_parameters to override default effect settings.

Postprocessing may add additional cost and processing time to the request in proportion to the size of the image (except for fit_image which is free). The best way to calculate exact cost is to send an example request and inspecting the credits_used field in the response.

Default: none

test_time_scaling number

An optional argument. If it is included, the model will spend more effort in an attempt at making better images. This will **not** make the request run slower. Any value above 1 will add additional API credits cost to the request in proportion to the scaling. Values between 1 and 15 are accepted, although values above 5 will only occasionally lead to noticeable improvements. The best way to calculate exact cost is to send an example request and inspecting the credits_used field in the response.

Default: 1

## JSON Request

```curl
REVE_API_KEY=""

# Make the API request
curl -X POST https://api.reve.com/v1/image/remix \
  -H "Authorization: Bearer $REVE_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Style the pancakes in <img>0</img> on the cozy diner table in <img>1</img>.",
    "reference_images": [\
      "'"$(base64 < reference-0.jpg | tr -d '\n')"'\
      "'"$(base64 < reference-1.jpg | tr -d '\n')"'\
    ],
    "aspect_ratio": "1:1",
    "version": "latest"
  }'
```

## JSON Response Body (default)

### For successful responses (200 status code)

image string

The base64 encoded image data. This will be empty if the request was not successful.

version string

The specific model version used in the generation process. For example, reve-remix@20250915.

content_violation boolean

Indicates whether the generated image violates the content policy. True if there is a violation, False if there isn't.

request_id string

A unique id for the request.

credits_used number

The number of credits used for this request.

credits_remaining number

The number of credits remaining in your budget.

### For failure (non-200 HTTP status code)

error_code string

The type of error. Could be strings like INDEX_OUT_OF_BOUNDS, etc.

message string

More information about the error that occurred.

params object

Specific parameters related to the error, if applicable.

Successful JSON Response (200)

```json
// Status: 200
// Content-Type: application/json
// X-Reve-Content-Violation: false
// X-Reve-Request-Id: rsid-...

{
  "image": "...",
  "version": "reve-remix@20250915",
  "content_violation": false,
  "request_id": "rsid-...",
  "credits_used": 30,
  "credits_remaining": 970
}
```

## Image Response Body

For any response containing an X-Reve-Error-Code header, the response will be a small grey image in the format requested. Otherwise, successful responses (200 status code) with no content policy violations will return a base64 encoded image in the format requested.

Successful Image Response (200)

```json
// Status: 200
// Content-Type: image/png (or image/jpeg, image/webp)
// Content-Length: ...
// X-Reve-Version: reve-remix@20250915
// X-Reve-Content-Violation: false
// X-Reve-Request-Id: rsid-...
// X-Reve-Credits-Used: 30
// X-Reve-Credits-Remaining: 970

[Binary image data in the format requested]
```
