Recraft AI Recraft V4 Style Pro Text To Vector API Documentation
Playground
Try it on WaveSpeedAI!Recraft V4 Pro Style Text-to-Vector generates styled vector graphics from text prompts using either a reusable style ID or reference images, enabling consistent SVG-style assets, icons, illustrations, brand visuals, marketing graphics, and design system workflows. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
Features
Recraft V4 Style Pro Text-to-Vector generates vector graphics from text prompts using either a reusable Pro style_id or temporary style reference images. Use it to create high-quality, visually consistent vector assets with controllable aspect ratio and style matching.
Why Choose This?
-
Pro text-to-vector generation
Generate vector-style graphics directly from natural-language prompts. -
Reusable Pro style support
Use astyle_idcreated by the matching Recraft V4 Pro Create Style model to keep a consistent visual style. -
Reference-image style input
Provide reference images to create a style for the current request when nostyle_idis supplied. -
Style match control
Chooseprecisefor closer style matching orflexiblefor broader interpretation. -
Multiple aspect ratios
Generate square, portrait, landscape, and vertical vector outputs.
Parameters
| Parameter | Required | Description |
|---|---|---|
| prompt | Yes | Describe the image or vector graphic to generate. |
| images | No | Style reference images used to create a style for this request when no style_id is supplied. Supports up to 10 image URLs. |
| aspect_ratio | No | Output aspect ratio: 1:1, 4:3, 3:4, 16:9, or 9:16. Default: 1:1. |
| style_id | No | Reusable style ID created by the matching Create Style model. |
| style_match | No | Controls how closely the result follows the supplied style: precise or flexible. Default: precise. |
How to Use
- Write your prompt — Describe the vector graphic, subject, composition, and visual direction.
- Add style input — Provide a matching Pro
style_id, or upload referenceimagesto create a temporary style for this request. - Choose aspect ratio — Select
1:1,4:3,3:4,16:9, or9:16. - Set style match optional — Use
precisefor closer matching orflexiblefor broader style interpretation. - Submit — Generate the styled vector output.
Pricing
Pricing starts at $0.132 per request. If style reference images are provided, an additional $0.0055 is added.
| Configuration | Cost |
|---|---|
Text-to-vector with style_id or no reference images | $0.132 |
| Text-to-vector with reference images | $0.1375 |
aspect_ratio, style_id, and style_match do not add separate charges.
Best Use Cases
- Pro vector illustration generation — Create high-quality vector-style graphics from prompts.
- Brand asset creation — Generate stylized icons, badges, labels, and visual elements.
- Reusable Pro style workflows — Use a saved Pro
style_idto keep a consistent look across generations. - Style exploration — Upload reference images to test a style without creating a permanent style first.
- Marketing and design assets — Produce scalable-looking visuals for campaigns, layouts, and creative concepts.
Pro Tips
- Use a matching Pro
style_idwhen you need consistent output across multiple generations. - Use reference
imageswhen you want to create a style for the current request only. - Use
precisewhen style consistency is more important. - Use
flexiblewhen you want more creative variation. - Keep prompts focused on the subject, composition, and visual style.
- Use
16:9for wide layouts and9:16for vertical designs.
Notes
- The
style_idmust be used with the matching model version. - Use a Recraft V4 Style Pro
style_idonly withrecraft-v4-style-promodels. - Use a standard Recraft V4
style_idonly withrecraft-v4-stylemodels. - Do not mix standard and Pro style IDs across model versions.
- Either
imagesorstyle_idmust be provided. Usestyle_idfor a reusable saved style, orimagesto create a temporary style for the current request.
Related Models
- Recraft V4 Style Text-to-Image — Generate images using a reusable standard Recraft V4 style.
- Recraft V4 Style Text-to-Vector — Generate vector graphics using a reusable standard Recraft V4 style.
- Recraft V4 Style Pro Text-to-Image — Generate images using a reusable Recraft V4 Style Pro style.
- Recraft V4 Style Pro Text-to-Vector — Generate vector graphics using a reusable Recraft V4 Style Pro style.
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_match": "precise"
}
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-v4-style-pro/text-to-vector" \
-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="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"
# 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|deleted) printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
*) sleep 2 ;;
esac
doneParameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| prompt | string | Yes | - | Describe the image or vector graphic to generate. | |
| images | array<string> | No | - | 0 ~ 10 items | Used to create a style for this request when no style_id is supplied. |
| aspect_ratio | string | No | 1:1 | 1:1, 4:3, 3:4, 16:9, 9:16 | - |
| style_id | string | No | - | - | A reusable style ID created by the matching Create Style model. |
| style_match | string | No | precise | precise, flexible | Optionally control how closely the result follows the supplied style. |
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.status | string | Task status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses. |
| 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.status | string | Status: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses |
| 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 |