Reve AI Image Generation
Generate, edit, and remix images using Reve's AI API.
Prerequisites
- Bun runtime
REVE_API_KEY or REVE_AI_API_KEY environment variable set
Quick Usage
# Generate image from prompt
bun scripts/reve.ts create "A beautiful sunset over mountains" -o sunset.png
# With aspect ratio
bun scripts/reve.ts create "A cat in space" -o cat.png --aspect 16:9
# Edit existing image
bun scripts/reve.ts edit "Add dramatic clouds" -i photo.png -o edited.png
# Remix multiple images
bun scripts/reve.ts remix "Person from <img>0</img> in scene from <img>1</img>" -i person.png -i background.png -o remix.png
Commands
create
Generate a new image from a text prompt.
Options:
-o, --output FILE — Output file path (default: output.png)
--aspect RATIO — Aspect ratio: 16:9, 9:16, 3:2, 2:3, 4:3, 3:4, 1:1 (default: 3:2)
--version VER — Model version (default: latest)
edit
Modify an existing image using text instructions.
Options:
-i, --input FILE — Input image to edit (required)
-o, --output FILE — Output file path (default: output.png)
--version VER — Model version: latest, latest-fast, reve-edit@20250915, reve-edit-fast@20251030
remix
Combine text prompts with reference images. Use <img>N</img> in prompt to reference images by index (0-based).
Options:
-i, --input FILE — Reference images (can specify multiple, up to 6)
-o, --output FILE — Output file path (default: output.png)
--aspect RATIO — Aspect ratio (same options as create)
--version VER — Model version: latest, latest-fast, reve-remix@20250915, reve-remix-fast@20251030
Constraints
- Max prompt length: 2560 characters
- Max reference images for remix: 6
- Valid aspect ratios: 16:9, 9:16, 3:2, 2:3, 4:3, 3:4, 1:1
Response
The script outputs JSON with generation details:
{
"output": "path/to/output.png",
"version": "reve-create@20250915",
"credits_used": 18,
"credits_remaining": 982
}
Errors
401 — Invalid API key
402 — Insufficient credits
429 — Rate limited (includes retry_after)
422 — Invalid input (prompt too long, bad aspect ratio)
1---2name: reve-ai3description: Generate, edit, and remix images using the Reve AI API. Use when creating images from text prompts, editing existing images with instructions, or combining/remixing multiple reference images. Requires REVE_API_KEY or REVE_AI_API_KEY environment variable.4---5
6# Reve AI Image Generation
7
8Generate, edit, and remix images using Reve's AI API.
9
10## Prerequisites
11
12- Bun runtime
13- `REVE_API_KEY` or `REVE_AI_API_KEY` environment variable set
14
15## Quick Usage
16
17```bash
18# Generate image from prompt
19bun scripts/reve.ts create "A beautiful sunset over mountains" -o sunset.png
20
21# With aspect ratio
22bun scripts/reve.ts create "A cat in space" -o cat.png --aspect 16:9
23
24# Edit existing image
25bun scripts/reve.ts edit "Add dramatic clouds" -i photo.png -o edited.png
26
27# Remix multiple images
28bun scripts/reve.ts remix "Person from <img>0</img> in scene from <img>1</img>" -i person.png -i background.png -o remix.png
29```
30
31## Commands
32
33### create
34Generate a new image from a text prompt.
35
36Options:
37- `-o, --output FILE` — Output file path (default: output.png)
38- `--aspect RATIO` — Aspect ratio: 16:9, 9:16, 3:2, 2:3, 4:3, 3:4, 1:1 (default: 3:2)
39- `--version VER` — Model version (default: latest)
40
41### edit
42Modify an existing image using text instructions.
43
44Options:
45- `-i, --input FILE` — Input image to edit (required)
46- `-o, --output FILE` — Output file path (default: output.png)
47- `--version VER` — Model version: latest, latest-fast, reve-edit@20250915, reve-edit-fast@20251030
48
49### remix
50Combine text prompts with reference images. Use `<img>N</img>` in prompt to reference images by index (0-based).
51
52Options:
53- `-i, --input FILE` — Reference images (can specify multiple, up to 6)
54- `-o, --output FILE` — Output file path (default: output.png)
55- `--aspect RATIO` — Aspect ratio (same options as create)
56- `--version VER` — Model version: latest, latest-fast, reve-remix@20250915, reve-remix-fast@20251030
57
58## Constraints
59
60- Max prompt length: 2560 characters
61- Max reference images for remix: 6
62- Valid aspect ratios: 16:9, 9:16, 3:2, 2:3, 4:3, 3:4, 1:1
63
64## Response
65
66The script outputs JSON with generation details:
67```json
68{
69 "output": "path/to/output.png",
70 "version": "reve-create@20250915",
71 "credits_used": 18,
72 "credits_remaining": 982
73}
74```
75
76## Errors
77
78- `401` — Invalid API key
79- `402` — Insufficient credits
80- `429` — Rate limited (includes retry_after)
81- `422` — Invalid input (prompt too long, bad aspect ratio)