Recraft V4.1 Pro API, Recraft V4 Pro API, Recraft V3 API: Pricing, Documentation

by Recraft

Recraft V4.1 Pro 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 $5 Free Credit on First Payment

No strings attached — add funds and get $5 bonus instantly

Claim Your $5 →

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 / rangeDescription
image_urlsYesarray of strings (URL)1–10 publicly reachable image URLsReference 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 numbersexactly one number per image_urls entryRelative 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.
promptNostringany textOptional text hint describing the style, for example flat editorial illustration, muted palette. It describes the style, not an image to generate.
privateNobooleantrue, falseWhether 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 and Text to Vector 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 and Text to Vector to apply this style without paying for style creation again.
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 intended for Text to Image and Text to Vector.

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
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 / rangeDescription
image_urlsYesarray of strings (URL)1–10 publicly reachable image URLsReference 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 numbersexactly one number per image_urls entryRelative 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.
promptNostringany textOptional text hint describing the style, for example flat editorial illustration, muted palette. It describes the style, not an image to generate.
privateNobooleantrue, falseWhether 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 and Text to Vector 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 and Text to Vector Pro to apply this style without paying for style creation again.
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 intended for Text to Image Pro and Text to Vector Pro.

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
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 / rangeDescription
promptYesstringany non-empty textDescription of the image you want to generate.
style_idConditionalstring (uuid)a style_id returned by /v1/create-styleReuse 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 URLsBuild 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.
sizeNostring1024x1024, 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:16Output dimensions as exact pixels (WxH) or as an aspect ratio (w:h). Omit to let the provider choose for this model.
nNointeger11–6Number 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_promptNostringany textDescription of what to keep out of the result, for example dark, blurry, low quality.
random_seedNointeger0–4294967295Seed 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
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 / rangeDescription
promptYesstringany non-empty textDescription of the image you want to generate.
style_idConditionalstring (uuid)a style_id returned by /v1/create-style-proReuse 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 URLsBuild 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.
sizeNostring1024x1024, 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:16Output dimensions as exact pixels (WxH) or as an aspect ratio (w:h). Omit to let the provider choose for this model.
nNointeger11–6Number 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_promptNostringany textDescription of what to keep out of the result, for example dark, blurry, low quality.
random_seedNointeger0–4294967295Seed 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
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 / rangeDescription
promptYesstringany non-empty textDescription of the vector artwork you want to generate.
style_idConditionalstring (uuid)a style_id returned by /v1/create-styleReuse 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 URLsBuild 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.
sizeNostring1024x1024, 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:16Output dimensions as exact pixels (WxH) or as an aspect ratio (w:h). Omit to let the provider choose for this model.
nNointeger11–6Number 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_promptNostringany textDescription of what to keep out of the result, for example dark, blurry, low quality.
random_seedNointeger0–4294967295Seed 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
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 / rangeDescription
promptYesstringany non-empty textDescription of the vector artwork you want to generate.
style_idConditionalstring (uuid)a style_id returned by /v1/create-style-proReuse 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 URLsBuild 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.
sizeNostring1024x1024, 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:16Output dimensions as exact pixels (WxH) or as an aspect ratio (w:h). Omit to let the provider choose for this model.
nNointeger11–6Number 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_promptNostringany textDescription of what to keep out of the result, for example dark, blurry, low quality.
random_seedNointeger0–4294967295Seed 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
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.
2. Recraft V4.1 Pro

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 / rangeDescription
promptYesstring1–10000 charactersText description of the image you want to generate. Recraft V4.1 models accept prompts up to 10,000 characters.
sizeNostring2048x20482048x2048, 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:16Output 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–6Number 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.
controlsNoobjectcolors, background_colorOptional 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 objectsitems 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.
3. 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 / rangeDescription
promptYesstring1–10,000 charactersText 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:16Output 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–6Number 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_seedNointegerAny integerSeed for reproducible generation. The same prompt, seed and settings return the same image.
response_formatNostringurlurlFormat 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).
controlsNoobjectcolors, background_colorFine-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

10% OFFPromotional discount on API pricing
ResolutionVersionPrice (USD)
All Resolutionv4-pro$0.25$0.225
All ResolutionV3, V4$0.04$0.036
4. 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 / rangeDescription
promptYesstring1–10,000 charactersText 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:16Output 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–6Number 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_seedNointegerAny integerSeed for reproducible generation. The same prompt, seed and settings return the same image.
response_formatNostringurlurlFormat 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).
controlsNoobjectcolors, background_colorFine-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

10% OFFPromotional discount on API pricing
ResolutionVersionPrice (USD)
All Resolutionv4-pro$0.25$0.225
All ResolutionV3, V4$0.04$0.036
5. 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 / rangeDescription
imageYesstring (URL)Public URL of the source image to modify (PNG/JPG/WEBP). Max 5 MB, max 16 MP, max 4096 px on any side.
promptYesstringA text description of the areas or attributes to change in the source image.
strengthYesnumber (float)0–1How much the result may differ from the source image. 0 = stay nearly identical to the input; 1 = minimal similarity (maximum transformation).
styleNostringRecraft V3 RawStyle 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–6Number 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_promptNostringA text description of undesired elements to exclude from the generated image.
controlsNoobjectcolors, background_color, artistic_level, no_textCustom 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

10% OFFPromotional discount on API pricing
ResolutionVersionPrice (USD)
All Resolutionv4-pro$0.25$0.225
All ResolutionV3, V4$0.04$0.036
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 / rangeDescription
promptYesstringA text description of the desired image.
styleNostringRecraft V3 RawStyle 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, 1707x1024Output image dimensions in WxH format. Images are rendered at ~1MP regardless of the size requested.
nNointeger11–6Number 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_promptNostringA text description of undesired elements to exclude from the generated image.
controlsNoobjectcolors, background_color, artistic_level, no_textCustom 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

10% OFFPromotional discount on API pricing
ResolutionVersionPrice (USD)
All Resolutionv4-pro$0.25$0.225
All ResolutionV3, V4$0.04$0.036

⚡ 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
200last 30d
~7 per day
Success rate
100.0%
of completed generations
Generation time
23.6savg
p95 23.6s
Requests
Aug 3max 100Sep 1
Recraft v3 / Recraft V4 / Recraft V4 ProAvg 7/day
Generation Time
Aug 3max 27.1sSep 1
Recraft v3 / Recraft V4 / Recraft V4 ProAvg 23.6s
Error Rate
Aug 3max 5.0%Sep 1
Recraft v3 / Recraft V4 / Recraft V4 ProAvg 0.0%

〰 Uptime

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

Avg. Success Rate (30d)
100.00%
across all generations of this model family
Uptime
Aug 3max 100%Sep 1
SuccessfulAvg 100.00%