Recraft AI Recraft 20b Svg
Playground
Try it on WaveSpeedAI!Recraft-20B SVG generates fast, affordable SVG vector images ideal for scalable graphics and icons. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
Features
Generate scalable vector graphics (SVG) from text descriptions with Recraft 20B. This specialized model creates clean, production-ready vector illustrations across a wide range of styles — perfect for icons, logos, UI elements, and print-ready graphics that scale infinitely.
Why It Looks Great
- True vector output: Generates SVG files that scale to any size without quality loss.
- Extensive style library: 12+ specialized illustration styles from icons to detailed engravings.
- Production-ready: Clean paths and optimized output for immediate use.
- Icon specialization: Dedicated icon style for UI/UX and app design.
- Prompt Enhancer: Built-in tool to refine your descriptions automatically.
- Flexible aspect ratios: Multiple format options for any use case.
Parameters
| Parameter | Required | Description |
|---|---|---|
| prompt | Yes | Text description of the vector graphic you want to generate. |
| aspect_ratio | No | Output format: 1:1, 16:9, 9:16, 4:3, 3:4, etc. Default: 1:1. |
| style | No | Vector style preset (see Style Guide below). Default: icon. |
How to Use
- Write your prompt — describe the vector graphic you want to create.
- Use Prompt Enhancer (optional) — click to automatically enrich your description.
- Set aspect ratio — choose the format that fits your use case.
- Choose style — select from the extensive style library.
- Run — click the button to generate.
- Download — save your SVG file.
Pricing
Flat rate per image generation.
| Output | Cost |
|---|---|
| Per SVG | $0.044 |
Style Guide
| Style | Description | Best For |
|---|---|---|
| icon | Clean, simple iconography | App icons, UI elements, symbols |
| vector_illustration | General vector artwork | Versatile illustrations |
| vector_illustration/cartoon | Cartoon-style vectors | Fun, playful graphics |
| vector_illustration/doodle_line_art | Hand-drawn doodle aesthetic | Casual, sketchy designs |
| vector_illustration/engraving | Classic engraving style | Vintage, premium designs |
| vector_illustration/flat_2 | Modern flat design | UI, infographics, web |
| vector_illustration/kawaii | Cute Japanese style | Stickers, cute characters |
| vector_illustration/line_art | Clean line-based art | Minimalist illustrations |
| vector_illustration/line_circuit | Circuit board aesthetic | Tech, electronics themes |
| vector_illustration/linocut | Block print style | Artistic, textured look |
| vector_illustration/seamless | Tileable patterns | Backgrounds, textures |
Best Use Cases
- Icon Design — Create app icons, UI elements, and symbol sets.
- Logo Creation — Generate scalable logo concepts and brand marks.
- UI/UX Assets — Produce vector elements for interfaces and apps.
- Print Graphics — Create illustrations that print at any size.
- Pattern Design — Generate seamless tileable patterns.
- Game UI — Design RPG icons, badges, and decorative elements.
Example Prompts
- “Oil-painted round icon of a forest elf girl, golden border, painterly brushwork, fantasy RPG UI design, decorative look”
- “minimalist coffee cup icon, single color, simple shapes, app icon style”
- “vintage engraving of a sailing ship, detailed linework, nautical theme”
- “kawaii cat face sticker, cute expression, pastel colors, round design”
- “seamless geometric pattern, art deco style, gold and black”
- “flat illustration of a mountain landscape, modern minimal style, travel poster”
Pro Tips for Best Results
- Use the icon style for clean, simple graphics suitable for apps and UI.
- For detailed artwork, try engraving or line_art styles.
- Use seamless style for backgrounds and tileable patterns.
- Describe border styles and framing for RPG/game UI elements.
- Include color preferences in your prompt for better control.
- SVG output can be edited in tools like Illustrator, Figma, or Inkscape.
Notes
- Output is true SVG format — infinitely scalable vector graphics.
- SVG files can be further edited in any vector graphics software.
- Processing time may vary based on complexity.
- Some styles work better for certain subjects — experiment to find the best match.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
set -euo pipefail
export WAVESPEED_API_KEY="your-api-key"
REQUEST_BODY=$(cat <<'JSON'
{
"prompt": "A cinematic ocean wave at sunrise, highly detailed",
"aspect_ratio": "1:1",
"style": "vector_illustration"
}
JSON
)
# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
-X POST "https://api.wavespeed.ai/api/v3/recraft-ai/recraft-20b-svg" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
-H "Content-Type: application/json" \
-d "${REQUEST_BODY}")
TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
printf 'Submission response did not contain a prediction id
' >&2
exit 1
fi
RESULT_URL=$(printf '%s' "${TASK}" | jq -r '.urls.get // empty')
if [ -z "${RESULT_URL}" ]; then RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"; fi
# 2. Poll until the prediction finishes.
while true; do
RESPONSE=$(curl --silent --show-error --fail-with-body \
"${RESULT_URL}" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}")
RESULT=$(printf '%s' "${RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')
case "${STATUS}" in
completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
failed|cancelled|timeout) printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
created|processing) sleep 2 ;;
*) printf 'Unexpected status: %s
' "${STATUS}" >&2; exit 1 ;;
esac
doneParameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| prompt | string | Yes | - | The positive prompt for the generation. | |
| aspect_ratio | string | No | 1:1 | 1:1, 16:9, 9:16, 4:3, 3:4 | The aspect ratio of the generated media. |
| style | string | No | vector_illustration | vector_illustration, vector_illustration/cartoon, vector_illustration/doodle_line_art, vector_illustration/engraving, vector_illustration/flat_2, vector_illustration/kawaii, vector_illustration/line_art, vector_illustration/line_circuit, vector_illustration/linocut, vector_illustration/seamless, icon, icon/broken_line, icon/colored_outline, icon/colored_shapes, icon/colored_shapes_gradient, icon/doodle_fill, icon/doodle_offset_fill, icon/offset_fill, icon/outline, icon/outline_gradient, icon/uneven_fill | Style of the generated image. |
| enable_base64_output | boolean | No | false | - | If set to `true`, the prediction's `output` strings are returned as **naked base64** (no `data:<mime>;base64,` prefix). When `false` (default), outputs are returned as URLs pointing to our CDN. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Output values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction |
| data.model | string | Model ID used for the prediction |
| data.outputs | array<string | object> | Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model. |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to poll for the prediction result |
| data.status | string | Status: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |