Introduction
Recraft 20B SVG generates vector icons and illustrations quickly and cheaply. Instead of describing a style in words, you pick it from a list of 21 named looks.
Key features & highlights
21 named styles
Icon styles include outline, broken_line, colored_outline, colored_shapes, colored_shapes_gradient, doodle_fill, doodle_offset_fill, offset_fill, outline_gradient and uneven_fill. Illustration styles include cartoon, doodle_line_art, engraving, flat_2, kawaii, line_art, line_circuit, linocut and seamless.
Quick turnaround
Our runs took about 11 seconds each, which makes batch icon work practical.
Small files
Icons came back at 20–25 KB.
Request parameters
| Parameter | Required | Description |
|---|---|---|
prompt | Yes | One subject reads best, especially for icons: a coffee cup with steam, a mountain with a rising sun. Add colours in words if you want them. at least 1 characters · at most 1000 characters |
style | No | Ten icon styles (outline, |
aspect_ratio | No | 1:1 (default) for icons; 16:9, 9:16, 4:3 or 3:4 for banners and scenes. It sets the SVG canvas shape at no extra cost. |
Pricing
$0.053 / SVG
Every icon or illustration delivered is billed at one fixed rate, whatever style or ratio you choose; nothing is charged when generation fails.
Use cases
Product icon libraries
Generate a consistent set for navigation, settings and feature lists.
Content illustration
Add a cartoon or kawaii image to an article, newsletter or slide.
Stickers and stamps
Use linocut, engraving or line art for print and cutting machines.
Prompt guide & pro tips
One object per icon
Short prompts such as a mountain with a rising sun give cleaner icons than long scene descriptions.
Lock the style for a set
Use the same style value for every icon in a set.
Keep text out of icons
The model is weak at lettering; add labels in your design tool.
API quick start
# Generate the idempotency key once; reuse it when retrying after a lost response.
export SPICY_IDEMPOTENCY_KEY="${SPICY_IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-d '{
"model": "recraft/20b-svg/text-to-image",
"input": {
"style": "vector_illustration",
"prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette",
"aspect_ratio": "1:1"
}
}'
# Copy data.taskId from the response into TASK_ID, then poll the status.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.spicyapi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"
See the API reference for authentication, the complete schema, polling, and error handling.



