Pixazo APIModelsRecraft
Pixazo APIModelsRecraft

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.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.
2. 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
3. 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
4. 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://example.com/source.png",
  "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://example.com/source.png",
    "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://example.com/source.png',
  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://example.com/source.png",
          "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://example.com/source.png",
  "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, 1024x1707Output 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