Recraft V4.1 API (Pro, Standard, & Flash), Recraft Crisp Upscale API, Recraft V4 Pro API, Recraft V4, V3 API: Pricing, Documentation
by Recraft
Recraft offers professional-grade AI image generation models known for exceptional quality and creative control. With Recraft V3 and the latest V4 Normal, developers can generate high-fidelity images with precise style control and consistent results through Pixazo's API. The API is designed for design professionals, marketers, and creative teams requiring production-quality image generation with reliable, repeatable outputs.

Models Version
Get 10% Cashback on Your First Payment (up to $500)
Add funds and get 10% cashback on your first payment (up to $500).
Recraft V4.1 Pro API Documentation
https://gateway.pixazo.ai/recraft-v4-1-pro/v1/recraft-v4-1-pro/generate
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Image - Recraft V4.1 Pro
Request Code
POST https://gateway.pixazo.ai/recraft-v4-1-pro/v1/recraft-v4-1-pro/generate
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "A breathtaking mountain landscape at golden hour with dramatic clouds, ultra-realistic photography style",
"size": "2048x2048",
"n": 1
}
import requests
url = "https://gateway.pixazo.ai/recraft-v4-1-pro/v1/recraft-v4-1-pro/generate"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "A breathtaking mountain landscape at golden hour with dramatic clouds, ultra-realistic photography style",
"size": "2048x2048",
"n": 1
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/recraft-v4-1-pro/v1/recraft-v4-1-pro/generate';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
prompt: 'A breathtaking mountain landscape at golden hour with dramatic clouds, ultra-realistic photography style',
size: '2048x2048',
n: 1
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/recraft-v4-1-pro/v1/recraft-v4-1-pro/generate" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "A breathtaking mountain landscape at golden hour with dramatic clouds, ultra-realistic photography style",
"size": "2048x2048",
"n": 1
}'
Output
// When n=1 (default), output is a single string:
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp"
}
// When n>1, output is an array of strings:
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-1.webp"
]
}
Request Parameters - Text to Image
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | 1–10000 characters |
| Text description of the image you want to generate. Recraft V4.1 models accept prompts up to 10,000 characters. | ||||
size | No | string | 2048x2048 | 28 values2048x2048, 3072x1536, 1536x3072, 2560x1664, 1664x2560, 2432x1792, 1792x2432, 2304x1792, 1792x2304, 1664x2688, 2560x1792, 1792x2560, 2688x1536, 1536x2688, 1:1, 2:1, 1:2, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 6:10, 14:10, 10:14, 16:9, 9:16 |
| Output image size, given either as exact pixel dimensions (WxH) or as an aspect ratio (w:h). Each aspect ratio maps to the Pro resolution listed next to it — for example 1:1 is 2048x2048, 16:9 is 2688x1536 and 9:16 is 1536x2688. | ||||
n | No | integer | 1 | 1–6 |
| Number of images to generate. When n is 1 the response output field is a single image URL; when n is greater than 1 it is an array of image URLs. | ||||
controls | No | object | — | colors, background_color |
| Optional controls that tweak the generation process. Recraft V4.1 supports colors and background_color only (artistic_level and no_text apply to Recraft V3 models and are ignored here). | ||||
controls.colors | No | array of objects | — | items of the form {"rgb": [R, G, B], "weight": 0.0–1.0} |
| Preferred color palette. Each item requires rgb, an array of 3 integers in the range 0–255. The optional weight (0.0–1.0) sets that color's relative preference; the sum of all weights must not exceed 1.0. | ||||
controls.background_color | No | object | — | {"rgb": [R, G, B]} |
| Desired background color for the generated image, given as an rgb array of 3 integers in the range 0–255. | ||||
Example Request
{
"prompt": "A breathtaking mountain landscape at golden hour with dramatic clouds, ultra-realistic photography style",
"size": "2048x2048",
"n": 1
}
Response
// When n=1 (default), output is a single string:
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp"
}
// When n>1, output is an array of strings:
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-1.webp"
]
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 200 | Success — image URL returned |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Insufficient Balance |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
| 502 | Bad Gateway — upstream failure |
Error Responses
Common error response shapes returned by the API.
400 Bad Request — Missing prompt
{
"error": "Missing required field: prompt"
}
403 Insufficient Balance
"The balance is insufficient to proceed with this operation."
502 Bad Gateway
{
"error": "Failed to reach upstream API",
"status": 502
}
Response Fields
| Field | Type | Description |
|---|---|---|
| output | string or array | URL(s) to the generated image(s). Returns a single string when n=1, or an array of strings when n>1. Each URL points to a .webp image hosted on Cloudflare R2. |
Notes
Recraft V4.1 Pro does not support the style, style_id, or negative_prompt parameters — passing any of these results in a 400 Bad Request. Image generation typically takes 30–50 seconds for single images; multiple images or higher resolutions may take longer. The output field returns a single string URL when n=1, or an array of string URLs when n>1. Generated images are in .webp format hosted on Cloudflare R2.
Recraft V4.1 Pro API Pricing
Recraft V4.1 Standard API Documentation
Create images from a text description: posters, product shots, illustrations and graphics with clean, legible text. Up to 6 images per request at about 1 megapixel, in one of 14 shapes, as WEBP or PNG. For vector art (SVG) use /recraft-v4-1/v1/text-to-vector. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.
POST https://gateway.pixazo.ai/recraft-v4-1/v1/text-to-imageAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Image - Recraft V4.1
Request Code
POST https://gateway.pixazo.ai/recraft-v4-1/v1/text-to-image
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "A minimalist poster for a coffee brand called 'PIXAZO ROAST': a steaming cup on a warm beige background, bold modern typography",
"size": "16:9"
}import requests
url = "https://gateway.pixazo.ai/recraft-v4-1/v1/text-to-image"
headers = {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "A minimalist poster for a coffee brand called 'PIXAZO ROAST': a steaming cup on a warm beige background, bold modern typography",
"size": "16:9"
}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())const res = await fetch("https://gateway.pixazo.ai/recraft-v4-1/v1/text-to-image", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify({
"prompt": "A minimalist poster for a coffee brand called 'PIXAZO ROAST': a steaming cup on a warm beige background, bold modern typography",
"size": "16:9"
})
});
console.log(await res.json());curl -X POST 'https://gateway.pixazo.ai/recraft-v4-1/v1/text-to-image' \
-H 'Content-Type: application/json' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
--data-raw '{"prompt": "A minimalist poster for a coffee brand called '\''PIXAZO ROAST'\'': a steaming cup on a warm beige background, bold modern typography", "size": "16:9"}'Output
{
"request_id": "recraft-v4-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/recraft-v4-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Webhook (Optional)
Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks). |
Callback Payload (success)
{
"request_id": "recraft-v4-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "recraft-v4-1",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-minimalist-poster-for-a-coffee-brand-called-pixa-1795504804858-0.webp"
],
"media_type": "image/webp"
},
"created_at": "2026-11-24T07:19:52.053Z",
"updated_at": "2026-11-24 07:20:06",
"completed_at": "2026-11-24 07:20:05"
}Failure callback shape
{
"request_id": "recraft-v4-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "recraft-v4-1",
"error": "Generation failed: the request was rejected (controls.colors must be an array of 1 to 10 colors, each {\"rgb\": [r, g, b]}).",
"output": null,
"created_at": "2026-11-24T07:20:58.546Z",
"updated_at": "2026-11-24 07:21:02",
"completed_at": "2026-11-24 07:21:02"
}Callbacks are idempotent on request_id — de-duplicate on it. Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | 1 to 10,000 characters |
| Describes the image, including any text it should show. | ||||
size | No | string | picked from the prompt | 1:1, 2:1, 1:2, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 6:10, 14:10, 10:14, 16:9, 9:16, or the exact size for one of them (for example 1344x768) |
The output shape. See Sizes below. Without size the model picks the shape that suits the prompt. | ||||
n | No | integer | 1 | 1 to 6 |
| How many images to make; each one is billed. | ||||
random_seed | No | integer | random | 0 to 2,147,483,647 |
| Fix it to make a result easier to reproduce. | ||||
image_format | No | string | webp | webp, png |
| The file format of the image (WEBP is lossless). | ||||
controls.colors | No | array of colors | — | 1 to 10 colors, each {"rgb": [r, g, b]} with 0–255 values |
| A palette the image should use, for example brand colors. | ||||
controls.background_color | No | color | — | {"rgb": [r, g, b]} with 0–255 values |
| The background color. | ||||
How usage is measured
Billed per image: a request with n images costs n times the per-image rate. Size, format, seed and colors do not change the price. The rates are in the pricing panel on this page. Nothing is charged for a request that fails.
Parameters not supported
Rejected with 400
Checked when you submit: the request is rejected before it is queued.
| Parameter | Why | Use instead |
|---|---|---|
num_images, number_of_images, batch_size, count, num_outputs | The image count is set by one field. | n |
width, height, image_size, aspect_ratio, resolution | The shape is set by one field. | size |
size outside the list above | Only the listed values are offered. | A listed value |
image_format other than webp or png | Only the listed values are offered. | webp or png |
n outside 1–6, or random_seed outside its range | Out of range. | A value in range |
negative_prompt | Not supported by this model. | Describe what you want in prompt |
style, substyle, style_id, style_reference_urls, style_match | Styles are not available on this API. | — |
text_layout | Not supported by this model. | Put the text in prompt |
image, image_url | This API makes images from text only. | — |
Accepted, then the request fails
These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR" and an error that names the problem. Nothing is charged.
| Parameter | When the request fails |
|---|---|
controls | A color is not {"rgb": [r, g, b]} with 0–255 values, there are more than 10 colors, or controls has a key other than colors and background_color. |
prompt | The prompt or the result is blocked by the model's content filter. |
Accepted but ignored
Any other parameter (for example model or response_format) is dropped and has no effect: this endpoint always runs Recraft V4.1 and returns a download URL.
Sizes
Each aspect ratio has one output size of about 1 megapixel. Send either the ratio or its exact size; they are the same request.
size (ratio) | Output (pixels) |
|---|---|
1:1 | 1024×1024 |
2:1 | 1536×768 |
1:2 | 768×1536 |
3:2 | 1280×832 |
2:3 | 832×1280 |
4:3 | 1216×896 |
3:4 | 896×1216 |
5:4 | 1152×896 |
4:5 | 896×1152 |
6:10 | 832×1344 |
14:10 | 1280×896 |
10:14 | 896×1280 |
16:9 | 1344×768 |
9:16 | 768×1344 |
The output is WEBP by default, or PNG with image_format. Measured at launch: a 16:9 request returned a WEBP of 1344×768.
Timing
At launch a request took about 13 seconds from submit to COMPLETED. Polling the status endpoint every 5 seconds is enough, or use a Webhook.
Example Request
{
"prompt": "A minimalist poster for a coffee brand called 'PIXAZO ROAST': a steaming cup on a warm beige background, bold modern typography",
"size": "16:9"
}Example Response
{
"request_id": "recraft-v4-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/recraft-v4-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Request Headers
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal server error. |
Error Responses
A 400 names every rejected parameter in violations:
{
"error": "Invalid request parameters",
"message": "'size' must be one of: \"1:1\", \"2:1\", \"1:2\", \"3:2\", \"2:3\", \"4:3\", \"3:4\", \"5:4\", \"4:5\", \"6:10\", \"14:10\", \"10:14\", \"16:9\", \"9:16\", \"1024x1024\", \"1536x768\", \"768x1536\", \"1280x832\", \"832x1280\", \"1216x896\", \"896x1216\", \"1152x896\", \"896x1152\", \"832x1344\", \"1280x896\", \"896x1280\", \"1344x768\", \"768x1344\" (got \"21:9\")",
"violations": [
"'size' must be one of: \"1:1\", \"2:1\", \"1:2\", \"3:2\", \"2:3\", \"4:3\", \"3:4\", \"5:4\", \"4:5\", \"6:10\", \"14:10\", \"10:14\", \"16:9\", \"9:16\", \"1024x1024\", \"1536x768\", \"768x1536\", \"1280x832\", \"832x1280\", \"1216x896\", \"896x1216\", \"1152x896\", \"896x1152\", \"832x1344\", \"1280x896\", \"896x1280\", \"1344x768\", \"768x1344\" (got \"21:9\")"
]
}Retrieving Results
Poll the status endpoint with the request_id until status is COMPLETED or ERROR, then download each image from output.media_url.
curl 'https://gateway.pixazo.ai/v2/requests/status/recraft-v4-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'Completed response
Captured from a real Recraft V4.1 request at launch; the request id is masked.
{
"request_id": "recraft-v4-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "recraft-v4-1",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-minimalist-poster-for-a-coffee-brand-called-pixa-1795504804858-0.webp"
],
"media_type": "image/webp"
},
"created_at": "2026-11-24T07:19:52.053Z",
"updated_at": "2026-11-24 07:20:06",
"completed_at": "2026-11-24 07:20:05"
}Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | One URL per image (n in all). Download them and keep your own copies. |
| output.media_type | string | The MIME type: image/webp or image/png. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status URL for this request (in the submit response). |
Status Values & Flow
QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.
Recraft V4.1 Standard API Pricing
Recraft V4.1 Standard API Documentation
Create scalable vector art (SVG) from a text description: logos, icons, illustrations and stickers that stay sharp at any size. Up to 6 images per request, in one of 14 shapes. For a raster image use /recraft-v4-1/v1/text-to-image. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.
POST https://gateway.pixazo.ai/recraft-v4-1/v1/text-to-vectorAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Vector - Recraft V4.1 Vector
Request Code
POST https://gateway.pixazo.ai/recraft-v4-1/v1/text-to-vector
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "A flat vector logo of a mountain and a rising sun inside a circle, two colors, clean lines",
"size": "1:1"
}import requests
url = "https://gateway.pixazo.ai/recraft-v4-1/v1/text-to-vector"
headers = {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "A flat vector logo of a mountain and a rising sun inside a circle, two colors, clean lines",
"size": "1:1"
}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())const res = await fetch("https://gateway.pixazo.ai/recraft-v4-1/v1/text-to-vector", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify({
"prompt": "A flat vector logo of a mountain and a rising sun inside a circle, two colors, clean lines",
"size": "1:1"
})
});
console.log(await res.json());curl -X POST 'https://gateway.pixazo.ai/recraft-v4-1/v1/text-to-vector' \
-H 'Content-Type: application/json' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
--data-raw '{"prompt": "A flat vector logo of a mountain and a rising sun inside a circle, two colors, clean lines", "size": "1:1"}'Output
{
"request_id": "recraft-v4-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/recraft-v4-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Webhook (Optional)
Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks). |
Callback Payload (success)
{
"request_id": "recraft-v4-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "recraft-v4-1",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-flat-vector-logo-of-a-mountain-and-a-rising-sun--1795504819831-0.svg"
],
"media_type": "image/svg+xml"
},
"created_at": "2026-11-24T07:19:58.324Z",
"updated_at": "2026-11-24 07:20:21",
"completed_at": "2026-11-24 07:20:20"
}Failure callback shape
{
"request_id": "recraft-v4-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "recraft-v4-1",
"error": "Generation failed: the request was rejected (artistic_level is not supported by Recraft V4.1).",
"output": null,
"created_at": "2026-11-24T07:21:00.810Z",
"updated_at": "2026-11-24 07:21:04",
"completed_at": "2026-11-24 07:21:04"
}Callbacks are idempotent on request_id — de-duplicate on it. Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | 1 to 10,000 characters |
| Describes the vector art: subject, style (flat, line art, outline…) and any text it should show. | ||||
size | No | string | picked from the prompt | 1:1, 2:1, 1:2, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 6:10, 14:10, 10:14, 16:9, 9:16 (aspect ratios only) |
The output shape. SVG has no pixel size; the ratio sets its proportions. Without size the model picks the shape that suits the prompt. | ||||
n | No | integer | 1 | 1 to 6 |
| How many images to make; each one is billed. | ||||
random_seed | No | integer | random | 0 to 2,147,483,647 |
| Fix it to make a result easier to reproduce. | ||||
controls.colors | No | array of colors | — | 1 to 10 colors, each {"rgb": [r, g, b]} with 0–255 values |
| A palette the artwork should use, for example brand colors. | ||||
controls.background_color | No | color | — | {"rgb": [r, g, b]} with 0–255 values |
| The background color. | ||||
How usage is measured
Billed per image: a request with n images costs n times the per-image rate. Vector images are billed at the vector rate, which is higher than the raster rate of /recraft-v4-1/v1/text-to-image. The rates are in the pricing panel on this page. Nothing is charged for a request that fails.
Parameters not supported
Rejected with 400
Checked when you submit: the request is rejected before it is queued.
| Parameter | Why | Use instead |
|---|---|---|
num_images, number_of_images, batch_size, count, num_outputs | The image count is set by one field. | n |
width, height, image_size, aspect_ratio, resolution | The shape is set by one field. | size |
size outside the list above (including exact sizes like 1024x1024) | Only the listed values are offered. | A listed value |
image_format | The output is always SVG. | — |
n outside 1–6, or random_seed outside its range | Out of range. | A value in range |
negative_prompt | Not supported by this model. | Describe what you want in prompt |
style, substyle, style_id, style_reference_urls, style_match | Styles are not available on this API. | — |
text_layout | Not supported by this model. | Put the text in prompt |
image, image_url | This API makes images from text only. | — |
Accepted, then the request fails
These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR" and an error that names the problem. Nothing is charged.
| Parameter | When the request fails |
|---|---|
controls | A color is not {"rgb": [r, g, b]} with 0–255 values, there are more than 10 colors, or controls has a key other than colors and background_color. |
prompt | The prompt or the result is blocked by the model's content filter. |
Accepted but ignored
Any other parameter (for example model or response_format) is dropped and has no effect: this endpoint always runs Recraft V4.1 Vector and returns a download URL.
Sizes
size takes one of 14 aspect ratios: 1:1, 2:1, 1:2, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 6:10, 14:10, 10:14, 16:9, 9:16. The output is an SVG file, which has no fixed pixel size and scales to any size without losing sharpness.
Measured at launch: a 1:1 request returned an SVG of 22,775 bytes with a viewBox of 0 0 2048 2048.
Timing
At launch a request took about 26 seconds from submit to COMPLETED. Polling the status endpoint every 5 seconds is enough, or use a Webhook.
Example Request
{
"prompt": "A flat vector logo of a mountain and a rising sun inside a circle, two colors, clean lines",
"size": "1:1"
}Example Response
{
"request_id": "recraft-v4-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/recraft-v4-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Request Headers
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal server error. |
Error Responses
A 400 names every rejected parameter in violations:
{
"error": "Invalid request parameters",
"message": "'size' must be one of: \"1:1\", \"2:1\", \"1:2\", \"3:2\", \"2:3\", \"4:3\", \"3:4\", \"5:4\", \"4:5\", \"6:10\", \"14:10\", \"10:14\", \"16:9\", \"9:16\" (got \"1024x1024\")",
"violations": [
"'size' must be one of: \"1:1\", \"2:1\", \"1:2\", \"3:2\", \"2:3\", \"4:3\", \"3:4\", \"5:4\", \"4:5\", \"6:10\", \"14:10\", \"10:14\", \"16:9\", \"9:16\" (got \"1024x1024\")"
]
}Retrieving Results
Poll the status endpoint with the request_id until status is COMPLETED or ERROR, then download each SVG file from output.media_url.
curl 'https://gateway.pixazo.ai/v2/requests/status/recraft-v4-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'Completed response
Captured from a real Recraft V4.1 Vector request at launch; the request id is masked.
{
"request_id": "recraft-v4-1_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "recraft-v4-1",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-flat-vector-logo-of-a-mountain-and-a-rising-sun--1795504819831-0.svg"
],
"media_type": "image/svg+xml"
},
"created_at": "2026-11-24T07:19:58.324Z",
"updated_at": "2026-11-24 07:20:21",
"completed_at": "2026-11-24 07:20:20"
}Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | One URL per SVG file (n in all). Download them and keep your own copies. |
| output.media_type | string | The MIME type: image/svg+xml. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status URL for this request (in the submit response). |
Status Values & Flow
QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.
Recraft V4.1 Standard API Pricing
Recraft V4.1 Flash API Documentation
https://gateway.pixazo.ai/recraft-v4-1-flash/v1/text-to-image
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Image - Recraft V4.1 Flash V2
Request Code
POST https://gateway.pixazo.ai/recraft-v4-1-flash/v1/text-to-image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "A breathtaking mountain landscape at golden hour with dramatic clouds, ultra-realistic photography style",
"size": "1344x768",
"n": 1
}
import requests
url = "https://gateway.pixazo.ai/recraft-v4-1-flash/v1/text-to-image"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "A breathtaking mountain landscape at golden hour with dramatic clouds, ultra-realistic photography style",
"size": "1344x768",
"n": 1
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/recraft-v4-1-flash/v1/text-to-image';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
prompt: 'A breathtaking mountain landscape at golden hour with dramatic clouds, ultra-realistic photography style',
size: '1344x768',
n: 1
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/recraft-v4-1-flash/v1/text-to-image" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "A breathtaking mountain landscape at golden hour with dramatic clouds, ultra-realistic photography style",
"size": "1344x768",
"n": 1
}'
Output
// When n=1 (default), output is a single string:
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp"
}
// When n>1, output is an array of strings:
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-1.webp"
]
}
Request Parameters - Text to Image
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | 1–10000 characters |
| Text description of the image you want to generate. Recraft V4.1 models accept prompts up to 10,000 characters. | ||||
size | No | string | — | 28 values1024x1024, 1536x768, 768x1536, 1280x832, 832x1280, 1216x896, 896x1216, 1152x896, 896x1152, 832x1344, 1280x896, 896x1280, 1344x768, 768x1344, 1:1, 2:1, 1:2, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 6:10, 14:10, 10:14, 16:9, 9:16 |
| Output image size, given either as exact pixel dimensions (WxH) or as an aspect ratio (w:h). Each aspect ratio maps to the Flash resolution listed next to it — for example 1:1 is 1024x1024, 16:9 is 1344x768 and 9:16 is 768x1344. When omitted, Recraft chooses the size, so pass size to control the aspect ratio. | ||||
n | No | integer | 1 | 1–6 |
| Number of images to generate. When n is 1 the response output field is a single image URL; when n is greater than 1 it is an array of image URLs. | ||||
controls | No | object | — | colors, background_color |
| Optional controls that tweak the generation process. Recraft V4.1 supports colors and background_color only (artistic_level and no_text apply to Recraft V3 models and are ignored here). | ||||
controls.colors | No | array of objects | — | items of the form {"rgb": [R, G, B], "weight": 0.0–1.0} |
| Preferred color palette. Each item requires rgb, an array of 3 integers in the range 0–255. The optional weight (0.0–1.0) sets that color's relative preference; the sum of all weights must not exceed 1.0. | ||||
controls.background_color | No | object | — | {"rgb": [R, G, B]} |
| Desired background color for the generated image, given as an rgb array of 3 integers in the range 0–255. | ||||
Example Request
{
"prompt": "A breathtaking mountain landscape at golden hour with dramatic clouds, ultra-realistic photography style",
"size": "1344x768",
"n": 1
}
Response
// When n=1 (default), output is a single string:
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp"
}
// When n>1, output is an array of strings:
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-1.webp"
]
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 200 | Success — image URL returned |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Insufficient Balance |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
| 502 | Bad Gateway — upstream failure |
Error Responses
Common error response shapes returned by the API.
400 Bad Request — Missing prompt
{
"error": "Missing required field: prompt"
}
403 Insufficient Balance
"The balance is insufficient to proceed with this operation."
502 Bad Gateway
{
"error": "Failed to reach upstream API",
"status": 502
}
Response Fields
| Field | Type | Description |
|---|---|---|
| output | string or array | URL(s) to the generated image(s). Returns a single string when n=1, or an array of strings when n>1. Each URL points to a .webp image hosted on Cloudflare R2. |
Notes
Recraft V4.1 Flash V2 does not support the style, style_id, or negative_prompt parameters — passing any of these results in a 400 Bad Request. Image generation typically takes a few seconds for a single image; multiple images take longer. The output field returns a single string URL when n=1, or an array of string URLs when n>1. Generated images are in .webp format hosted on Cloudflare R2.
Recraft V4.1 Flash API Pricing
Recraft Vectorize API Documentation
Convert a raster image (PNG, JPG or WEBP) into a scalable SVG: logos, icons and illustrations that stay sharp at any size. For cleaner SVGs with smooth curves, straight lines and sharp corners use Vectorize Pro at /recraft-vectorize/v1/vectorize-pro. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.
POST https://gateway.pixazo.ai/recraft-vectorize/v1/vectorizeAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Vectorize - Recraft Vectorize
Request Code
POST https://gateway.pixazo.ai/recraft-vectorize/v1/vectorize
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-friendly-cartoon-fox-mascot-waving-sticker-style-1795504810516-0.png"
}import requests
url = "https://gateway.pixazo.ai/recraft-vectorize/v1/vectorize"
headers = {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-friendly-cartoon-fox-mascot-waving-sticker-style-1795504810516-0.png"
}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())const res = await fetch("https://gateway.pixazo.ai/recraft-vectorize/v1/vectorize", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify({
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-friendly-cartoon-fox-mascot-waving-sticker-style-1795504810516-0.png"
})
});
console.log(await res.json());curl -X POST 'https://gateway.pixazo.ai/recraft-vectorize/v1/vectorize' \
-H 'Content-Type: application/json' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
--data-raw '{"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-friendly-cartoon-fox-mascot-waving-sticker-style-1795504810516-0.png"}'Output
{
"request_id": "recraft-vectorize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/recraft-vectorize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Webhook (Optional)
Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks). |
Callback Payload (success)
{
"request_id": "recraft-vectorize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "recraft-vectorize",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/vectorized-1795530040957-be5edd5c.svg"
],
"media_type": "image/svg+xml"
},
"created_at": "2026-11-24T14:20:30.520Z",
"updated_at": "2026-11-24 14:20:42",
"completed_at": "2026-11-24 14:20:41"
}Failure callback shape
{
"request_id": "recraft-vectorize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "recraft-vectorize",
"error": "Generation failed: the request was rejected (url does not point to a supported image (status 422)).",
"output": null,
"created_at": "2026-11-24T14:21:28.747Z",
"updated_at": "2026-11-24 14:21:35",
"completed_at": "2026-11-24 14:21:35"
}Callbacks are idempotent on request_id — de-duplicate on it. Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
image_url | Yesrequired | string | — | A public http(s) URL of a PNG, JPG or WEBP image, under 20 MB, up to 16 megapixels, each side 256 to 4,096 pixels |
| The raster image to convert, for example a logo, an icon or an illustration. | ||||
shape_stacking | No | string | hierarchical | hierarchical, cut_out |
How the shapes are layered in the SVG. hierarchical stacks shapes on top of each other; cut_out cuts each shape out of the ones below it, so no two shapes overlap (useful for cutting machines and laser engraving). | ||||
How usage is measured
Billed per request: one image in, one SVG out. This is the lower-priced vectorizer; /recraft-vectorize/v1/vectorize-pro costs more. The rates are in the pricing panel on this page. Nothing is charged for a request that fails.
Parameters not supported
Rejected with 400
Checked when you submit: the request is rejected before it is queued.
| Parameter | Why | Use instead |
|---|---|---|
version | The vectorizer is chosen by the endpoint. | /recraft-vectorize/v1/vectorize or /recraft-vectorize/v1/vectorize-pro |
file, image | Upload the image somewhere public and send its URL. | image_url |
shape_stacking outside the list above | Only the listed values are offered. | hierarchical or cut_out |
n, num_images, number_of_images, batch_size, count, num_outputs | Each request converts one image. | One request per image |
prompt | Vectorizing follows the image; there is nothing to describe. | — |
Accepted, then the request fails
These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR" and an error that names the problem. Nothing is charged.
| Parameter | When the request fails |
|---|---|
image_url | The image cannot be downloaded, is not a PNG, JPG or WEBP, is 20 MB or more, is over 16 megapixels, or has a side shorter than 256 or longer than 4,096 pixels. |
Accepted but ignored
Any other parameter is dropped and has no effect. The result is always an SVG file returned as a download URL.
Output
Every request returns one SVG file. SVG has no fixed pixel size and scales to any size without losing sharpness. Measured at launch: the example request returned an SVG of 14,600 bytes with a viewBox of 0 0 2048 2048.
Timing
At launch a request took about 12 seconds from submit to COMPLETED. Polling the status endpoint every 5 seconds is enough, or use a Webhook.
Example Request
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-friendly-cartoon-fox-mascot-waving-sticker-style-1795504810516-0.png"
}Example Response
{
"request_id": "recraft-vectorize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/recraft-vectorize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Request Headers
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal server error. |
Error Responses
A 400 names every rejected parameter in violations:
{
"error": "Invalid request parameters",
"message": "'image_url' is required",
"violations": [
"'image_url' is required"
]
}Retrieving Results
Poll the status endpoint with the request_id until status is COMPLETED or ERROR, then download the SVG file from output.media_url.
curl 'https://gateway.pixazo.ai/v2/requests/status/recraft-vectorize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'Completed response
Captured from a real Recraft Vectorize request at launch; the request id is masked.
{
"request_id": "recraft-vectorize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "recraft-vectorize",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/vectorized-1795530040957-be5edd5c.svg"
],
"media_type": "image/svg+xml"
},
"created_at": "2026-11-24T14:20:30.520Z",
"updated_at": "2026-11-24 14:20:42",
"completed_at": "2026-11-24 14:20:41"
}Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | The URL of the SVG (one per request). Download it and keep your own copy. |
| output.media_type | string | The MIME type: image/svg+xml. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status URL for this request (in the submit response). |
Status Values & Flow
QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.
Recraft Vectorize API Pricing
Recraft Vectorize API Documentation
Convert a raster image (PNG, JPG or WEBP) into a scalable SVG with Recraft's Vectorizer Pro: cleaner SVGs with smooth curves, straight lines and sharp corners, for logos, icons and illustrations. For the lower-priced vectorizer use /recraft-vectorize/v1/vectorize. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.
POST https://gateway.pixazo.ai/recraft-vectorize/v1/vectorize-proAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Vectorize Pro - Recraft Vectorize
Request Code
POST https://gateway.pixazo.ai/recraft-vectorize/v1/vectorize-pro
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-friendly-cartoon-fox-mascot-waving-sticker-style-1795504810516-0.png",
"shape_stacking": "cut_out"
}import requests
url = "https://gateway.pixazo.ai/recraft-vectorize/v1/vectorize-pro"
headers = {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-friendly-cartoon-fox-mascot-waving-sticker-style-1795504810516-0.png",
"shape_stacking": "cut_out"
}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())const res = await fetch("https://gateway.pixazo.ai/recraft-vectorize/v1/vectorize-pro", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify({
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-friendly-cartoon-fox-mascot-waving-sticker-style-1795504810516-0.png",
"shape_stacking": "cut_out"
})
});
console.log(await res.json());curl -X POST 'https://gateway.pixazo.ai/recraft-vectorize/v1/vectorize-pro' \
-H 'Content-Type: application/json' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
--data-raw '{"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-friendly-cartoon-fox-mascot-waving-sticker-style-1795504810516-0.png", "shape_stacking": "cut_out"}'Output
{
"request_id": "recraft-vectorize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/recraft-vectorize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Webhook (Optional)
Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks). |
Callback Payload (success)
{
"request_id": "recraft-vectorize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "recraft-vectorize",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/vectorized-pro-1795530050724-a7202f2f.svg"
],
"media_type": "image/svg+xml"
},
"created_at": "2026-11-24T14:20:35.738Z",
"updated_at": "2026-11-24 14:20:52",
"completed_at": "2026-11-24 14:20:52"
}Failure callback shape
{
"request_id": "recraft-vectorize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "recraft-vectorize",
"error": "Generation failed: the request was rejected (url does not point to a supported image (status 422)).",
"output": null,
"created_at": "2026-11-24T14:21:28.747Z",
"updated_at": "2026-11-24 14:21:35",
"completed_at": "2026-11-24 14:21:35"
}Callbacks are idempotent on request_id — de-duplicate on it. Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
image_url | Yesrequired | string | — | A public http(s) URL of a PNG, JPG or WEBP image, under 20 MB, up to 16 megapixels, each side 256 to 4,096 pixels |
| The raster image to convert, for example a logo, an icon or an illustration. | ||||
shape_stacking | No | string | hierarchical | hierarchical, cut_out |
How the shapes are layered in the SVG. hierarchical stacks shapes on top of each other; cut_out cuts each shape out of the ones below it, so no two shapes overlap (useful for cutting machines and laser engraving). | ||||
How usage is measured
Billed per request: one image in, one SVG out. Vectorize Pro costs more than /recraft-vectorize/v1/vectorize; the rates are in the pricing panel on this page. Nothing is charged for a request that fails.
Parameters not supported
Rejected with 400
Checked when you submit: the request is rejected before it is queued.
| Parameter | Why | Use instead |
|---|---|---|
version | The vectorizer is chosen by the endpoint. | /recraft-vectorize/v1/vectorize or /recraft-vectorize/v1/vectorize-pro |
file, image | Upload the image somewhere public and send its URL. | image_url |
shape_stacking outside the list above | Only the listed values are offered. | hierarchical or cut_out |
n, num_images, number_of_images, batch_size, count, num_outputs | Each request converts one image. | One request per image |
prompt | Vectorizing follows the image; there is nothing to describe. | — |
Accepted, then the request fails
These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR" and an error that names the problem. Nothing is charged.
| Parameter | When the request fails |
|---|---|
image_url | The image cannot be downloaded, is not a PNG, JPG or WEBP, is 20 MB or more, is over 16 megapixels, or has a side shorter than 256 or longer than 4,096 pixels. |
Accepted but ignored
Any other parameter is dropped and has no effect. The result is always an SVG file returned as a download URL.
Output
Every request returns one SVG file. SVG has no fixed pixel size and scales to any size without losing sharpness. Measured at launch: the example request returned an SVG of 44,062 bytes with a viewBox of 0 0 4358 4358.
Timing
At launch a request took about 15 seconds from submit to COMPLETED. Polling the status endpoint every 5 seconds is enough, or use a Webhook.
Example Request
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-friendly-cartoon-fox-mascot-waving-sticker-style-1795504810516-0.png",
"shape_stacking": "cut_out"
}Example Response
{
"request_id": "recraft-vectorize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/recraft-vectorize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Request Headers
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal server error. |
Error Responses
A 400 names every rejected parameter in violations:
{
"error": "Invalid request parameters",
"message": "'shape_stacking' must be one of: \"hierarchical\", \"cut_out\" (got \"flat\")",
"violations": [
"'shape_stacking' must be one of: \"hierarchical\", \"cut_out\" (got \"flat\")"
]
}Retrieving Results
Poll the status endpoint with the request_id until status is COMPLETED or ERROR, then download the SVG file from output.media_url.
curl 'https://gateway.pixazo.ai/v2/requests/status/recraft-vectorize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'Completed response
Captured from a real Recraft Vectorize request at launch; the request id is masked.
{
"request_id": "recraft-vectorize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "recraft-vectorize",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/vectorized-pro-1795530050724-a7202f2f.svg"
],
"media_type": "image/svg+xml"
},
"created_at": "2026-11-24T14:20:35.738Z",
"updated_at": "2026-11-24 14:20:52",
"completed_at": "2026-11-24 14:20:52"
}Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | The URL of the SVG (one per request). Download it and keep your own copy. |
| output.media_type | string | The MIME type: image/svg+xml. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status URL for this request (in the submit response). |
Status Values & Flow
QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.
Recraft Vectorize API Pricing
Recraft Crisp Upscale API Documentation
Make an image larger and sharper: Crisp Upscale raises the resolution and cleans up edges and fine detail, for web and print-ready visuals. Send a PNG, JPG or WEBP image; get back a larger WEBP (default) or PNG. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.
POST https://gateway.pixazo.ai/recraft-crisp-upscale/v1/upscaleAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Upscale - Recraft Crisp Upscale
Request Code
POST https://gateway.pixazo.ai/recraft-crisp-upscale/v1/upscale
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-friendly-cartoon-fox-mascot-waving-sticker-style-1795504810516-0.png"
}import requests
url = "https://gateway.pixazo.ai/recraft-crisp-upscale/v1/upscale"
headers = {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-friendly-cartoon-fox-mascot-waving-sticker-style-1795504810516-0.png"
}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())const res = await fetch("https://gateway.pixazo.ai/recraft-crisp-upscale/v1/upscale", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify({
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-friendly-cartoon-fox-mascot-waving-sticker-style-1795504810516-0.png"
})
});
console.log(await res.json());curl -X POST 'https://gateway.pixazo.ai/recraft-crisp-upscale/v1/upscale' \
-H 'Content-Type: application/json' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
--data-raw '{"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-friendly-cartoon-fox-mascot-waving-sticker-style-1795504810516-0.png"}'Output
{
"request_id": "recraft-crisp-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/recraft-crisp-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Webhook (Optional)
Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks). |
Callback Payload (success)
{
"request_id": "recraft-crisp-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "recraft-crisp-upscale",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/crisp-upscaled-1795596407507-958a4738.webp"
],
"media_type": "image/webp"
},
"created_at": "2026-11-25T08:46:41.476Z",
"updated_at": "2026-11-25 08:46:49",
"completed_at": "2026-11-25 08:46:48"
}Failure callback shape
{
"request_id": "recraft-crisp-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "recraft-crisp-upscale",
"error": "Generation failed: the request was rejected (url does not point to a supported image (status 422)).",
"output": null,
"created_at": "2026-11-25T08:47:16.557Z",
"updated_at": "2026-11-25 08:47:23",
"completed_at": "2026-11-25 08:47:23"
}Callbacks are idempotent on request_id — de-duplicate on it. Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
image_url | Yesrequired | string | — | A public http(s) URL of a PNG, JPG or WEBP image, under 20 MB, up to 16 megapixels, each side 32 to 4,096 pixels |
| The image to upscale. | ||||
image_format | No | string | webp | webp, png |
| The file format of the result (WEBP is lossless). | ||||
How usage is measured
Billed per request: one image in, one larger image out. The format does not change the price. The rate is in the pricing panel on this page. Nothing is charged for a request that fails.
Parameters not supported
Rejected with 400
Checked when you submit: the request is rejected before it is queued.
| Parameter | Why | Use instead |
|---|---|---|
n, num_images, number_of_images, batch_size, count, num_outputs | Each request upscales one image. | One request per image |
scale, upscale_factor, width, height, resolution, size | Crisp Upscale has no size option: it upscales by a fixed factor. | — |
image_format other than webp or png | Only the listed values are offered. | webp or png |
image, file | Upload the image somewhere public and send its URL. | image_url |
prompt | Upscaling follows the image; there is nothing to describe. | — |
response_format, zdr | Not offered: the result is always returned as a download URL. | — |
Accepted, then the request fails
These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR" and an error that names the problem. Nothing is charged.
| Parameter | When the request fails |
|---|---|
image_url | The URL is not a public http(s) URL (for example a data URI), the image cannot be downloaded, is not a PNG, JPG or WEBP, is 20 MB or more, is over 16 megapixels, or has a side shorter than 32 or longer than 4,096 pixels. |
Accepted but ignored
Any other parameter is dropped and has no effect.
Output
Every request returns one image, WEBP by default or PNG with image_format. Measured at launch: a 1024×1024 image came back as a WEBP of 4096×4096 pixels (4× on each side, 3,525,996 bytes).
Timing
At launch a request took about 7 seconds from submit to COMPLETED. Polling the status endpoint every 5 seconds is enough, or use a Webhook.
Example Request
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-friendly-cartoon-fox-mascot-waving-sticker-style-1795504810516-0.png"
}Example Response
{
"request_id": "recraft-crisp-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/recraft-crisp-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Request Headers
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal server error. |
Error Responses
A 400 names every rejected parameter in violations:
{
"error": "Invalid request parameters",
"message": "'image_format' must be one of: \"webp\", \"png\" (got \"gif\")",
"violations": [
"'image_format' must be one of: \"webp\", \"png\" (got \"gif\")"
]
}Retrieving Results
Poll the status endpoint with the request_id until status is COMPLETED or ERROR, then download the image from output.media_url.
curl 'https://gateway.pixazo.ai/v2/requests/status/recraft-crisp-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'Completed response
Captured from a real Recraft Crisp Upscale request at launch; the request id is masked.
{
"request_id": "recraft-crisp-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "recraft-crisp-upscale",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/crisp-upscaled-1795596407507-958a4738.webp"
],
"media_type": "image/webp"
},
"created_at": "2026-11-25T08:46:41.476Z",
"updated_at": "2026-11-25 08:46:49",
"completed_at": "2026-11-25 08:46:48"
}Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | The URL of the upscaled image (one per request). Download it and keep your own copy. |
| output.media_type | string | The MIME type: image/webp or image/png. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status URL for this request (in the submit response). |
Status Values & Flow
QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.
Recraft Crisp Upscale API Pricing
Recraft V4 Styles API Documentation
https://gateway.pixazo.ai/recraft-v4-styles/v1/create-style
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Create Style - Recraft V4 Styles
Request Code
POST https://gateway.pixazo.ai/recraft-v4-styles/v1/create-style
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"image_urls": ["https://example.com/reference-1.png"]
}
import requests
url = "https://gateway.pixazo.ai/recraft-v4-styles/v1/create-style"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"image_urls": ["https://example.com/reference-1.png"]
}
response = requests.post(url, json=data, headers=headers)
response.raise_for_status()
result = response.json()
print(result)
const url = 'https://gateway.pixazo.ai/recraft-v4-styles/v1/create-style';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
"image_urls": ["https://example.com/reference-1.png"]
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/recraft-v4-styles/v1/create-style" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"image_urls": ["https://example.com/reference-1.png"]
}'
Output
{
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"style": "any",
"creation_time": "2026-08-31T09:12:44Z",
"is_private": true,
"credits": 5
}
Request Parameters - Create Style
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
image_urls | Yesrequired | array of strings (URL) | — | 1–10 publicly reachable image URLs |
| Reference images the style is learned from. PNG, JPG or WEBP; under 10 MB each and 64 MB in total. The URLs are fetched server-side, so they must be reachable without authentication. | ||||
match | No | string | "precise" | "precise", "flexible" |
How closely generations follow the reference images. "precise" sticks tightly to the references; "flexible" allows more variation. "regular" exists on the Recraft V2/V3 models only and is rejected here with a 400. | ||||
image_weights | No | array of numbers | — | exactly one number per image_urls entry |
Relative influence of each reference image, in the same order as image_urls. The two arrays must be the same length or the request is rejected with a 400 before anything is charged. | ||||
prompt | No | string | — | any text |
Optional text hint describing the style, for example flat editorial illustration, muted palette. It describes the style, not an image to generate. | ||||
private | No | boolean | — | true, false |
| Whether the created style is kept private. Omit to accept the provider default. | ||||
Reference Image Requirements
Limits that apply to every URL in image_urls.
| Requirement | Value |
|---|---|
| Accepted formats | PNG, JPG, WEBP |
| Number of images | 1 to 10 per style |
| Maximum size per image | under 10 MB |
| Maximum size for all images combined | 64 MB |
| Reachability | Public HTTPS URLs. They are fetched server-side, so signed, expiring or login-protected URLs fail. |
Example Request
{
"image_urls": ["https://example.com/reference-1.png"]
}
Every parameter
{
"image_urls": [
"https://example.com/reference-1.png",
"https://example.com/reference-2.png"
],
"match": "flexible",
"image_weights": [1.0, 0.6],
"prompt": "flat editorial illustration, muted palette",
"private": true
}
Response
{
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"style": "any",
"creation_time": "2026-08-31T09:12:44Z",
"is_private": true,
"credits": 5
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Pricing — Create Style
Create Style is charged a flat rate per request. The number of reference images (1 to 10) does not change the price, and n is not a parameter on this endpoint.
| Request | How it is charged | Total |
|---|---|---|
| Any Create Style request, 1 reference image | 1 × $0.0055 | $0.0055 |
| Any Create Style request, 10 reference images | 1 × $0.0055 | $0.0055 |
Save the style_id you get back. Passing it as style_id on Text to Image means you never pay for style creation again. Generating with style_reference_urls instead re-creates a style, and re-charges for it, on every call.
Response Handling
Common status codes for Recraft V4 Styles Create Style.
| Code | Meaning |
|---|---|
| 200 | Success — the finished result is in this response |
| 400 | Bad Request — rejected before reaching the provider, nothing charged |
| 401 | Unauthorized — missing or invalid subscription key |
| 403 | Insufficient Balance |
| 405 | Method Not Allowed — this endpoint accepts POST only |
| 422 | Unprocessable — the provider rejected the request, its message is passed through |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
| 502 | Bad Gateway — the provider could not be reached or returned something unusable |
| 503 | Service Unavailable — the provider is temporarily unavailable, retry shortly |
Error Responses
Validation runs before the request reaches the provider, so a 400 from this endpoint never costs you anything.
400 Bad Request — image_urls missing or out of range
{
"error": "image_urls must be an array of 1 to 10 image URL strings.",
"status": 400
}
400 Bad Request — image_weights does not line up with image_urls
{
"error": "image_weights must contain exactly one weight per image_urls entry (image_urls: 2, image_weights: 1).",
"status": 400
}
400 Bad Request — unsupported match value
{
"error": "match must be one of: precise, flexible. \"regular\" is not supported by the Recraft V4 Styles models.",
"status": 400
}
4xx — rejected by the provider
{
"error": "The prompt could not be understood",
"status": 422,
"code": "invalid_prompt"
}
403 Insufficient Balance
"The balance is insufficient to proceed with this operation."
503 Service Unavailable — provider temporarily unavailable
{
"error": "Image provider temporarily unavailable, please retry shortly",
"status": 503
}
A 503 means the provider is down, rate-limited or out of capacity. It is not a problem with your request and retrying shortly is the right response.
Response Fields
| Field | Type | Description |
|---|---|---|
style_id | string (uuid) | The identifier of the style you just created. Save this. Pass it as style_id on Text to Image to apply this style without paying for style creation again. This is a raster style — for vector output use /v1/create-style-vector. |
id | string (uuid) | The same value as style_id, kept for clients written against the provider's own response shape. |
style | string | The style family the provider assigned, one of any, digital_illustration, icon, realistic_image, vector_illustration, logo_raster. |
creation_time | string (ISO 8601) | When the style was created. |
is_private | boolean | Whether the style is private. |
credits | integer | Provider credits consumed upstream. Informational only — your wallet is charged at the rate shown in Pricing, not in provider credits. |
Notes
The model is fixed by the endpoint you call. Any model key in your request body is dropped before the request is forwarded, so a request is always billed for the model it actually runs on. This endpoint responds synchronously — there is no queue and nothing to poll; the response carries the finished style. n is not accepted here: style creation is billed per request. A style created on this endpoint is a raster style, for Text to Image. Text to Vector rejects it with 400 invalid_image_type; use /v1/create-style-vector instead.
Recraft V4 Styles API Pricing
Every Recraft V4 Styles capability is priced below. Create Style is what a GENERATION request is charged on top of its per-image rate when it attaches style_reference_urls instead of a style_id. This endpoint itself takes image_urls.
| Capability | Version | Price (USD) |
|---|---|---|
| Text to Image | text-to-image | $0.0385 |
| Text to Image Pro | text-to-image-pro | $0.11 |
| Text to Vector | text-to-vector | $0.055 |
| Text to Vector Pro | text-to-vector-pro | $0.132 |
| Create Style | create-style | $0.0055 |
| Create Style Pro | create-style-pro | $0.0055 |
| Create Style Vector | create-style-vector | $0.0055 |
| Create Style Pro Vector | create-style-pro-vector | $0.0055 |
Recraft V4 Styles API Documentation
https://gateway.pixazo.ai/recraft-v4-styles/v1/create-style-pro
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Create Style Pro - Recraft V4 Styles Pro
Request Code
POST https://gateway.pixazo.ai/recraft-v4-styles/v1/create-style-pro
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"image_urls": ["https://example.com/reference-1.png"]
}
import requests
url = "https://gateway.pixazo.ai/recraft-v4-styles/v1/create-style-pro"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"image_urls": ["https://example.com/reference-1.png"]
}
response = requests.post(url, json=data, headers=headers)
response.raise_for_status()
result = response.json()
print(result)
const url = 'https://gateway.pixazo.ai/recraft-v4-styles/v1/create-style-pro';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
"image_urls": ["https://example.com/reference-1.png"]
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/recraft-v4-styles/v1/create-style-pro" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"image_urls": ["https://example.com/reference-1.png"]
}'
Output
{
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"style": "any",
"creation_time": "2026-08-31T09:12:44Z",
"is_private": true,
"credits": 5
}
Request Parameters - Create Style Pro
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
image_urls | Yesrequired | array of strings (URL) | — | 1–10 publicly reachable image URLs |
| Reference images the style is learned from. PNG, JPG or WEBP; under 10 MB each and 64 MB in total. The URLs are fetched server-side, so they must be reachable without authentication. | ||||
match | No | string | "precise" | "precise", "flexible" |
How closely generations follow the reference images. "precise" sticks tightly to the references; "flexible" allows more variation. "regular" exists on the Recraft V2/V3 models only and is rejected here with a 400. | ||||
image_weights | No | array of numbers | — | exactly one number per image_urls entry |
Relative influence of each reference image, in the same order as image_urls. The two arrays must be the same length or the request is rejected with a 400 before anything is charged. | ||||
prompt | No | string | — | any text |
Optional text hint describing the style, for example flat editorial illustration, muted palette. It describes the style, not an image to generate. | ||||
private | No | boolean | — | true, false |
| Whether the created style is kept private. Omit to accept the provider default. | ||||
Reference Image Requirements
Limits that apply to every URL in image_urls.
| Requirement | Value |
|---|---|
| Accepted formats | PNG, JPG, WEBP |
| Number of images | 1 to 10 per style |
| Maximum size per image | under 10 MB |
| Maximum size for all images combined | 64 MB |
| Reachability | Public HTTPS URLs. They are fetched server-side, so signed, expiring or login-protected URLs fail. |
Example Request
{
"image_urls": ["https://example.com/reference-1.png"]
}
Every parameter
{
"image_urls": [
"https://example.com/reference-1.png",
"https://example.com/reference-2.png"
],
"match": "flexible",
"image_weights": [1.0, 0.6],
"prompt": "flat editorial illustration, muted palette",
"private": true
}
Response
{
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"style": "any",
"creation_time": "2026-08-31T09:12:44Z",
"is_private": true,
"credits": 5
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Pricing — Create Style Pro
Create Style Pro is charged a flat rate per request. The number of reference images (1 to 10) does not change the price, and n is not a parameter on this endpoint.
| Request | How it is charged | Total |
|---|---|---|
| Any Create Style Pro request, 1 reference image | 1 × $0.0055 | $0.0055 |
| Any Create Style Pro request, 10 reference images | 1 × $0.0055 | $0.0055 |
Save the style_id you get back. Passing it as style_id on Text to Image Pro means you never pay for style creation again. Generating with style_reference_urls instead re-creates a style, and re-charges for it, on every call.
Response Handling
Common status codes for Recraft V4 Styles Pro Create Style Pro.
| Code | Meaning |
|---|---|
| 200 | Success — the finished result is in this response |
| 400 | Bad Request — rejected before reaching the provider, nothing charged |
| 401 | Unauthorized — missing or invalid subscription key |
| 403 | Insufficient Balance |
| 405 | Method Not Allowed — this endpoint accepts POST only |
| 422 | Unprocessable — the provider rejected the request, its message is passed through |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
| 502 | Bad Gateway — the provider could not be reached or returned something unusable |
| 503 | Service Unavailable — the provider is temporarily unavailable, retry shortly |
Error Responses
Validation runs before the request reaches the provider, so a 400 from this endpoint never costs you anything.
400 Bad Request — image_urls missing or out of range
{
"error": "image_urls must be an array of 1 to 10 image URL strings.",
"status": 400
}
400 Bad Request — image_weights does not line up with image_urls
{
"error": "image_weights must contain exactly one weight per image_urls entry (image_urls: 2, image_weights: 1).",
"status": 400
}
400 Bad Request — unsupported match value
{
"error": "match must be one of: precise, flexible. \"regular\" is not supported by the Recraft V4 Styles models.",
"status": 400
}
4xx — rejected by the provider
{
"error": "The prompt could not be understood",
"status": 422,
"code": "invalid_prompt"
}
403 Insufficient Balance
"The balance is insufficient to proceed with this operation."
503 Service Unavailable — provider temporarily unavailable
{
"error": "Image provider temporarily unavailable, please retry shortly",
"status": 503
}
A 503 means the provider is down, rate-limited or out of capacity. It is not a problem with your request and retrying shortly is the right response.
Response Fields
| Field | Type | Description |
|---|---|---|
style_id | string (uuid) | The identifier of the style you just created. Save this. Pass it as style_id on Text to Image Pro to apply this style without paying for style creation again. This is a raster style — for vector output use /v1/create-style-pro-vector. |
id | string (uuid) | The same value as style_id, kept for clients written against the provider's own response shape. |
style | string | The style family the provider assigned, one of any, digital_illustration, icon, realistic_image, vector_illustration, logo_raster. |
creation_time | string (ISO 8601) | When the style was created. |
is_private | boolean | Whether the style is private. |
credits | integer | Provider credits consumed upstream. Informational only — your wallet is charged at the rate shown in Pricing, not in provider credits. |
Notes
The model is fixed by the endpoint you call. Any model key in your request body is dropped before the request is forwarded, so a request is always billed for the model it actually runs on. This endpoint responds synchronously — there is no queue and nothing to poll; the response carries the finished style. n is not accepted here: style creation is billed per request. A style created on this endpoint is a raster style, for Text to Image Pro. Text to Vector Pro rejects it with 400 invalid_image_type; use /v1/create-style-pro-vector instead.
Recraft V4 Styles API Pricing
Every Recraft V4 Styles capability is priced below. Create Style Pro is what a GENERATION request is charged on top of its per-image rate when it attaches style_reference_urls instead of a style_id. This endpoint itself takes image_urls.
| Capability | Version | Price (USD) |
|---|---|---|
| Text to Image | text-to-image | $0.0385 |
| Text to Image Pro | text-to-image-pro | $0.11 |
| Text to Vector | text-to-vector | $0.055 |
| Text to Vector Pro | text-to-vector-pro | $0.132 |
| Create Style | create-style | $0.0055 |
| Create Style Pro | create-style-pro | $0.0055 |
| Create Style Vector | create-style-vector | $0.0055 |
| Create Style Pro Vector | create-style-pro-vector | $0.0055 |
Recraft V4 Styles API Documentation
https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-image
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Image - Recraft V4 Styles
Request Code
POST https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "a red cat on a windowsill, morning light",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
}
import requests
url = "https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-image"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "a red cat on a windowsill, morning light",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
}
response = requests.post(url, json=data, headers=headers)
response.raise_for_status()
result = response.json()
print(result)
const url = 'https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-image';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
"prompt": "a red cat on a windowsill, morning light",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-image" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "a red cat on a windowsill, morning light",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
}'
Output
// n = 1 (the default): output is a single URL string
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-on-a-windowsill-morning-light-1756630000000-0.png",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"credits": 35
}
// n = 2: output is an array of URL strings
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-on-a-windowsill-morning-light-1756630000000-0.png",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-on-a-windowsill-morning-light-1756630000000-1.png"
],
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"credits": 70
}
Choosing a Style — style_id or style_reference_urls
Every generation needs exactly one style source. This is checked before the request leaves the gateway, so a malformed call costs you nothing.
| What you send | Result |
|---|---|
style_id only | Accepted — the saved style is applied. No style-creation charge. |
style_reference_urls only | Accepted — a style is built from the references and applied. Adds one Create Style charge, and the new style_id is returned. |
| Both | 400 Bad Request — they are mutually exclusive. |
| Neither | 400 Bad Request — one of the two is required. |
Request Parameters - Text to Image
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | any non-empty text |
| Description of the image you want to generate. | ||||
style_id | Conditional | string (uuid) | — | a style_id returned by /v1/create-style |
Reuse a style you already created. Exactly one of style_id or style_reference_urls is required — sending both, or neither, is a 400. Using style_id adds no style-creation charge. | ||||
style_reference_urls | Conditional | array of strings (URL) | — | 1–10 publicly reachable image URLs |
Build a style from reference images as part of this request. Exactly one of style_id or style_reference_urls is required. Using this adds one Create Style charge to this request (see Pricing below); the new style_id comes back in the response so you never have to pay it twice. | ||||
style_match | No | string | "precise" | "precise", "flexible" |
How closely the output follows the style. "regular" exists on the Recraft V2/V3 models only and is rejected here with a 400. | ||||
size | No | string | — | 56 values1024x1024, 1365x1024, 1024x1365, 1536x1024, 1024x1536, 1820x1024, 1024x1820, 1024x2048, 2048x1024, 1434x1024, 1024x1434, 1024x1280, 1280x1024, 1024x1707, 1707x1024, 1216x896, 896x1216, 1280x832, 832x1280, 1152x896, 896x1152, 1280x896, 896x1280, 832x1344, 768x1344, 1344x768, 768x1536, 1536x768, 2048x2048, 2432x1792, 1792x2432, 2560x1664, 1664x2560, 2304x1792, 1792x2304, 2560x1792, 1792x2560, 1664x2688, 1536x2688, 2688x1536, 1536x3072, 3072x1536, 1:1, 2:1, 1:2, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 6:10, 14:10, 10:14, 16:9, 9:16 |
| Output dimensions as exact pixels (WxH) or as an aspect ratio (w:h). Omit to let the provider choose for this model. | ||||
n | No | integer | 1 | 1–6 |
Number of images to generate. With n=1 the output field is a single URL string; with n greater than 1 it is an array of URL strings. Each image is charged, so n images cost n times the per-image rate. | ||||
negative_prompt | No | string | — | any text |
Description of what to keep out of the result, for example dark, blurry, low quality. | ||||
random_seed | No | integer | — | 0–4294967295 |
| Seed for reproducible output. The same seed with the same prompt, style and size returns the same result. | ||||
image_format | No | string | — | "webp", "png" |
| File format of the generated raster image. | ||||
response_format | No | string | — | "url", "b64_json" |
Format the provider returns internally. Either way the gateway stores the result and the output field you receive is always a hosted URL — you never have to decode base64. | ||||
Reference Image Requirements
Limits that apply to every URL in style_reference_urls.
| Requirement | Value |
|---|---|
| Accepted formats | PNG, JPG, WEBP |
| Number of images | 1 to 10 per style |
| Maximum size per image | under 10 MB |
| Maximum size for all images combined | 64 MB |
| Reachability | Public HTTPS URLs. They are fetched server-side, so signed, expiring or login-protected URLs fail. |
Example Request
{
"prompt": "a red cat on a windowsill, morning light",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
}
Every parameter
{
"prompt": "a red cat on a windowsill, morning light",
"style_reference_urls": [
"https://example.com/reference-1.png",
"https://example.com/reference-2.png"
],
"style_match": "flexible",
"size": "1280x1024",
"n": 4,
"negative_prompt": "dark, blurry, low quality",
"random_seed": 12345,
"image_format": "png",
"response_format": "url"
}
Response
// n = 1 (the default): output is a single URL string
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-on-a-windowsill-morning-light-1756630000000-0.png",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"credits": 35
}
// n = 2: output is an array of URL strings
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-on-a-windowsill-morning-light-1756630000000-0.png",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-on-a-windowsill-morning-light-1756630000000-1.png"
],
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"credits": 70
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Pricing — Text to Image
Generation is charged per image: n images cost n times the per-image rate.
There is one surcharge, and it is easy to avoid. Sending style_reference_urls makes the provider build a style as part of this request, which adds one Create Style charge ($0.0055) on top — once per request, never multiplied by n. Sending a saved style_id adds nothing.
| Request | How it is charged | Total |
|---|---|---|
n = 1 with style_id | 1 × $0.0385 | $0.0385 |
n = 1 with style_reference_urls | 1 × $0.0385 + $0.0055 | $0.0440 |
n = 6 with style_id | 6 × $0.0385 | $0.2310 |
n = 6 with style_reference_urls | 6 × $0.0385 + $0.0055 | $0.2365 |
Every response carries style_id, including when the style was created implicitly from style_reference_urls. Save it and send it as style_id next time to drop the surcharge permanently.
Rates shown are the published rates for this endpoint at the time of writing; the pricing panel on this page is authoritative.
Response Handling
Common status codes for Recraft V4 Styles Text to Image.
| Code | Meaning |
|---|---|
| 200 | Success — the finished result is in this response |
| 400 | Bad Request — rejected before reaching the provider, nothing charged |
| 401 | Unauthorized — missing or invalid subscription key |
| 403 | Insufficient Balance |
| 405 | Method Not Allowed — this endpoint accepts POST only |
| 422 | Unprocessable — the provider rejected the request, its message is passed through |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
| 502 | Bad Gateway — the provider could not be reached or returned something unusable |
| 503 | Service Unavailable — the provider is temporarily unavailable, retry shortly |
Error Responses
Validation runs before the request reaches the provider, so a 400 from this endpoint never costs you anything.
400 Bad Request — no style source
{
"error": "Exactly one of style_id or style_reference_urls is required. Send style_id to reuse a style you already created, or style_reference_urls (1 to 10 image URLs) to build one from reference images.",
"status": 400
}
400 Bad Request — both style sources
{
"error": "style_id and style_reference_urls are mutually exclusive - send exactly one of them, not both.",
"status": 400
}
400 Bad Request — missing prompt
{
"error": "prompt is required and must be a non-empty string.",
"status": 400
}
400 Bad Request — n out of range
{
"error": "n must not be greater than 6 (received 7).",
"status": 400
}
400 Bad Request — unsupported style_match value
{
"error": "style_match must be one of: precise, flexible. \"regular\" is not supported by the Recraft V4 Styles models.",
"status": 400
}
4xx — rejected by the provider
{
"error": "The prompt could not be understood",
"status": 422,
"code": "invalid_prompt"
}
403 Insufficient Balance
"The balance is insufficient to proceed with this operation."
503 Service Unavailable — provider temporarily unavailable
{
"error": "Image provider temporarily unavailable, please retry shortly",
"status": 503
}
A 503 means the provider is down, rate-limited or out of capacity. It is not a problem with your request and retrying shortly is the right response.
Response Fields
| Field | Type | Description |
|---|---|---|
output | string or array of strings | URL(s) of the generated image. A single string when n=1, an array of strings when n is greater than 1. Files are hosted on Cloudflare R2 as .png or .webp. |
style_id | string (uuid) | The style used for this generation — the one you passed in, or the one created from style_reference_urls. Save it and send it as style_id next time to avoid paying the Create Style charge again. |
credits | integer | Provider credits consumed upstream. Informational only — your wallet is charged at the rates shown in Pricing, not in provider credits. |
Notes
The model is fixed by the endpoint you call. Any model key in your request body is dropped before the request is forwarded, so a request is always billed for the model it actually runs on. This endpoint responds synchronously — there is no queue and nothing to poll; the response carries the finished result. Generation typically takes 20–60 seconds; larger n or larger sizes take longer.
Recraft V4 Styles API Pricing
Every Recraft V4 Styles capability is priced below. Attaching style_reference_urls to a generation also creates a style, adding the one-time Create Style charge to that request; passing a style_id you already created does not.
| Capability | Version | Price (USD) |
|---|---|---|
| Text to Image | text-to-image | $0.0385 |
| Text to Image Pro | text-to-image-pro | $0.11 |
| Text to Vector | text-to-vector | $0.055 |
| Text to Vector Pro | text-to-vector-pro | $0.132 |
| Create Style | create-style | $0.0055 |
| Create Style Pro | create-style-pro | $0.0055 |
| Create Style Vector | create-style-vector | $0.0055 |
| Create Style Pro Vector | create-style-pro-vector | $0.0055 |
Recraft V4 Styles API Documentation
https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-image-pro
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Image Pro - Recraft V4 Styles Pro
Request Code
POST https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-image-pro
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "a red cat on a windowsill, morning light",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
}
import requests
url = "https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-image-pro"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "a red cat on a windowsill, morning light",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
}
response = requests.post(url, json=data, headers=headers)
response.raise_for_status()
result = response.json()
print(result)
const url = 'https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-image-pro';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
"prompt": "a red cat on a windowsill, morning light",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-image-pro" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "a red cat on a windowsill, morning light",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
}'
Output
// n = 1 (the default): output is a single URL string
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-on-a-windowsill-morning-light-1756630000000-0.png",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"credits": 100
}
// n = 2: output is an array of URL strings
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-on-a-windowsill-morning-light-1756630000000-0.png",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-on-a-windowsill-morning-light-1756630000000-1.png"
],
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"credits": 200
}
Choosing a Style — style_id or style_reference_urls
Every generation needs exactly one style source. This is checked before the request leaves the gateway, so a malformed call costs you nothing.
| What you send | Result |
|---|---|
style_id only | Accepted — the saved style is applied. No style-creation charge. |
style_reference_urls only | Accepted — a style is built from the references and applied. Adds one Create Style Pro charge, and the new style_id is returned. |
| Both | 400 Bad Request — they are mutually exclusive. |
| Neither | 400 Bad Request — one of the two is required. |
Request Parameters - Text to Image Pro
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | any non-empty text |
| Description of the image you want to generate. | ||||
style_id | Conditional | string (uuid) | — | a style_id returned by /v1/create-style-pro |
Reuse a style you already created. Exactly one of style_id or style_reference_urls is required — sending both, or neither, is a 400. Using style_id adds no style-creation charge. | ||||
style_reference_urls | Conditional | array of strings (URL) | — | 1–10 publicly reachable image URLs |
Build a style from reference images as part of this request. Exactly one of style_id or style_reference_urls is required. Using this adds one Create Style Pro charge to this request (see Pricing below); the new style_id comes back in the response so you never have to pay it twice. | ||||
style_match | No | string | "precise" | "precise", "flexible" |
How closely the output follows the style. "regular" exists on the Recraft V2/V3 models only and is rejected here with a 400. | ||||
size | No | string | — | 56 values1024x1024, 1365x1024, 1024x1365, 1536x1024, 1024x1536, 1820x1024, 1024x1820, 1024x2048, 2048x1024, 1434x1024, 1024x1434, 1024x1280, 1280x1024, 1024x1707, 1707x1024, 1216x896, 896x1216, 1280x832, 832x1280, 1152x896, 896x1152, 1280x896, 896x1280, 832x1344, 768x1344, 1344x768, 768x1536, 1536x768, 2048x2048, 2432x1792, 1792x2432, 2560x1664, 1664x2560, 2304x1792, 1792x2304, 2560x1792, 1792x2560, 1664x2688, 1536x2688, 2688x1536, 1536x3072, 3072x1536, 1:1, 2:1, 1:2, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 6:10, 14:10, 10:14, 16:9, 9:16 |
| Output dimensions as exact pixels (WxH) or as an aspect ratio (w:h). Omit to let the provider choose for this model. | ||||
n | No | integer | 1 | 1–6 |
Number of images to generate. With n=1 the output field is a single URL string; with n greater than 1 it is an array of URL strings. Each image is charged, so n images cost n times the per-image rate. | ||||
negative_prompt | No | string | — | any text |
Description of what to keep out of the result, for example dark, blurry, low quality. | ||||
random_seed | No | integer | — | 0–4294967295 |
| Seed for reproducible output. The same seed with the same prompt, style and size returns the same result. | ||||
image_format | No | string | — | "webp", "png" |
| File format of the generated raster image. | ||||
response_format | No | string | — | "url", "b64_json" |
Format the provider returns internally. Either way the gateway stores the result and the output field you receive is always a hosted URL — you never have to decode base64. | ||||
Reference Image Requirements
Limits that apply to every URL in style_reference_urls.
| Requirement | Value |
|---|---|
| Accepted formats | PNG, JPG, WEBP |
| Number of images | 1 to 10 per style |
| Maximum size per image | under 10 MB |
| Maximum size for all images combined | 64 MB |
| Reachability | Public HTTPS URLs. They are fetched server-side, so signed, expiring or login-protected URLs fail. |
Example Request
{
"prompt": "a red cat on a windowsill, morning light",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
}
Every parameter
{
"prompt": "a red cat on a windowsill, morning light",
"style_reference_urls": [
"https://example.com/reference-1.png",
"https://example.com/reference-2.png"
],
"style_match": "flexible",
"size": "2048x2048",
"n": 4,
"negative_prompt": "dark, blurry, low quality",
"random_seed": 12345,
"image_format": "png",
"response_format": "url"
}
Response
// n = 1 (the default): output is a single URL string
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-on-a-windowsill-morning-light-1756630000000-0.png",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"credits": 100
}
// n = 2: output is an array of URL strings
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-on-a-windowsill-morning-light-1756630000000-0.png",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-on-a-windowsill-morning-light-1756630000000-1.png"
],
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"credits": 200
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Pricing — Text to Image Pro
Generation is charged per image: n images cost n times the per-image rate.
There is one surcharge, and it is easy to avoid. Sending style_reference_urls makes the provider build a style as part of this request, which adds one Create Style Pro charge ($0.0055) on top — once per request, never multiplied by n. Sending a saved style_id adds nothing.
| Request | How it is charged | Total |
|---|---|---|
n = 1 with style_id | 1 × $0.1100 | $0.1100 |
n = 1 with style_reference_urls | 1 × $0.1100 + $0.0055 | $0.1155 |
n = 6 with style_id | 6 × $0.1100 | $0.6600 |
n = 6 with style_reference_urls | 6 × $0.1100 + $0.0055 | $0.6655 |
Every response carries style_id, including when the style was created implicitly from style_reference_urls. Save it and send it as style_id next time to drop the surcharge permanently.
Rates shown are the published rates for this endpoint at the time of writing; the pricing panel on this page is authoritative.
Response Handling
Common status codes for Recraft V4 Styles Pro Text to Image Pro.
| Code | Meaning |
|---|---|
| 200 | Success — the finished result is in this response |
| 400 | Bad Request — rejected before reaching the provider, nothing charged |
| 401 | Unauthorized — missing or invalid subscription key |
| 403 | Insufficient Balance |
| 405 | Method Not Allowed — this endpoint accepts POST only |
| 422 | Unprocessable — the provider rejected the request, its message is passed through |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
| 502 | Bad Gateway — the provider could not be reached or returned something unusable |
| 503 | Service Unavailable — the provider is temporarily unavailable, retry shortly |
Error Responses
Validation runs before the request reaches the provider, so a 400 from this endpoint never costs you anything.
400 Bad Request — no style source
{
"error": "Exactly one of style_id or style_reference_urls is required. Send style_id to reuse a style you already created, or style_reference_urls (1 to 10 image URLs) to build one from reference images.",
"status": 400
}
400 Bad Request — both style sources
{
"error": "style_id and style_reference_urls are mutually exclusive - send exactly one of them, not both.",
"status": 400
}
400 Bad Request — missing prompt
{
"error": "prompt is required and must be a non-empty string.",
"status": 400
}
400 Bad Request — n out of range
{
"error": "n must not be greater than 6 (received 7).",
"status": 400
}
400 Bad Request — unsupported style_match value
{
"error": "style_match must be one of: precise, flexible. \"regular\" is not supported by the Recraft V4 Styles models.",
"status": 400
}
4xx — rejected by the provider
{
"error": "The prompt could not be understood",
"status": 422,
"code": "invalid_prompt"
}
403 Insufficient Balance
"The balance is insufficient to proceed with this operation."
503 Service Unavailable — provider temporarily unavailable
{
"error": "Image provider temporarily unavailable, please retry shortly",
"status": 503
}
A 503 means the provider is down, rate-limited or out of capacity. It is not a problem with your request and retrying shortly is the right response.
Response Fields
| Field | Type | Description |
|---|---|---|
output | string or array of strings | URL(s) of the generated image. A single string when n=1, an array of strings when n is greater than 1. Files are hosted on Cloudflare R2 as .png or .webp. |
style_id | string (uuid) | The style used for this generation — the one you passed in, or the one created from style_reference_urls. Save it and send it as style_id next time to avoid paying the Create Style Pro charge again. |
credits | integer | Provider credits consumed upstream. Informational only — your wallet is charged at the rates shown in Pricing, not in provider credits. |
Notes
The model is fixed by the endpoint you call. Any model key in your request body is dropped before the request is forwarded, so a request is always billed for the model it actually runs on. This endpoint responds synchronously — there is no queue and nothing to poll; the response carries the finished result. Generation typically takes 20–60 seconds; larger n or larger sizes take longer.
Recraft V4 Styles API Pricing
Every Recraft V4 Styles capability is priced below. Attaching style_reference_urls to a generation also creates a style, adding the one-time Create Style Pro charge to that request; passing a style_id you already created does not.
| Capability | Version | Price (USD) |
|---|---|---|
| Text to Image | text-to-image | $0.0385 |
| Text to Image Pro | text-to-image-pro | $0.11 |
| Text to Vector | text-to-vector | $0.055 |
| Text to Vector Pro | text-to-vector-pro | $0.132 |
| Create Style | create-style | $0.0055 |
| Create Style Pro | create-style-pro | $0.0055 |
| Create Style Vector | create-style-vector | $0.0055 |
| Create Style Pro Vector | create-style-pro-vector | $0.0055 |
Recraft V4 Styles API Documentation
https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-vector
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Vector - Recraft V4 Styles Vector
Request Code
POST https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-vector
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "a minimal fox logo",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
}
import requests
url = "https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-vector"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "a minimal fox logo",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
}
response = requests.post(url, json=data, headers=headers)
response.raise_for_status()
result = response.json()
print(result)
const url = 'https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-vector';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
"prompt": "a minimal fox logo",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-vector" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "a minimal fox logo",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
}'
Output
// n = 1 (the default): output is a single URL string
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-minimal-fox-logo-1756630000000-0.svg",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"credits": 50
}
// n = 2: output is an array of URL strings
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-minimal-fox-logo-1756630000000-0.svg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-minimal-fox-logo-1756630000000-1.svg"
],
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"credits": 100
}
Choosing a Style — style_id or style_reference_urls
Every generation needs exactly one style source. This is checked before the request leaves the gateway, so a malformed call costs you nothing.
| What you send | Result |
|---|---|
style_id only | Accepted — the saved style is applied. No style-creation charge. |
style_reference_urls only | Accepted — a style is built from the references and applied. Adds one Create Style charge, and the new style_id is returned. |
| Both | 400 Bad Request — they are mutually exclusive. |
| Neither | 400 Bad Request — one of the two is required. |
Request Parameters - Text to Vector
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | any non-empty text |
| Description of the vector artwork you want to generate. | ||||
style_id | Conditional | string (uuid) | — | a style_id returned by /v1/create-style-vector |
Vector styles only. A style_id from Create Style or Create Style Pro is a raster style and is rejected here with 400 invalid_image_type. Create a vector style with /v1/create-style-vector or /v1/create-style-pro-vector — one vector style works on both Text to Vector and Text to Vector Pro. Reuse a style you already created. Exactly one of style_id or style_reference_urls is required — sending both, or neither, is a 400. Using style_id adds no style-creation charge. | ||||
style_reference_urls | Conditional | array of strings (URL) | — | 1–10 publicly reachable image URLs |
Build a style from reference images as part of this request. Exactly one of style_id or style_reference_urls is required. Using this adds one Create Style charge to this request (see Pricing below); the new style_id comes back in the response so you never have to pay it twice. | ||||
style_match | No | string | "precise" | "precise", "flexible" |
How closely the output follows the style. "regular" exists on the Recraft V2/V3 models only and is rejected here with a 400. | ||||
size | No | string | — | 56 values1024x1024, 1365x1024, 1024x1365, 1536x1024, 1024x1536, 1820x1024, 1024x1820, 1024x2048, 2048x1024, 1434x1024, 1024x1434, 1024x1280, 1280x1024, 1024x1707, 1707x1024, 1216x896, 896x1216, 1280x832, 832x1280, 1152x896, 896x1152, 1280x896, 896x1280, 832x1344, 768x1344, 1344x768, 768x1536, 1536x768, 2048x2048, 2432x1792, 1792x2432, 2560x1664, 1664x2560, 2304x1792, 1792x2304, 2560x1792, 1792x2560, 1664x2688, 1536x2688, 2688x1536, 1536x3072, 3072x1536, 1:1, 2:1, 1:2, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 6:10, 14:10, 10:14, 16:9, 9:16 |
| Output dimensions as exact pixels (WxH) or as an aspect ratio (w:h). Omit to let the provider choose for this model. | ||||
n | No | integer | 1 | 1–6 |
Number of vector images to generate. With n=1 the output field is a single URL string; with n greater than 1 it is an array of URL strings. Each vector image is charged, so n images cost n times the per-vector-image rate. | ||||
negative_prompt | No | string | — | any text |
Description of what to keep out of the result, for example dark, blurry, low quality. | ||||
random_seed | No | integer | — | 0–4294967295 |
| Seed for reproducible output. The same seed with the same prompt, style and size returns the same result. | ||||
response_format | No | string | — | "url", "b64_json" |
Format the provider returns internally. Either way the gateway stores the result and the output field you receive is always a hosted URL — you never have to decode base64. | ||||
Reference Image Requirements
Limits that apply to every URL in style_reference_urls.
| Requirement | Value |
|---|---|
| Accepted formats | PNG, JPG, WEBP |
| Number of images | 1 to 10 per style |
| Maximum size per image | under 10 MB |
| Maximum size for all images combined | 64 MB |
| Reachability | Public HTTPS URLs. They are fetched server-side, so signed, expiring or login-protected URLs fail. |
Example Request
{
"prompt": "a minimal fox logo",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
}
Every parameter
{
"prompt": "a minimal fox logo",
"style_reference_urls": [
"https://example.com/reference-1.png",
"https://example.com/reference-2.png"
],
"style_match": "flexible",
"size": "1280x1024",
"n": 4,
"negative_prompt": "dark, blurry, low quality",
"random_seed": 12345,
"response_format": "url"
}
Response
// n = 1 (the default): output is a single URL string
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-minimal-fox-logo-1756630000000-0.svg",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"credits": 50
}
// n = 2: output is an array of URL strings
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-minimal-fox-logo-1756630000000-0.svg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-minimal-fox-logo-1756630000000-1.svg"
],
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"credits": 100
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Pricing — Text to Vector
Generation is charged per image: n images cost n times the per-image rate.
There is one surcharge, and it is easy to avoid. Sending style_reference_urls makes the provider build a style as part of this request, which adds one Create Style charge ($0.0055) on top — once per request, never multiplied by n. Sending a saved style_id adds nothing.
| Request | How it is charged | Total |
|---|---|---|
n = 1 with style_id | 1 × $0.0550 | $0.0550 |
n = 1 with style_reference_urls | 1 × $0.0550 + $0.0055 | $0.0605 |
n = 6 with style_id | 6 × $0.0550 | $0.3300 |
n = 6 with style_reference_urls | 6 × $0.0550 + $0.0055 | $0.3355 |
Every response carries style_id, including when the style was created implicitly from style_reference_urls. Save it and send it as style_id next time to drop the surcharge permanently.
Rates shown are the published rates for this endpoint at the time of writing; the pricing panel on this page is authoritative.
Response Handling
Common status codes for Recraft V4 Styles Vector Text to Vector.
| Code | Meaning |
|---|---|
| 200 | Success — the finished result is in this response |
| 400 | Bad Request — rejected before reaching the provider, nothing charged |
| 401 | Unauthorized — missing or invalid subscription key |
| 403 | Insufficient Balance |
| 405 | Method Not Allowed — this endpoint accepts POST only |
| 422 | Unprocessable — the provider rejected the request, its message is passed through |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
| 502 | Bad Gateway — the provider could not be reached or returned something unusable |
| 503 | Service Unavailable — the provider is temporarily unavailable, retry shortly |
Error Responses
Validation runs before the request reaches the provider, so a 400 from this endpoint never costs you anything.
400 Bad Request — no style source
{
"error": "Exactly one of style_id or style_reference_urls is required. Send style_id to reuse a style you already created, or style_reference_urls (1 to 10 image URLs) to build one from reference images.",
"status": 400
}
400 Bad Request — both style sources
{
"error": "style_id and style_reference_urls are mutually exclusive - send exactly one of them, not both.",
"status": 400
}
400 Bad Request — missing prompt
{
"error": "prompt is required and must be a non-empty string.",
"status": 400
}
400 Bad Request — n out of range
{
"error": "n must not be greater than 6 (received 7).",
"status": 400
}
400 Bad Request — unsupported style_match value
{
"error": "style_match must be one of: precise, flexible. \"regular\" is not supported by the Recraft V4 Styles models.",
"status": 400
}
4xx — rejected by the provider
{
"error": "The prompt could not be understood",
"status": 422,
"code": "invalid_prompt"
}
403 Insufficient Balance
"The balance is insufficient to proceed with this operation."
503 Service Unavailable — provider temporarily unavailable
{
"error": "Image provider temporarily unavailable, please retry shortly",
"status": 503
}
A 503 means the provider is down, rate-limited or out of capacity. It is not a problem with your request and retrying shortly is the right response.
Response Fields
| Field | Type | Description |
|---|---|---|
output | string or array of strings | URL(s) of the generated SVG. A single string when n=1, an array of strings when n is greater than 1. Files are hosted on Cloudflare R2 as .svg, served as image/svg+xml. |
style_id | string (uuid) | The style used for this generation — the one you passed in, or the one created from style_reference_urls. Save it and send it as style_id next time to avoid paying the Create Style charge again. |
credits | integer | Provider credits consumed upstream. Informational only — your wallet is charged at the rates shown in Pricing, not in provider credits. |
Notes
The model is fixed by the endpoint you call. Any model key in your request body is dropped before the request is forwarded, so a request is always billed for the model it actually runs on. This endpoint responds synchronously — there is no queue and nothing to poll; the response carries the finished result. Output is SVG: output points to a .svg file served as image/svg+xml, which scales to any size without loss. image_format applies to raster output only and has no effect on this endpoint. Generation typically takes 20–60 seconds; larger n or larger sizes take longer.
Recraft V4 Styles API Pricing
Every Recraft V4 Styles capability is priced below. Attaching style_reference_urls to a generation also creates a style, adding the one-time Create Style charge to that request; passing a style_id you already created does not.
| Capability | Version | Price (USD) |
|---|---|---|
| Text to Image | text-to-image | $0.0385 |
| Text to Image Pro | text-to-image-pro | $0.11 |
| Text to Vector | text-to-vector | $0.055 |
| Text to Vector Pro | text-to-vector-pro | $0.132 |
| Create Style | create-style | $0.0055 |
| Create Style Pro | create-style-pro | $0.0055 |
| Create Style Vector | create-style-vector | $0.0055 |
| Create Style Pro Vector | create-style-pro-vector | $0.0055 |
Recraft V4 Styles API Documentation
https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-vector-pro
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Vector Pro - Recraft V4 Styles Pro Vector
Request Code
POST https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-vector-pro
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "a minimal fox logo",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
}
import requests
url = "https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-vector-pro"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "a minimal fox logo",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
}
response = requests.post(url, json=data, headers=headers)
response.raise_for_status()
result = response.json()
print(result)
const url = 'https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-vector-pro';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
"prompt": "a minimal fox logo",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/recraft-v4-styles/v1/text-to-vector-pro" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "a minimal fox logo",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
}'
Output
// n = 1 (the default): output is a single URL string
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-minimal-fox-logo-1756630000000-0.svg",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"credits": 120
}
// n = 2: output is an array of URL strings
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-minimal-fox-logo-1756630000000-0.svg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-minimal-fox-logo-1756630000000-1.svg"
],
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"credits": 240
}
Choosing a Style — style_id or style_reference_urls
Every generation needs exactly one style source. This is checked before the request leaves the gateway, so a malformed call costs you nothing.
| What you send | Result |
|---|---|
style_id only | Accepted — the saved style is applied. No style-creation charge. |
style_reference_urls only | Accepted — a style is built from the references and applied. Adds one Create Style Pro charge, and the new style_id is returned. |
| Both | 400 Bad Request — they are mutually exclusive. |
| Neither | 400 Bad Request — one of the two is required. |
Request Parameters - Text to Vector Pro
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | any non-empty text |
| Description of the vector artwork you want to generate. | ||||
style_id | Conditional | string (uuid) | — | a style_id returned by /v1/create-style-pro-vector |
Vector styles only. A style_id from Create Style or Create Style Pro is a raster style and is rejected here with 400 invalid_image_type. Create a vector style with /v1/create-style-vector or /v1/create-style-pro-vector — one vector style works on both Text to Vector and Text to Vector Pro. Reuse a style you already created. Exactly one of style_id or style_reference_urls is required — sending both, or neither, is a 400. Using style_id adds no style-creation charge. | ||||
style_reference_urls | Conditional | array of strings (URL) | — | 1–10 publicly reachable image URLs |
Build a style from reference images as part of this request. Exactly one of style_id or style_reference_urls is required. Using this adds one Create Style Pro charge to this request (see Pricing below); the new style_id comes back in the response so you never have to pay it twice. | ||||
style_match | No | string | "precise" | "precise", "flexible" |
How closely the output follows the style. "regular" exists on the Recraft V2/V3 models only and is rejected here with a 400. | ||||
size | No | string | — | 56 values1024x1024, 1365x1024, 1024x1365, 1536x1024, 1024x1536, 1820x1024, 1024x1820, 1024x2048, 2048x1024, 1434x1024, 1024x1434, 1024x1280, 1280x1024, 1024x1707, 1707x1024, 1216x896, 896x1216, 1280x832, 832x1280, 1152x896, 896x1152, 1280x896, 896x1280, 832x1344, 768x1344, 1344x768, 768x1536, 1536x768, 2048x2048, 2432x1792, 1792x2432, 2560x1664, 1664x2560, 2304x1792, 1792x2304, 2560x1792, 1792x2560, 1664x2688, 1536x2688, 2688x1536, 1536x3072, 3072x1536, 1:1, 2:1, 1:2, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 6:10, 14:10, 10:14, 16:9, 9:16 |
| Output dimensions as exact pixels (WxH) or as an aspect ratio (w:h). Omit to let the provider choose for this model. | ||||
n | No | integer | 1 | 1–6 |
Number of vector images to generate. With n=1 the output field is a single URL string; with n greater than 1 it is an array of URL strings. Each vector image is charged, so n images cost n times the per-vector-image rate. | ||||
negative_prompt | No | string | — | any text |
Description of what to keep out of the result, for example dark, blurry, low quality. | ||||
random_seed | No | integer | — | 0–4294967295 |
| Seed for reproducible output. The same seed with the same prompt, style and size returns the same result. | ||||
response_format | No | string | — | "url", "b64_json" |
Format the provider returns internally. Either way the gateway stores the result and the output field you receive is always a hosted URL — you never have to decode base64. | ||||
Reference Image Requirements
Limits that apply to every URL in style_reference_urls.
| Requirement | Value |
|---|---|
| Accepted formats | PNG, JPG, WEBP |
| Number of images | 1 to 10 per style |
| Maximum size per image | under 10 MB |
| Maximum size for all images combined | 64 MB |
| Reachability | Public HTTPS URLs. They are fetched server-side, so signed, expiring or login-protected URLs fail. |
Example Request
{
"prompt": "a minimal fox logo",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34"
}
Every parameter
{
"prompt": "a minimal fox logo",
"style_reference_urls": [
"https://example.com/reference-1.png",
"https://example.com/reference-2.png"
],
"style_match": "flexible",
"size": "2048x2048",
"n": 4,
"negative_prompt": "dark, blurry, low quality",
"random_seed": 12345,
"response_format": "url"
}
Response
// n = 1 (the default): output is a single URL string
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-minimal-fox-logo-1756630000000-0.svg",
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"credits": 120
}
// n = 2: output is an array of URL strings
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-minimal-fox-logo-1756630000000-0.svg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-minimal-fox-logo-1756630000000-1.svg"
],
"style_id": "6f2c1a4e-7b3d-4a1f-9c8e-2d5b0a7e1f34",
"credits": 240
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Pricing — Text to Vector Pro
Generation is charged per image: n images cost n times the per-image rate.
There is one surcharge, and it is easy to avoid. Sending style_reference_urls makes the provider build a style as part of this request, which adds one Create Style Pro charge ($0.0055) on top — once per request, never multiplied by n. Sending a saved style_id adds nothing.
| Request | How it is charged | Total |
|---|---|---|
n = 1 with style_id | 1 × $0.1320 | $0.1320 |
n = 1 with style_reference_urls | 1 × $0.1320 + $0.0055 | $0.1375 |
n = 6 with style_id | 6 × $0.1320 | $0.7920 |
n = 6 with style_reference_urls | 6 × $0.1320 + $0.0055 | $0.7975 |
Every response carries style_id, including when the style was created implicitly from style_reference_urls. Save it and send it as style_id next time to drop the surcharge permanently.
Rates shown are the published rates for this endpoint at the time of writing; the pricing panel on this page is authoritative.
Response Handling
Common status codes for Recraft V4 Styles Pro Vector Text to Vector Pro.
| Code | Meaning |
|---|---|
| 200 | Success — the finished result is in this response |
| 400 | Bad Request — rejected before reaching the provider, nothing charged |
| 401 | Unauthorized — missing or invalid subscription key |
| 403 | Insufficient Balance |
| 405 | Method Not Allowed — this endpoint accepts POST only |
| 422 | Unprocessable — the provider rejected the request, its message is passed through |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
| 502 | Bad Gateway — the provider could not be reached or returned something unusable |
| 503 | Service Unavailable — the provider is temporarily unavailable, retry shortly |
Error Responses
Validation runs before the request reaches the provider, so a 400 from this endpoint never costs you anything.
400 Bad Request — no style source
{
"error": "Exactly one of style_id or style_reference_urls is required. Send style_id to reuse a style you already created, or style_reference_urls (1 to 10 image URLs) to build one from reference images.",
"status": 400
}
400 Bad Request — both style sources
{
"error": "style_id and style_reference_urls are mutually exclusive - send exactly one of them, not both.",
"status": 400
}
400 Bad Request — missing prompt
{
"error": "prompt is required and must be a non-empty string.",
"status": 400
}
400 Bad Request — n out of range
{
"error": "n must not be greater than 6 (received 7).",
"status": 400
}
400 Bad Request — unsupported style_match value
{
"error": "style_match must be one of: precise, flexible. \"regular\" is not supported by the Recraft V4 Styles models.",
"status": 400
}
4xx — rejected by the provider
{
"error": "The prompt could not be understood",
"status": 422,
"code": "invalid_prompt"
}
403 Insufficient Balance
"The balance is insufficient to proceed with this operation."
503 Service Unavailable — provider temporarily unavailable
{
"error": "Image provider temporarily unavailable, please retry shortly",
"status": 503
}
A 503 means the provider is down, rate-limited or out of capacity. It is not a problem with your request and retrying shortly is the right response.
Response Fields
| Field | Type | Description |
|---|---|---|
output | string or array of strings | URL(s) of the generated SVG. A single string when n=1, an array of strings when n is greater than 1. Files are hosted on Cloudflare R2 as .svg, served as image/svg+xml. |
style_id | string (uuid) | The style used for this generation — the one you passed in, or the one created from style_reference_urls. Save it and send it as style_id next time to avoid paying the Create Style Pro charge again. |
credits | integer | Provider credits consumed upstream. Informational only — your wallet is charged at the rates shown in Pricing, not in provider credits. |
Notes
The model is fixed by the endpoint you call. Any model key in your request body is dropped before the request is forwarded, so a request is always billed for the model it actually runs on. This endpoint responds synchronously — there is no queue and nothing to poll; the response carries the finished result. Output is SVG: output points to a .svg file served as image/svg+xml, which scales to any size without loss. image_format applies to raster output only and has no effect on this endpoint. Generation typically takes 20–60 seconds; larger n or larger sizes take longer.
Recraft V4 Styles API Pricing
Every Recraft V4 Styles capability is priced below. Attaching style_reference_urls to a generation also creates a style, adding the one-time Create Style Pro charge to that request; passing a style_id you already created does not.
| Capability | Version | Price (USD) |
|---|---|---|
| Text to Image | text-to-image | $0.0385 |
| Text to Image Pro | text-to-image-pro | $0.11 |
| Text to Vector | text-to-vector | $0.055 |
| Text to Vector Pro | text-to-vector-pro | $0.132 |
| Create Style | create-style | $0.0055 |
| Create Style Pro | create-style-pro | $0.0055 |
| Create Style Vector | create-style-vector | $0.0055 |
| Create Style Pro Vector | create-style-pro-vector | $0.0055 |
Recraft V4 Pro API Documentation
https://gateway.pixazo.ai/recraft/v4-pro/generate
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Image V4 - Pro - Recraft
Request Code
POST https://gateway.pixazo.ai/recraft/v4-pro/generate
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: your-subscription-key
{
"prompt": "a red cat"
}
import requests
url = "https://gateway.pixazo.ai/recraft/v4-pro/generate"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "your-subscription-key"
}
data = {
"prompt": "a red cat"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/recraft/v4-pro/generate';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'your-subscription-key'
};
const data = {
prompt: 'a red cat'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/recraft/v4-pro/generate" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: your-subscription-key" \
-d '{
"prompt": "a red cat"
}'
Output
// When n=1 (default), output is a string:
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-1773760417132-0.webp"
}
// When n>1, output is an array:
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-1773760417132-0.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-1773760417132-1.webp"
]
}
Request Parameters - Text to Image V4 - Pro
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | 1–10,000 characters |
| Text description of the image to generate. Maximum prompt length for Recraft V4 Pro is 10,000 characters. | ||||
size | No | string | auto | 2048x2048, 3072x1536, 1536x3072, 2560x1664, 1664x2560, 2432x1792, 1792x2432, 2304x1792, 1792x2304, 1664x2688, 2560x1792, 1792x2560, 2688x1536, 1536x2688 — or an aspect ratio: 1:1, 2:1, 1:2, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 6:10, 14:10, 10:14, 16:9, 9:16 |
Output dimensions in WxH pixels, or an aspect ratio in w:h form. Recraft V4 Pro renders at 4 MP; if omitted, Recraft auto-selects the size from the prompt (square output is 2048x2048). | ||||
n | No | integer | 1 | 1–6 |
Number of images to generate. With n=1 the output field is a single URL string; with n>1 it is an array of URLs. | ||||
random_seed | No | integer | — | Any integer |
| Seed for reproducible generation. The same prompt, seed and settings return the same image. | ||||
response_format | No | string | url | url |
Format in which images are returned. Only url is supported through this gateway; b64_json is not (the gateway stores images and returns hosted URLs, so a b64_json request fails with 502). | ||||
controls | No | object | — | colors, background_color |
Fine-grained generation controls. Recraft V4 supports colors (array of preferred colors, each an object with rgb: 3 integers 0–255, plus an optional weight 0.0–1.0) and background_color (a single rgb color). artistic_level and no_text are Recraft V3-only and are not supported by V4. | ||||
Minimum Request
{
"prompt": "a red cat"
}
Full Request (all options)
{
"prompt": "A detailed architectural rendering of a modern glass building surrounded by lush gardens, golden hour lighting, ultra detailed, professional photography",
"size": "2560x1664",
"n": 6,
"controls": {}
}
Response
// Single image (n=1, default):
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp"
}
// Multiple images (n>1):
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-1.webp"
]
}
Response Fields - Text to Image V4 - Pro
| Field | Type | Description |
|---|---|---|
| output | string or array | URL(s) to the generated image(s). Returns a string when n=1, or an array of strings when n>1. Each URL points to a .webp image hosted on Cloudflare R2. |
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Text to Image V4 - Pro.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
400 Bad Request
{
"error": "Missing required field: prompt",
"status": 400
}
502 Bad Gateway
{
"error": "Failed to reach upstream API",
"status": 502
}
Notes
Recraft V4 Pro does not support the style, style_id, or negative_prompt parameters. Passing any of these parameters will result in a 400 Bad Request error — they are not silently ignored. Use the exact prompt text for best results. Image generation typically takes 30–50 seconds for single images. Multiple images or higher resolutions may take longer. The output field returns a string URL when n=1, and an array of string URLs when n>1. Generated images are in .webp format. Supported image dimensions include: 2048x2048, 3072x1536, 1536x3072, 2560x1664, 1664x2560, 2432x1792, 1792x2432, 2304x1792, 1792x2304, 1664x2688, 2560x1792, 1792x2560, 2688x1536, 1536x2688, and aspect ratios: 1:1, 2:1, 1:2, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 6:10, 14:10, 10:14, 16:9, 9:16.
Recraft V4 Pro API Pricing
| Resolution | Version | Price (USD) |
|---|---|---|
| All Resolution | v4-pro | $0.25 |
| All Resolution | V3, V4 | $0.04 |
| All Resolution | V3 Vector | $0.08 |
Recraft V4 API Documentation
https://gateway.pixazo.ai/recraft/v4/generate
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Image V4 - Normal - Recraft
Request Code
POST https://gateway.pixazo.ai/recraft/v4/generate
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: <your-subscription-key>
{
"prompt": "a red cat"
}
import requests
url = "https://gateway.pixazo.ai/recraft/v4/generate"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "<your-subscription-key>"
}
data = {
"prompt": "a red cat"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/recraft/v4/generate";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "<your-subscription-key>"
};
const data = {
"prompt": "a red cat"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
curl -X POST "https://gateway.pixazo.ai/recraft/v4/generate" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: <your-subscription-key>" \
-d '{
"prompt": "a red cat"
}'
Output
// When n=1 (default), output is a string:
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-1773760447344-0.webp"
}
// When n>1, output is an array:
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-1773760447344-0.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-1773760447344-1.webp"
]
}
Request Parameters - Text to Image V4 - Normal
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | 1–10,000 characters |
| Text description of the image to generate. Maximum prompt length for Recraft V4 is 10,000 characters. | ||||
size | No | string | auto | 1024x1024, 1536x768, 768x1536, 1280x832, 832x1280, 1216x896, 896x1216, 1152x896, 896x1152, 832x1344, 1280x896, 896x1280, 1344x768, 768x1344 — or an aspect ratio: 1:1, 2:1, 1:2, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 6:10, 14:10, 10:14, 16:9, 9:16 |
Output dimensions in WxH pixels, or an aspect ratio in w:h form. Recraft V4 renders at 1 MP; if omitted, Recraft auto-selects the size from the prompt (square output is 1024x1024). | ||||
n | No | integer | 1 | 1–6 |
Number of images to generate. With n=1 the output field is a single URL string; with n>1 it is an array of URLs. | ||||
random_seed | No | integer | — | Any integer |
| Seed for reproducible generation. The same prompt, seed and settings return the same image. | ||||
response_format | No | string | url | url |
Format in which images are returned. Only url is supported through this gateway; b64_json is not (the gateway stores images and returns hosted URLs, so a b64_json request fails with 502). | ||||
controls | No | object | — | colors, background_color |
Fine-grained generation controls. Recraft V4 supports colors (array of preferred colors, each an object with rgb: 3 integers 0–255, plus an optional weight 0.0–1.0) and background_color (a single rgb color). artistic_level and no_text are Recraft V3-only and are not supported by V4. | ||||
Minimum Request
{
"prompt": "a red cat"
}
Full Request (all options)
{
"prompt": "Picture a sleek, futuristic car racing through a neon-lit cityscape, its engine humming efficiently as it blurs past digital billboards. The driver skillfully navigates the glowing streets, aiming for victory in this high-tech, adrenaline-fueled race of tomorrow.",
"size": "1536x768",
"n": 6
}
Response
// Single image (n=1, default):
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp"
}
// Multiple images (n>1):
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-1.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-2.webp"
]
}
Response Fields - Text to Image V4 - Normal
| Field | Type | Description |
|---|---|---|
| output | string or array | URL(s) to the generated image(s). Returns a string for single image, array for multiple images. |
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Text to Image V4 - Normal.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
400 Bad Request
{
"error": "Missing required field: prompt",
"status": 400
}
502 Bad Gateway
{
"error": "Failed to reach upstream API",
"status": 502
}
Notes
Recraft V4 does not support the style, style_id, or negative_prompt parameters. Passing any of these parameters will result in a 400 Bad Request error — they are not silently ignored.
Image generation typically completes in 15–25 seconds. For high-resolution outputs or multiple images, processing may take slightly longer.
The output field returns a string URL when n=1, and an array of string URLs when n>1. Generated images are in .webp format.
Recraft V4 API Pricing
| Resolution | Version | Price (USD) |
|---|---|---|
| All Resolution | v4-pro | $0.25 |
| All Resolution | V3, V4 | $0.04 |
| All Resolution | V3 Vector | $0.08 |
Recraft v3 API Documentation
https://gateway.pixazo.ai/recraft/v3/image-to-image
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Image to Image V3 - Recraft
Request Code
POST https://gateway.pixazo.ai/recraft/v3/image-to-image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key:
{
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"prompt": "winter landscape",
"strength": 0.5
}
import requests
url = "https://gateway.pixazo.ai/recraft/v3/image-to-image"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": ""
}
data = {
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"prompt": "winter landscape",
"strength": 0.5
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/recraft/v3/image-to-image';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': ''
};
const data = {
image: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg',
prompt: 'winter landscape',
strength: 0.5
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/recraft/v3/image-to-image" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: " \
-d '{
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"prompt": "winter landscape",
"strength": 0.5
}'
Output
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/winter-landscape-1773764135991-0.webp"
}
Request Parameters - Image to Image V3
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
image | Yesrequired | string (URL) | — | — |
| Public URL of the source image to modify (PNG/JPG/WEBP). Max 5 MB, max 16 MP, max 4096 px on any side. | ||||
prompt | Yesrequired | string | — | — |
| A text description of the areas or attributes to change in the source image. | ||||
strength | Yesrequired | number (float) | — | 0–1 |
How much the result may differ from the source image. 0 = stay nearly identical to the input; 1 = minimal similarity (maximum transformation). | ||||
style | No | string | Recraft V3 Raw | — |
Style preset name (case-sensitive), e.g. Photorealism. Mutually exclusive with style_id. | ||||
style_id | No | string (UUID) | — | — |
UUID of a custom style created in your Recraft account, used as a visual reference. Mutually exclusive with style. | ||||
n | No | integer | 1 | 1–6 |
Number of images to generate. Each image is billed separately. output is a string when n=1 and an array of strings when n>1. | ||||
negative_prompt | No | string | — | — |
| A text description of undesired elements to exclude from the generated image. | ||||
controls | No | object | — | colors, background_color, artistic_level, no_text |
Custom parameters that tweak the generation: colors (array of RGB objects, e.g. {"rgb":[255,0,0]}), background_color (RGB object), artistic_level (integer 0–5; higher = more artistic freedom), no_text (boolean; suppress text in the image). | ||||
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 1 | JPG, PNG, WEBP · < 5 MB | Reference image. |
Minimum Request
{
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/nano-banana-pro-async_019efef2-90a7-74ff-577a-87e614a738b25/output.jpg",
"prompt": "winter landscape",
"strength": 0.5
}
Full Request (all options)
{
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"prompt": "winter landscape with snow-covered mountains, frozen lake, northern lights in the sky",
"strength": 0.85,
"style": "Photorealism",
"n": 4,
"negative_prompt": "dark, blurry, low quality"
}
Response
When n=1 (default) — output is a string:
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/winter-landscape-1773764135991-0.webp"
}
When n>1 (e.g., n=4) — output is an array:
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/winter-landscape-1773764135991-0.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/winter-landscape-1773764135991-1.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/winter-landscape-1773764135991-2.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/winter-landscape-1773764135991-3.webp"
]
}
Response Fields - Image to Image V3
| Field | Type | Description |
|---|---|---|
| output | string or array of strings | URL(s) of the generated image(s). Returns a single string if n=1, or an array of strings if n>1. |
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Image to Image V3.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Common Error Responses
400 Bad Request
{
"error": "Missing required field: prompt",
"status": 400
}
502 Bad Gateway
{
"error": "Failed to reach upstream API",
"status": 502
}
Notes & Tips
Usage guidelines and important details for Recraft V3 Image-to-Image API.
- Image must be under 5MB and 16MP with max 4096px on any side.
- Response time typically 15–25 seconds depending on complexity and load.
- Style presets are case-sensitive. Use exact names from the Style list in the documentation.
- Up to 6 images can be generated per request using the
nparameter. - When
n=1(default), theoutputfield is a plain string URL. Whenn>1, theoutputfield is an array of string URLs. Handle both types in your client code. - Generated images are returned in
.webpformat and hosted on Cloudflare R2 storage.
Recraft v3 API Pricing
| Resolution | Version | Price (USD) |
|---|---|---|
| All Resolution | v4-pro | $0.25 |
| All Resolution | V3, V4 | $0.04 |
| All Resolution | V3 Vector | $0.08 |
Recraft v3 API Documentation
https://gateway.pixazo.ai/recraft/v3/generate
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Image V3 - Recraft
Request Code
POST https://gateway.pixazo.ai/recraft/v3/generate
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: <your-subscription-key>
{
"prompt": "a red cat"
}
import requests
url = "https://gateway.pixazo.ai/recraft/v3/generate"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "<your-subscription-key>"
}
data = {
"prompt": "a red cat"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/recraft/v3/generate';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': '<your-subscription-key>'
};
const data = {
prompt: 'a red cat'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/recraft/v3/generate" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: <your-subscription-key>" \
-d '{
"prompt": "a red cat"
}'
Output
// When n=1 (default), output is a string:
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-1773760470488-0.webp"
}
// When n>1, output is an array:
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-1773760470488-0.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-1773760470488-1.webp"
]
}
Request Parameters - Text to Image V3
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | — |
| A text description of the desired image. | ||||
style | No | string | Recraft V3 Raw | — |
Style preset name (case-sensitive), e.g. Photorealism. Mutually exclusive with style_id. | ||||
style_id | No | string (UUID) | — | — |
UUID of a custom style created in your Recraft account, used as a visual reference. Mutually exclusive with style. | ||||
size | No | string | 1024x1024 | 1024x1024, 1365x1024, 1024x1365, 1536x1024, 1024x1536, 1280x1024, 1024x1280, 1434x1024, 1024x1434, 1820x1024, 1024x1820, 2048x1024, 1024x2048, 1024x1707, 1707x1024 |
Output image dimensions in WxH format. Images are rendered at ~1MP regardless of the size requested. | ||||
n | No | integer | 1 | 1–6 |
Number of images to generate. Each image is billed separately. output is a string when n=1 and an array of strings when n>1. | ||||
negative_prompt | No | string | — | — |
| A text description of undesired elements to exclude from the generated image. | ||||
controls | No | object | — | colors, background_color, artistic_level, no_text |
Custom parameters that tweak the generation: colors (array of RGB objects, e.g. {"rgb":[255,0,0]}), background_color (RGB object), artistic_level (integer 0–5; higher = more artistic freedom), no_text (boolean; suppress text in the image). | ||||
Minimum Request
{
"prompt": "a red cat"
}
Full Request (all options)
{
"prompt": "red point siamese cat sitting on a windowsill, natural light, shot on Canon EOS R5",
"style": "Photorealism",
"size": "1280x1024",
"n": 4,
"negative_prompt": "dark, blurry, low quality"
}
Response
// Single image (n=1, default):
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp"
}
// Multiple images (n>1):
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-1.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-2.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-3.webp"
]
}
Response Fields - Text to Image V3
| Field | Type | Description |
|---|---|---|
| output | array/string | Array of image URLs if n>1, or single URL string if n=1. Each URL points to a generated image. |
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Text to Image V3.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses - Text to Image V3
400 Bad Request
{
"error": "Missing required field: prompt",
"status": 400
}
502 Bad Gateway
{
"error": "Failed to reach upstream API",
"status": 502
}
Notes & Tips - Text to Image V3
Usage considerations for Recraft V3.
- Generated images are rendered at 1MP resolution regardless of specified size.
- Style names are case-sensitive and must match exactly from the supported presets.
- Processing time is typically 10–15 seconds for single images. Multiple images or complex prompts may take slightly longer.
- Multiple images (
n>1) may be generated asynchronously with slight time delays between outputs. - The
outputfield returns a string URL whenn=1, and an array of string URLs whenn>1. - Generated images are in
.webpformat and hosted on Cloudflare R2.
Recraft v3 API Pricing
| Resolution | Version | Price (USD) |
|---|---|---|
| All Resolution | v4-pro | $0.25 |
| All Resolution | V3, V4 | $0.04 |
| All Resolution | V3 Vector | $0.08 |
⚡ Performance
Live usage measured on Pixazo's gateway, split by model version. Generation time is how long a generation takes end-to-end (lower is better). Success rate is the percent of generations that complete (higher is better).
〰 Uptime
Percent of generations that succeeded over the selected period, per model version.