Recraft
Use the bundled script to generate, vectorize, upscale, replace background, variate, remove background, and transform images via Recraft API.
Setup
- To access your API key, log in to Recraft and visit the page: https://www.recraft.ai/profile/api
- Generate a token by hitting ‘Generate new key’ button (available only if your API units balance is above zero)
- Set environment variable:
export RECRAFT_API_TOKEN="your-api-token"
Commands
Generate Image
uv run {baseDir}/scripts/recraft.py generate --prompt "your image description" --style "Recraft V3 Raw" --filename "output.png" --size "16:9"
Image to Image
uv run {baseDir}/scripts/recraft.py image-to-image --prompt "your image description" --style "Recraft V3 Raw" --input "/path/to/input.png" --filename "output.png" --strength 0.5
Replace Background
uv run {baseDir}/scripts/recraft.py replace-background --prompt "your background description" --style "Recraft V3 Raw" --input "/path/to/input.png" --filename "output.png"
Vectorize Image
uv run {baseDir}/scripts/recraft.py vectorize --input "/path/to/input.png" --filename "output.svg"
Remove Background
uv run {baseDir}/scripts/recraft.py remove-background --input "/path/to/input.png" --filename "output.png"
Crisp Upscale
uv run {baseDir}/scripts/recraft.py crisp-upscale --input "/path/to/input.png" --filename "output.png"
Creative Upscale
uv run {baseDir}/scripts/recraft.py creative-upscale --input "/path/to/input.png" --filename "output.png"
Variate Image
uv run {baseDir}/scripts/recraft.py variate --input "/path/to/input.png" --filename "output.png" --size "16:9"
Get User Information
uv run {baseDir}/scripts/recraft.py user-info
Parameters
--prompt, -p: Text description for image generation or editing, max 1000 characters
--input, -i: Input image path (for editing/transformation commands)
--filename, -f: Output filename
--style, -s: Visual style (default: Recraft V3 Raw)
Recraft V3 Raw, Photorealism, Illustration, Vector art, Icon
--size: Output size as aspect ratio (default: 1:1)
1:1, 2:1, 1:2, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 6:10, 14:10, 10:14, 16:9, 9:16
--strength: Transformation strength for image-to-image (0.0-1.0, default: 0.5), where 0 means almost identical, and 1 means minimal similarity
API Key
RECRAFT_API_TOKEN env var
- Or set
skills."recraft".apiKey / skills."recraft".env.RECRAFT_API_TOKEN in ~/.openclaw/openclaw.json
Notes
- Use timestamps in filenames:
yyyy-mm-dd-hh-mm-ss-name.png.
- The script prints a
MEDIA: line for OpenClaw to auto-attach on supported chat providers.
- Do not read the image back; report the saved path only.
- Vector art and Icon styles output SVG format.
- Rate limits: 100 requests per minute; 5 requests per second.
1---
2name: recraft
3description: Generate, vectorize, upscale, replace background, variate, remove background, and transform images via Recraft API.
4homepage: https://www.recraft.ai/
5metadata:
6 source: https://skillmd.com/skills/modbender/recraft
7 openclaw:
8 emoji: 🎨
9 requires:
10 bins:
11 - uv
12 env:
13 - RECRAFT_API_TOKEN
14 primaryEnv: RECRAFT_API_TOKEN
15 install:
16 - id: uv-brew
17 kind: brew
18 formula: uv
19 bins:
20 - uv
21 label: Install uv (brew)
22---
23
24# Recraft
25
26Use the bundled script to generate, vectorize, upscale, replace background, variate, remove background, and transform images via Recraft API.
27
28## Setup
29
301. To access your API key, log in to Recraft and visit the page: https://www.recraft.ai/profile/api
312. Generate a token by hitting ‘Generate new key’ button (available only if your API units balance is above zero)
323. Set environment variable:
33 ```bash
34 export RECRAFT_API_TOKEN="your-api-token"
35 ```
36
37## Commands
38
39### Generate Image
40
41```bash
42uv run {baseDir}/scripts/recraft.py generate --prompt "your image description" --style "Recraft V3 Raw" --filename "output.png" --size "16:9"
43```
44
45### Image to Image
46
47```bash
48uv run {baseDir}/scripts/recraft.py image-to-image --prompt "your image description" --style "Recraft V3 Raw" --input "/path/to/input.png" --filename "output.png" --strength 0.5
49```
50
51### Replace Background
52
53```bash
54uv run {baseDir}/scripts/recraft.py replace-background --prompt "your background description" --style "Recraft V3 Raw" --input "/path/to/input.png" --filename "output.png"
55```
56
57### Vectorize Image
58
59```bash
60uv run {baseDir}/scripts/recraft.py vectorize --input "/path/to/input.png" --filename "output.svg"
61```
62
63### Remove Background
64
65```bash
66uv run {baseDir}/scripts/recraft.py remove-background --input "/path/to/input.png" --filename "output.png"
67```
68
69### Crisp Upscale
70
71```bash
72uv run {baseDir}/scripts/recraft.py crisp-upscale --input "/path/to/input.png" --filename "output.png"
73```
74
75### Creative Upscale
76
77```bash
78uv run {baseDir}/scripts/recraft.py creative-upscale --input "/path/to/input.png" --filename "output.png"
79```
80
81### Variate Image
82
83```bash
84uv run {baseDir}/scripts/recraft.py variate --input "/path/to/input.png" --filename "output.png" --size "16:9"
85```
86
87### Get User Information
88
89```bash
90uv run {baseDir}/scripts/recraft.py user-info
91```
92
93## Parameters
94
95- `--prompt`, `-p`: Text description for image generation or editing, max 1000 characters
96- `--input`, `-i`: Input image path (for editing/transformation commands)
97- `--filename`, `-f`: Output filename
98- `--style`, `-s`: Visual style (default: Recraft V3 Raw)
99 - `Recraft V3 Raw`, `Photorealism`, `Illustration`, `Vector art`, `Icon`
100- `--size`: Output size as aspect ratio (default: 1:1)
101 - `1:1`, `2:1`, `1:2`, `3:2`, `2:3`, `4:3`, `3:4`, `5:4`, `4:5`, `6:10`, `14:10`, `10:14`, `16:9`, `9:16`
102- `--strength`: Transformation strength for image-to-image (0.0-1.0, default: 0.5), where 0 means almost identical, and 1 means minimal similarity
103
104## API Key
105
106- `RECRAFT_API_TOKEN` env var
107- Or set `skills."recraft".apiKey` / `skills."recraft".env.RECRAFT_API_TOKEN` in `~/.openclaw/openclaw.json`
108
109## Notes
110
111- Use timestamps in filenames: `yyyy-mm-dd-hh-mm-ss-name.png`.
112- The script prints a `MEDIA:` line for OpenClaw to auto-attach on supported chat providers.
113- Do not read the image back; report the saved path only.
114- Vector art and Icon styles output SVG format.
115- Rate limits: 100 requests per minute; 5 requests per second.