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.

Get API Key
Recraft API

Models Version

WELCOME BONUS

Get 10% Cashback on Your First Payment (up to $500)

Add funds and get 10% cashback on your first payment (up to $500).

Claim Your Cashback →

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—1–10000 characters
Text description of the image you want to generate. Recraft V4.1 models accept prompts up to 10,000 characters.
sizeNostring2048x2048
28 values
2048x2048, 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.
nNointeger11–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.
controlsNoobject—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.colorsNoarray 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_colorNoobject—{"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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
200Success — image URL returned
Bad Request
401Unauthorized
403Insufficient Balance
Too Many Requests
500Internal Server Error
502Bad 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

FieldTypeDescription
outputstring or arrayURL(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

Your request will cost $0.25 per image.
2. Recraft V4.1 Standard

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-image

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (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

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—1 to 10,000 characters
Describes the image, including any text it should show.
sizeNostringpicked from the prompt1: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.
nNointeger11 to 6
How many images to make; each one is billed.
random_seedNointegerrandom0 to 2,147,483,647
Fix it to make a result easier to reproduce.
image_formatNostringwebpwebp, png
The file format of the image (WEBP is lossless).
controls.colorsNoarray 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_colorNocolor—{"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.

ParameterWhyUse instead
num_images, number_of_images, batch_size, count, num_outputsThe image count is set by one field.n
width, height, image_size, aspect_ratio, resolutionThe shape is set by one field.size
size outside the list aboveOnly the listed values are offered.A listed value
image_format other than webp or pngOnly the listed values are offered.webp or png
n outside 1–6, or random_seed outside its rangeOut of range.A value in range
negative_promptNot supported by this model.Describe what you want in prompt
style, substyle, style_id, style_reference_urls, style_matchStyles are not available on this API.—
text_layoutNot supported by this model.Put the text in prompt
image, image_urlThis 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.

ParameterWhen the request fails
controlsA 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.
promptThe 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:11024×1024
2:11536×768
1:2768×1536
3:21280×832
2:3832×1280
4:31216×896
3:4896×1216
5:41152×896
4:5896×1152
6:10832×1344
14:101280×896
10:14896×1280
16:91344×768
9:16768×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

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal 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

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsOne URL per image (n in all). Download them and keep your own copies.
output.media_typestringThe MIME type: image/webp or image/png.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus 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

Your request will cost $0.0367 per image.
Text To Vector

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-vector

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (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

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—1 to 10,000 characters
Describes the vector art: subject, style (flat, line art, outline…) and any text it should show.
sizeNostringpicked from the prompt1: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.
nNointeger11 to 6
How many images to make; each one is billed.
random_seedNointegerrandom0 to 2,147,483,647
Fix it to make a result easier to reproduce.
controls.colorsNoarray 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_colorNocolor—{"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.

ParameterWhyUse instead
num_images, number_of_images, batch_size, count, num_outputsThe image count is set by one field.n
width, height, image_size, aspect_ratio, resolutionThe 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_formatThe output is always SVG.—
n outside 1–6, or random_seed outside its rangeOut of range.A value in range
negative_promptNot supported by this model.Describe what you want in prompt
style, substyle, style_id, style_reference_urls, style_matchStyles are not available on this API.—
text_layoutNot supported by this model.Put the text in prompt
image, image_urlThis 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.

ParameterWhen the request fails
controlsA 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.
promptThe 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

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal 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

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsOne URL per SVG file (n in all). Download them and keep your own copies.
output.media_typestringThe MIME type: image/svg+xml.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus 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

Your request will cost $0.084 per SVG image.
3. Recraft V4.1 Flash

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—1–10000 characters
Text description of the image you want to generate. Recraft V4.1 models accept prompts up to 10,000 characters.
sizeNostring—
28 values
1024x1024, 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.
nNointeger11–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.
controlsNoobject—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.colorsNoarray 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_colorNoobject—{"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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
200Success — image URL returned
Bad Request
401Unauthorized
403Insufficient Balance
Too Many Requests
500Internal Server Error
502Bad 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

FieldTypeDescription
outputstring or arrayURL(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

Your request will cost $0.007 per image.
4. Recraft Vectorize

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/vectorize

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (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

ParameterRequiredTypeDefaultAllowed values / range
image_urlYesrequiredstring—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_stackingNostringhierarchicalhierarchical, 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.

ParameterWhyUse instead
versionThe vectorizer is chosen by the endpoint./recraft-vectorize/v1/vectorize or /recraft-vectorize/v1/vectorize-pro
file, imageUpload the image somewhere public and send its URL.image_url
shape_stacking outside the list aboveOnly the listed values are offered.hierarchical or cut_out
n, num_images, number_of_images, batch_size, count, num_outputsEach request converts one image.One request per image
promptVectorizing 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.

ParameterWhen the request fails
image_urlThe 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

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal 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

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsThe URL of the SVG (one per request). Download it and keep your own copy.
output.media_typestringThe MIME type: image/svg+xml.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus 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

Your request will cost $0.0105 per image.
Vectorize Pro

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-pro

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (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

ParameterRequiredTypeDefaultAllowed values / range
image_urlYesrequiredstring—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_stackingNostringhierarchicalhierarchical, 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.

ParameterWhyUse instead
versionThe vectorizer is chosen by the endpoint./recraft-vectorize/v1/vectorize or /recraft-vectorize/v1/vectorize-pro
file, imageUpload the image somewhere public and send its URL.image_url
shape_stacking outside the list aboveOnly the listed values are offered.hierarchical or cut_out
n, num_images, number_of_images, batch_size, count, num_outputsEach request converts one image.One request per image
promptVectorizing 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.

ParameterWhen the request fails
image_urlThe 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

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal 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

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsThe URL of the SVG (one per request). Download it and keep your own copy.
output.media_typestringThe MIME type: image/svg+xml.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus 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

Your request will cost $0.042 per image.
5. Recraft Crisp Upscale

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/upscale

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (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

ParameterRequiredTypeDefaultAllowed values / range
image_urlYesrequiredstring—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_formatNostringwebpwebp, 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.

ParameterWhyUse instead
n, num_images, number_of_images, batch_size, count, num_outputsEach request upscales one image.One request per image
scale, upscale_factor, width, height, resolution, sizeCrisp Upscale has no size option: it upscales by a fixed factor.—
image_format other than webp or pngOnly the listed values are offered.webp or png
image, fileUpload the image somewhere public and send its URL.image_url
promptUpscaling follows the image; there is nothing to describe.—
response_format, zdrNot 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.

ParameterWhen the request fails
image_urlThe 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

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Bad request — the body failed the submit check (see Request Parameters) and was not queued.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance.
403Forbidden.
429Too many requests.
500Internal 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

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request.
errorstring or nullError message when status is ERROR; otherwise null.
output.media_urlarray of stringsThe URL of the upscaled image (one per request). Download it and keep your own copy.
output.media_typestringThe MIME type: image/webp or image/png.
created_atstringRequest creation timestamp.
updated_atstringLast status change timestamp.
completed_atstringCompletion timestamp.
polling_urlstringStatus 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

Your request will cost $0.0042 per image.
6. Recraft V4 Styles

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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

ParameterRequiredTypeDefaultAllowed values / range
image_urlsYesrequiredarray 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.
matchNostring"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_weightsNoarray 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.
promptNostring—any text
Optional text hint describing the style, for example flat editorial illustration, muted palette. It describes the style, not an image to generate.
privateNoboolean—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.

RequirementValue
Accepted formatsPNG, JPG, WEBP
Number of images1 to 10 per style
Maximum size per imageunder 10 MB
Maximum size for all images combined64 MB
ReachabilityPublic 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_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.

RequestHow it is chargedTotal
Any Create Style request, 1 reference image1 × $0.0055$0.0055
Any Create Style request, 10 reference images1 × $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.

CodeMeaning
200Success — the finished result is in this response
Bad Request — rejected before reaching the provider, nothing charged
401Unauthorized — missing or invalid subscription key
403Insufficient Balance
405Method Not Allowed — this endpoint accepts POST only
Unprocessable — the provider rejected the request, its message is passed through
Too Many Requests
500Internal Server Error
502Bad Gateway — the provider could not be reached or returned something unusable
503Service 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

FieldTypeDescription
style_idstring (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.
idstring (uuid)The same value as style_id, kept for clients written against the provider's own response shape.
stylestringThe style family the provider assigned, one of any, digital_illustration, icon, realistic_image, vector_illustration, logo_raster.
creation_timestring (ISO 8601)When the style was created.
is_privatebooleanWhether the style is private.
creditsintegerProvider 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.

CapabilityVersionPrice (USD)
Text to Imagetext-to-image$0.0385
Text to Image Protext-to-image-pro$0.11
Text to Vectortext-to-vector$0.055
Text to Vector Protext-to-vector-pro$0.132
Create Stylecreate-style$0.0055
Create Style Procreate-style-pro$0.0055
Create Style Vectorcreate-style-vector$0.0055
Create Style Pro Vectorcreate-style-pro-vector$0.0055
This endpoint bills the Create Style row, flat per request — the same price whether you send 1 or 10 image_urls. Reusing the returned style_id on later generations costs nothing extra.
Create Style Pro

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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

ParameterRequiredTypeDefaultAllowed values / range
image_urlsYesrequiredarray 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.
matchNostring"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_weightsNoarray 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.
promptNostring—any text
Optional text hint describing the style, for example flat editorial illustration, muted palette. It describes the style, not an image to generate.
privateNoboolean—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.

RequirementValue
Accepted formatsPNG, JPG, WEBP
Number of images1 to 10 per style
Maximum size per imageunder 10 MB
Maximum size for all images combined64 MB
ReachabilityPublic 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_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.

RequestHow it is chargedTotal
Any Create Style Pro request, 1 reference image1 × $0.0055$0.0055
Any Create Style Pro request, 10 reference images1 × $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.

CodeMeaning
200Success — the finished result is in this response
Bad Request — rejected before reaching the provider, nothing charged
401Unauthorized — missing or invalid subscription key
403Insufficient Balance
405Method Not Allowed — this endpoint accepts POST only
Unprocessable — the provider rejected the request, its message is passed through
Too Many Requests
500Internal Server Error
502Bad Gateway — the provider could not be reached or returned something unusable
503Service 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

FieldTypeDescription
style_idstring (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.
idstring (uuid)The same value as style_id, kept for clients written against the provider's own response shape.
stylestringThe style family the provider assigned, one of any, digital_illustration, icon, realistic_image, vector_illustration, logo_raster.
creation_timestring (ISO 8601)When the style was created.
is_privatebooleanWhether the style is private.
creditsintegerProvider 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.

CapabilityVersionPrice (USD)
Text to Imagetext-to-image$0.0385
Text to Image Protext-to-image-pro$0.11
Text to Vectortext-to-vector$0.055
Text to Vector Protext-to-vector-pro$0.132
Create Stylecreate-style$0.0055
Create Style Procreate-style-pro$0.0055
Create Style Vectorcreate-style-vector$0.0055
Create Style Pro Vectorcreate-style-pro-vector$0.0055
This endpoint bills the Create Style Pro row, flat per request — the same price whether you send 1 or 10 image_urls. Reusing the returned style_id on later generations costs nothing extra.
Text to Image

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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 sendResult
style_id onlyAccepted — the saved style is applied. No style-creation charge.
style_reference_urls onlyAccepted — a style is built from the references and applied. Adds one Create Style charge, and the new style_id is returned.
Both400 Bad Request — they are mutually exclusive.
Neither400 Bad Request — one of the two is required.

Request Parameters - Text to Image

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—any non-empty text
Description of the image you want to generate.
style_idConditionalstring (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_urlsConditionalarray 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_matchNostring"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.
sizeNostring—
56 values
1024x1024, 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.
nNointeger11–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_promptNostring—any text
Description of what to keep out of the result, for example dark, blurry, low quality.
random_seedNointeger—0–4294967295
Seed for reproducible output. The same seed with the same prompt, style and size returns the same result.
image_formatNostring—"webp", "png"
File format of the generated raster image.
response_formatNostring—"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.

RequirementValue
Accepted formatsPNG, JPG, WEBP
Number of images1 to 10 per style
Maximum size per imageunder 10 MB
Maximum size for all images combined64 MB
ReachabilityPublic 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_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.

RequestHow it is chargedTotal
n = 1 with style_id1 × $0.0385$0.0385
n = 1 with style_reference_urls1 × $0.0385 + $0.0055$0.0440
n = 6 with style_id6 × $0.0385$0.2310
n = 6 with style_reference_urls6 × $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.

CodeMeaning
200Success — the finished result is in this response
Bad Request — rejected before reaching the provider, nothing charged
401Unauthorized — missing or invalid subscription key
403Insufficient Balance
405Method Not Allowed — this endpoint accepts POST only
Unprocessable — the provider rejected the request, its message is passed through
Too Many Requests
500Internal Server Error
502Bad Gateway — the provider could not be reached or returned something unusable
503Service 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

FieldTypeDescription
outputstring or array of stringsURL(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_idstring (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.
creditsintegerProvider 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.

CapabilityVersionPrice (USD)
Text to Imagetext-to-image$0.0385
Text to Image Protext-to-image-pro$0.11
Text to Vectortext-to-vector$0.055
Text to Vector Protext-to-vector-pro$0.132
Create Stylecreate-style$0.0055
Create Style Procreate-style-pro$0.0055
Create Style Vectorcreate-style-vector$0.0055
Create Style Pro Vectorcreate-style-pro-vector$0.0055
This endpoint bills the Text to Image row, per image — n images cost n × that rate (n = 1 to 6). The Create Style surcharge, when it applies, is added once per request, never per image.
Text to Image Pro

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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 sendResult
style_id onlyAccepted — the saved style is applied. No style-creation charge.
style_reference_urls onlyAccepted — a style is built from the references and applied. Adds one Create Style Pro charge, and the new style_id is returned.
Both400 Bad Request — they are mutually exclusive.
Neither400 Bad Request — one of the two is required.

Request Parameters - Text to Image Pro

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—any non-empty text
Description of the image you want to generate.
style_idConditionalstring (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_urlsConditionalarray 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_matchNostring"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.
sizeNostring—
56 values
1024x1024, 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.
nNointeger11–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_promptNostring—any text
Description of what to keep out of the result, for example dark, blurry, low quality.
random_seedNointeger—0–4294967295
Seed for reproducible output. The same seed with the same prompt, style and size returns the same result.
image_formatNostring—"webp", "png"
File format of the generated raster image.
response_formatNostring—"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.

RequirementValue
Accepted formatsPNG, JPG, WEBP
Number of images1 to 10 per style
Maximum size per imageunder 10 MB
Maximum size for all images combined64 MB
ReachabilityPublic 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_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.

RequestHow it is chargedTotal
n = 1 with style_id1 × $0.1100$0.1100
n = 1 with style_reference_urls1 × $0.1100 + $0.0055$0.1155
n = 6 with style_id6 × $0.1100$0.6600
n = 6 with style_reference_urls6 × $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.

CodeMeaning
200Success — the finished result is in this response
Bad Request — rejected before reaching the provider, nothing charged
401Unauthorized — missing or invalid subscription key
403Insufficient Balance
405Method Not Allowed — this endpoint accepts POST only
Unprocessable — the provider rejected the request, its message is passed through
Too Many Requests
500Internal Server Error
502Bad Gateway — the provider could not be reached or returned something unusable
503Service 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

FieldTypeDescription
outputstring or array of stringsURL(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_idstring (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.
creditsintegerProvider 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.

CapabilityVersionPrice (USD)
Text to Imagetext-to-image$0.0385
Text to Image Protext-to-image-pro$0.11
Text to Vectortext-to-vector$0.055
Text to Vector Protext-to-vector-pro$0.132
Create Stylecreate-style$0.0055
Create Style Procreate-style-pro$0.0055
Create Style Vectorcreate-style-vector$0.0055
Create Style Pro Vectorcreate-style-pro-vector$0.0055
This endpoint bills the Text to Image Pro row, per image — n images cost n × that rate (n = 1 to 6). The Create Style Pro surcharge, when it applies, is added once per request, never per image.
Text to Vector

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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 sendResult
style_id onlyAccepted — the saved style is applied. No style-creation charge.
style_reference_urls onlyAccepted — a style is built from the references and applied. Adds one Create Style charge, and the new style_id is returned.
Both400 Bad Request — they are mutually exclusive.
Neither400 Bad Request — one of the two is required.

Request Parameters - Text to Vector

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—any non-empty text
Description of the vector artwork you want to generate.
style_idConditionalstring (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_urlsConditionalarray 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_matchNostring"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.
sizeNostring—
56 values
1024x1024, 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.
nNointeger11–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_promptNostring—any text
Description of what to keep out of the result, for example dark, blurry, low quality.
random_seedNointeger—0–4294967295
Seed for reproducible output. The same seed with the same prompt, style and size returns the same result.
response_formatNostring—"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.

RequirementValue
Accepted formatsPNG, JPG, WEBP
Number of images1 to 10 per style
Maximum size per imageunder 10 MB
Maximum size for all images combined64 MB
ReachabilityPublic 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_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.

RequestHow it is chargedTotal
n = 1 with style_id1 × $0.0550$0.0550
n = 1 with style_reference_urls1 × $0.0550 + $0.0055$0.0605
n = 6 with style_id6 × $0.0550$0.3300
n = 6 with style_reference_urls6 × $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.

CodeMeaning
200Success — the finished result is in this response
Bad Request — rejected before reaching the provider, nothing charged
401Unauthorized — missing or invalid subscription key
403Insufficient Balance
405Method Not Allowed — this endpoint accepts POST only
Unprocessable — the provider rejected the request, its message is passed through
Too Many Requests
500Internal Server Error
502Bad Gateway — the provider could not be reached or returned something unusable
503Service 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

FieldTypeDescription
outputstring or array of stringsURL(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_idstring (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.
creditsintegerProvider 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.

CapabilityVersionPrice (USD)
Text to Imagetext-to-image$0.0385
Text to Image Protext-to-image-pro$0.11
Text to Vectortext-to-vector$0.055
Text to Vector Protext-to-vector-pro$0.132
Create Stylecreate-style$0.0055
Create Style Procreate-style-pro$0.0055
Create Style Vectorcreate-style-vector$0.0055
Create Style Pro Vectorcreate-style-pro-vector$0.0055
This endpoint bills the Text to Vector row, per image — n images cost n × that rate (n = 1 to 6). The Create Style surcharge, when it applies, is added once per request, never per image.
Text to Vector Pro

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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 sendResult
style_id onlyAccepted — the saved style is applied. No style-creation charge.
style_reference_urls onlyAccepted — a style is built from the references and applied. Adds one Create Style Pro charge, and the new style_id is returned.
Both400 Bad Request — they are mutually exclusive.
Neither400 Bad Request — one of the two is required.

Request Parameters - Text to Vector Pro

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—any non-empty text
Description of the vector artwork you want to generate.
style_idConditionalstring (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_urlsConditionalarray 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_matchNostring"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.
sizeNostring—
56 values
1024x1024, 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.
nNointeger11–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_promptNostring—any text
Description of what to keep out of the result, for example dark, blurry, low quality.
random_seedNointeger—0–4294967295
Seed for reproducible output. The same seed with the same prompt, style and size returns the same result.
response_formatNostring—"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.

RequirementValue
Accepted formatsPNG, JPG, WEBP
Number of images1 to 10 per style
Maximum size per imageunder 10 MB
Maximum size for all images combined64 MB
ReachabilityPublic 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_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.

RequestHow it is chargedTotal
n = 1 with style_id1 × $0.1320$0.1320
n = 1 with style_reference_urls1 × $0.1320 + $0.0055$0.1375
n = 6 with style_id6 × $0.1320$0.7920
n = 6 with style_reference_urls6 × $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.

CodeMeaning
200Success — the finished result is in this response
Bad Request — rejected before reaching the provider, nothing charged
401Unauthorized — missing or invalid subscription key
403Insufficient Balance
405Method Not Allowed — this endpoint accepts POST only
Unprocessable — the provider rejected the request, its message is passed through
Too Many Requests
500Internal Server Error
502Bad Gateway — the provider could not be reached or returned something unusable
503Service 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

FieldTypeDescription
outputstring or array of stringsURL(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_idstring (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.
creditsintegerProvider 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.

CapabilityVersionPrice (USD)
Text to Imagetext-to-image$0.0385
Text to Image Protext-to-image-pro$0.11
Text to Vectortext-to-vector$0.055
Text to Vector Protext-to-vector-pro$0.132
Create Stylecreate-style$0.0055
Create Style Procreate-style-pro$0.0055
Create Style Vectorcreate-style-vector$0.0055
Create Style Pro Vectorcreate-style-pro-vector$0.0055
This endpoint bills the Text to Vector Pro row, per image — n images cost n × that rate (n = 1 to 6). The Create Style Pro surcharge, when it applies, is added once per request, never per image.
7. Recraft V4 Pro

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

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—1–10,000 characters
Text description of the image to generate. Maximum prompt length for Recraft V4 Pro is 10,000 characters.
sizeNostringauto2048x2048, 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).
nNointeger11–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_seedNointeger—Any integer
Seed for reproducible generation. The same prompt, seed and settings return the same image.
response_formatNostringurlurl
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).
controlsNoobject—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
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
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

ResolutionVersionPrice (USD)
All Resolutionv4-pro$0.25
All ResolutionV3, V4$0.04
All ResolutionV3 Vector$0.08
8. Recraft V4

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

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—1–10,000 characters
Text description of the image to generate. Maximum prompt length for Recraft V4 is 10,000 characters.
sizeNostringauto1024x1024, 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).
nNointeger11–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_seedNointeger—Any integer
Seed for reproducible generation. The same prompt, seed and settings return the same image.
response_formatNostringurlurl
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).
controlsNoobject—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
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
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

ResolutionVersionPrice (USD)
All Resolutionv4-pro$0.25
All ResolutionV3, V4$0.04
All ResolutionV3 Vector$0.08
9. Recraft v3

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

ParameterRequiredTypeDefaultAllowed values / range
imageYesrequiredstring (URL)——
Public URL of the source image to modify (PNG/JPG/WEBP). Max 5 MB, max 16 MP, max 4096 px on any side.
promptYesrequiredstring——
A text description of the areas or attributes to change in the source image.
strengthYesrequirednumber (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).
styleNostringRecraft V3 Raw—
Style preset name (case-sensitive), e.g. Photorealism. Mutually exclusive with style_id.
style_idNostring (UUID)——
UUID of a custom style created in your Recraft account, used as a visual reference. Mutually exclusive with style.
nNointeger11–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_promptNostring——
A text description of undesired elements to exclude from the generated image.
controlsNoobject—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

TypeMaxFormat / SizeDescription
image1JPG, PNG, WEBP · < 5 MBReference 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
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
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 n parameter.
  • When n=1 (default), the output field is a plain string URL. When n>1, the output field is an array of string URLs. Handle both types in your client code.
  • Generated images are returned in .webp format and hosted on Cloudflare R2 storage.

Recraft v3 API Pricing

ResolutionVersionPrice (USD)
All Resolutionv4-pro$0.25
All ResolutionV3, V4$0.04
All ResolutionV3 Vector$0.08
Text to Image

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

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring——
A text description of the desired image.
styleNostringRecraft V3 Raw—
Style preset name (case-sensitive), e.g. Photorealism. Mutually exclusive with style_id.
style_idNostring (UUID)——
UUID of a custom style created in your Recraft account, used as a visual reference. Mutually exclusive with style.
sizeNostring1024x10241024x1024, 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.
nNointeger11–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_promptNostring——
A text description of undesired elements to exclude from the generated image.
controlsNoobject—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
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
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 output field returns a string URL when n=1, and an array of string URLs when n>1.
  • Generated images are in .webp format and hosted on Cloudflare R2.

Recraft v3 API Pricing

ResolutionVersionPrice (USD)
All Resolutionv4-pro$0.25
All ResolutionV3, V4$0.04
All ResolutionV3 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).

Show data for the last
Generations
1,900last 30d
~63 per day
Success rate
73.7%
of completed generations
Generation time
13.5savg
p95 14.1s
Requests
Nov 1max 600Nov 30
Recraft V4.1 StandardAvg 20/day
Recraft v3 / Recraft V4 / Recraft V4 ProAvg 17/day
Recraft VectorizeAvg 17/day
Recraft Crisp UpscaleAvg 10/day
Generation Time
Nov 1max 19.5sNov 30
Recraft V4.1 StandardAvg 19.5s
Recraft v3 / Recraft V4 / Recraft V4 ProAvg 9.0s
Recraft VectorizeAvg 14.8s
Recraft Crisp UpscaleAvg 8.1s
Error Rate
Nov 1max 33.3%Nov 30
Recraft V4.1 StandardAvg 33.3%
Recraft v3 / Recraft V4 / Recraft V4 ProAvg 20.0%
Recraft VectorizeAvg 20.0%
Recraft Crisp UpscaleAvg 33.3%

〰 Uptime

Percent of generations that succeeded over the selected period, per model version.

Avg. Success Rate (30d)
73.68%
across all generations of this model family
Uptime
Nov 1max 100%Nov 30
Recraft V4.1 StandardAvg 66.67%
Recraft v3 / Recraft V4 / Recraft V4 ProAvg 80.00%
Recraft VectorizeAvg 80.00%
Recraft Crisp UpscaleAvg 66.67%