Recraft V4 Pro API, Recraft V3 API - AI Image Generation APIs
by Recraft
Recraft V4 Pro API. The API is designed for design professionals, marketers, and creative teams requiring production-quality image generation with reliable, repeatable outputs.

Models Version
Get $5 Free Credit on First Payment
No strings attached — add funds and get $5 bonus instantly
Recraft V4 Pro Text To Image API Documentation
https://gateway.pixazo.ai/recraft
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
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| prompt | string | Yes | — | The text query that instructs the AI model on what kind of image to generate. |
| size | string | No | 2048x2048 | Image dimensions or aspect ratio. See documentation for supported values. |
| n | integer | No | 1 | Number of images to generate. Minimum: 1, Maximum: 6. |
| controls | object | No | — | Additional generation controls. |
Minimum Request
{
"prompt": "a red cat"
}
Full Request (all options)
{
"prompt": "A detailed architectural rendering of a modern glass building surrounded by lush gardens, golden hour lighting, ultra detailed, professional photography",
"size": "2560x1664",
"n": 6,
"controls": {}
}
Response
// Single image (n=1, default):
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp"
}
// Multiple images (n>1):
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-1.webp"
]
}
Response Fields - Text to Image V4 - Pro
| Field | Type | Description |
|---|---|---|
| output | string or array | URL(s) to the generated image(s). Returns a string when n=1, or an array of strings when n>1. Each URL points to a .webp image hosted on Cloudflare R2. |
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Text to Image V4 - Pro.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
400 Bad Request
{
"error": "Missing required field: prompt",
"status": 400
}
502 Bad Gateway
{
"error": "Failed to reach upstream API",
"status": 502
}
Notes
Recraft V4 Pro does not support the style, style_id, or negative_prompt parameters. Passing any of these parameters will result in a 400 Bad Request error — they are not silently ignored. Use the exact prompt text for best results. Image generation typically takes 30–50 seconds for single images. Multiple images or higher resolutions may take longer. The output field returns a string URL when n=1, and an array of string URLs when n>1. Generated images are in .webp format. Supported image dimensions include: 2048x2048, 3072x1536, 1536x3072, 2560x1664, 1664x2560, 2432x1792, 1792x2432, 2304x1792, 1792x2304, 1664x2688, 2560x1792, 1792x2560, 2688x1536, 1536x2688, and aspect ratios: 1:1, 2:1, 1:2, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 6:10, 14:10, 10:14, 16:9, 9:16.
Recraft V4 Pro Text To Image API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.25 |
| All Resolution | $0.04 |
Recraft V4 Pro Text to Image API Documentation
https://gateway.pixazo.ai/recraft
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
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| prompt | string | Yes | — | The text query that instructs the AI model on what kind of image to generate. |
| size | string | No | 1024x1024 | Image dimensions or aspect ratio. See Sizes section below. |
| n | integer | No | 1 | Number of images to generate. Default: 1 (minimum: 1, maximum: 6). |
| controls | object | No | — | Additional generation controls. |
Minimum Request
{
"prompt": "a red cat"
}
Full Request (all options)
{
"prompt": "Picture a sleek, futuristic car racing through a neon-lit cityscape, its engine humming efficiently as it blurs past digital billboards. The driver skillfully navigates the glowing streets, aiming for victory in this high-tech, adrenaline-fueled race of tomorrow.",
"size": "1536x768",
"n": 6,
}
Response
// Single image (n=1, default):
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp"
}
// Multiple images (n>1):
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-1.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-2.webp"
]
}
Response Fields - Text to Image V4 - Normal
| Field | Type | Description |
|---|---|---|
| output | string or array | URL(s) to the generated image(s). Returns a string for single image, array for multiple images. |
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Text to Image V4 - Normal.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
400 Bad Request
{
"error": "Missing required field: prompt",
"status": 400
}
502 Bad Gateway
{
"error": "Failed to reach upstream API",
"status": 502
}
Notes
Recraft V4 does not support the style, style_id, or negative_prompt parameters. Passing any of these parameters will result in a 400 Bad Request error — they are not silently ignored.
Image generation typically completes in 15–25 seconds. For high-resolution outputs or multiple images, processing may take slightly longer.
The output field returns a string URL when n=1, and an array of string URLs when n>1. Generated images are in .webp format.
Recraft V4 Pro Text to Image API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.25 |
| All Resolution | $0.04 |
Recraft v3 Image to Image (Image Editing) API Documentation
https://gateway.pixazo.ai/recraft
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
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| image | string (URL) | Yes | — | URL of the source image (PNG/JPG/WEBP). Max 5MB, max 16MP, max 4096px on any side. |
| prompt | string | Yes | — | The text query that instructs the AI model on what kind of transformation to apply. |
| strength | decimal | Yes | — | Transformation strength. 0 = no change, 1 = full transformation. (minimum: 0, maximum: 1). |
| style | string | No | Recraft V3 Raw | Style preset name. See Styles section below. |
| style_id | string | No | — | UUID of a custom style created via the Recraft platform. Mutually exclusive with style. |
| n | integer | No | 1 | Number of images to generate. Default: 1 (minimum: 1, maximum: 6). |
| negative_prompt | string | No | — | Text describing what to avoid in the generated image. |
Minimum Request
{
"image": "https://example.com/source.png",
"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 |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Common Error Responses
400 Bad Request
{
"error": "Missing required field: prompt",
"status": 400
}
502 Bad Gateway
{
"error": "Failed to reach upstream API",
"status": 502
}
Notes & Tips
Usage guidelines and important details for Recraft V3 Image-to-Image API.
- Image must be under 5MB and 16MP with max 4096px on any side.
- Response time typically 15–25 seconds depending on complexity and load.
- Style presets are case-sensitive. Use exact names from the Style list in the documentation.
- Up to 6 images can be generated per request using the
nparameter. - When
n=1(default), theoutputfield is a plain string URL. Whenn>1, theoutputfield is an array of string URLs. Handle both types in your client code. - Generated images are returned in
.webpformat and hosted on Cloudflare R2 storage.
Recraft v3 Image to Image (Image Editing) API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.25 |
| All Resolution | $0.04 |
Recraft v3 Text to Image API Documentation
https://gateway.pixazo.ai/recraft
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
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| prompt | string | Yes | — | The text query that instructs the AI model on what kind of image to generate. |
| style | string | No | Recraft V3 Raw | Style preset name. See Styles section below. |
| style_id | string | No | — | UUID of a custom style created via the Recraft platform. Mutually exclusive with style. |
| size | string | No | 1024x1024 | Image dimensions. Default: 1024x1024. See Sizes section below. |
| n | integer | No | 1 | Number of images to generate. Default: 1 (minimum: 1, maximum: 6). |
| negative_prompt | string | No | — | Text describing what to avoid in the generated image. |
| controls | object | No | — | Additional generation controls. |
Minimum Request
{
"prompt": "a red cat"
}
Full Request (all options)
{
"prompt": "red point siamese cat sitting on a windowsill, natural light, shot on Canon EOS R5",
"style": "Photorealism",
"size": "1280x1024",
"n": 4,
"negative_prompt": "dark, blurry, low quality"
}
Response
// Single image (n=1, default):
{
"output": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp"
}
// Multiple images (n>1):
{
"output": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-0.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-1.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-2.webp",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/generated-image-3.webp"
]
}
Response Fields - Text to Image V3
| Field | Type | Description |
|---|---|---|
| output | array/string | Array of image URLs if n>1, or single URL string if n=1. Each URL points to a generated image. |
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Text to Image V3.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses - Text to Image V3
400 Bad Request
{
"error": "Missing required field: prompt",
"status": 400
}
502 Bad Gateway
{
"error": "Failed to reach upstream API",
"status": 502
}
Notes & Tips - Text to Image V3
Usage considerations for Recraft V3.
- Generated images are rendered at 1MP resolution regardless of specified size.
- Style names are case-sensitive and must match exactly from the supported presets.
- Processing time is typically 10–15 seconds for single images. Multiple images or complex prompts may take slightly longer.
- Multiple images (
n>1) may be generated asynchronously with slight time delays between outputs. - The
outputfield returns a string URL whenn=1, and an array of string URLs whenn>1. - Generated images are in
.webpformat and hosted on Cloudflare R2.
Recraft v3 Text to Image API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.25 |
| All Resolution | $0.04 |