Recraft V4 Pro Vector API
https://api.hiapi.ai /v1/tasks Image, video, and audio models are called through theUnified Async API POST /v1/tasks endpoint; only the input fields differ (see input parameters below).
Model summary
| Model name | recraft-v4-pro/text-to-vector |
|---|---|
| Type | Image generation (text-to-vector SVG) |
| Endpoint | POST /v1/tasks |
| Pricing | See HiAPI Pricing |
Recraft V4 Pro Vector: the same description produces a more detailed editable SVG for finished logos, complex icons and vector illustration.
Production guidance
- For production, pass callback.url at the top level of the request body so HiAPI can notify your service when the task reaches a terminal state.
- GET /v1/tasks/:id is better for local debugging, low-volume jobs, or fallback reconciliation if a callback is missed.
- Result URLs expire — copy the output to your own storage once the task succeeds.
- The output is an SVG vector file. If your pipeline needs raster images, rasterize it after download; do not treat the bytes as JPEG/PNG.
Best suited for
Brand marks with layered structure, negative space and precise contours.
promptcolorsMulti-object icons in one visual language that hold up when enlarged.
promptimage_sizePosters, packaging and editorial art ready for prepress.
promptRequest parameters
model string required Fixed value recraft-v4-pro/text-to-vector.
input object required Business parameters.
prompt string required Vector artwork description: subject, shapes, style and any text to draw. 1–10,000 characters.
image_size enum optional Canvas ratio preset. The preset sets the canvas orientation and ratio; the SVG output scales without loss.
colors array optional Preferred palette as an array of RGB objects; each object contains r, g and b from 0 to 255.
r integer required 0–255, red
g integer required 0–255, green
b integer required 0–255, blue
background_color object optional Preferred background color as an RGB object; r, g and b range from 0 to 255.
r integer required 0–255, red
g integer required 0–255, green
b integer required 0–255, blue
callback object optional Optional callback configuration. When set, HiAPI notifies your service when the task reaches a terminal state.
url string required Required when callback is set; HTTPS URL that receives terminal task notifications.
when enum optional Callback trigger timing. Use final.
Example requests
colors sets deep green and sand, while background_color sets cream; the SVG paths stay within that palette.
{
"model": "recraft-v4-pro/text-to-vector",
"input": {
"prompt": "A minimal geometric mountain mark for an outdoor brand, flat vector, centered",
"image_size": "square_hd",
"colors": [
{
"r": 22,
"g": 61,
"b": 52
},
{
"r": 232,
"g": 212,
"b": 178
}
],
"background_color": {
"r": 250,
"g": 246,
"b": 238
}
}
}Getting the result
- The response returns a taskId immediately without waiting for generation to finish.
- In production, prefer waiting for callback.url to receive the terminal notification. For local debugging, poll GET /v1/tasks/:id.
- When status=success, download the SVG file from output[].url.
- Open the file in a browser, Figma, Illustrator or Sketch. SVG is a text-based vector format.
- When status=fail, fix the request based on the returned error instead of retrying the same invalid payload.
FAQ
What is the Pro tier best for?
Finished logos, complex icon sets, detailed vector illustration and brand assets that need one visual language.
How is it different from the standard V4 Vector?
Inputs are identical. Pro spends more effort on contours, layers and small structures for production-ready results; V4 is better for fast options.
What format is the output?
An editable SVG vector file, one file per request at output[].url in the task result.
Which canvas sizes are supported?
image_size accepts square_hd (default), square, portrait_4_3, portrait_16_9, landscape_4_3 and landscape_16_9.
Can I specify brand colors?
Yes. Pass colors (an array of RGB objects) and background_color (one RGB object), each channel 0–255.
Can the result be edited in design tools?
Yes. SVG opens in Figma, Illustrator, Sketch and similar tools for node, color and text edits and export at any size.
Do I need a reference image?
No. It is a text-to-vector model.
How is it billed?
Per output SVG file, one file per request. See the live pricing page for the current rate.