# Create

Create images from a text description. 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/create

### Playground

API Key

Prompt

Aspect Ratio

16:93:24:31:13:42:39:16 auto

Version

latest

latest

latest-fast

reve-create@20250915

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 maximum length is 2560 characters. This prompt will be automatically enhanced by the model.

- **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: 3:2

- **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 and reve-create@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/create \
  -H "Authorization: Bearer $REVE_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A towering stack of golden fluffy pancakes drizzled with amber honey syrup, topped with fresh blackberries and sliced bananas, served on a white ceramic plate on a rustic wooden table with soft blue-gray background.",
    "aspect_ratio": "16:9",
    "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-create@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 MISSING_REQUIRED_PARAMETER, 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-create@20250915",
  "content_violation": false,
  "request_id": "rsid-...",
  "credits_used": 18,
  "credits_remaining": 982
}
```

## 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-create@20250915
// X-Reve-Content-Violation: false
// X-Reve-Request-Id: rsid-...
// X-Reve-Credits-Used: 18
// X-Reve-Credits-Remaining: 982

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