Recraft V4 Styles Pro 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-styles-pro/text-to-image |
|---|---|
| Type | Image generation (style-reference text-to-image, high resolution) |
| Endpoint | POST /v1/tasks |
| Pricing | See HiAPI Pricing |
Recraft V4 Styles Pro: set a style with 1–10 reference images and get a higher-resolution new image in that style (2048×2048 in the square_hd example), one per request.
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.
- To keep a set of images in one style, send the same image_urls with every request.
- Result URLs expire — copy the output to your own storage once the task succeeds.
Best suited for
Posters, displays and print pieces that need a large original.
image_urlsimage_sizeUse existing brand illustrations as references and pin brand colors with colors when needed.
image_urlscolorsOne set of references with different prompts for final images shown large.
image_urlspromptRequest parameters
model string required Fixed value recraft-v4-styles-pro/text-to-image.
input object required Business parameters.
prompt string required What to draw, 1–10000 characters. The style comes from image_urls.
image_urls array required 1–10 publicly accessible http(s) URLs of style reference images. PNG, JPG or WEBP, each under 20 MB and 64 MB in total; SVG is not supported.
image_size enum optional Output size preset.
style_match enum optional How closely to follow the reference style: precise stays closer, flexible allows more variation; behaves as flexible when omitted.
colors array optional Optional preferred palette as an array of RGB objects.
r integer required 0–255, red
g integer required 0–255, green
b integer required 0–255, blue
background_color object optional Optional preferred background color as an RGB object; r, g and b from 0 to 255.
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
Two Mediterranean watercolors as references and a prompt for a cliff lighthouse with seagulls; the 2048×2048 output keeps their light palette and soft washes.
{
"model": "recraft-v4-styles-pro/text-to-image",
"input": {
"prompt": "A lighthouse on a cliff with seagulls and waves, no logos, no brand names",
"image_urls": [
"https://static.hiapi.ai/gallery/2026/10/fa10ab95992be1a3.png",
"https://static.hiapi.ai/gallery/2026/10/e96f0a8de9568541.png"
],
"image_size": "square_hd"
}
}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 image from output[].url.
- When status=fail, fix the request based on the returned error instead of retrying the same invalid payload.
FAQ
Are reference images required?
Yes. image_urls takes at least 1 and up to 10 images.
What can the reference images be?
Publicly accessible http(s) URLs of PNG, JPG or WEBP images, each under 20 MB and 64 MB in total; SVG is not supported.
How do I choose style_match?
precise stays closer to the reference style, flexible allows more variation; it behaves as flexible when omitted.
Which sizes are supported?
image_size accepts square_hd (default), square, portrait_4_3, portrait_16_9, landscape_4_3 and landscape_16_9. The square_hd example came back at 2048×2048.
How is it different from Recraft V4 Styles?
Same parameters, higher resolution: with square_hd the Styles example is 1024×1024 and the Pro example 2048×2048. See live pricing for prices.
Can I set the palette?
Yes, through the API with colors (an array of RGB objects) and background_color (one RGB object). The online Playground does not show these two fields yet.
Can I reuse a saved style?
Saved styles cannot be passed in at the moment; send the reference images with every request.
How many images per request?
One image per request, downloaded from output[].url in the task result.