> ## Documentation Index
> Fetch the complete documentation index at: https://www.recraft.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Recraft V4

> Recraft V4 raster and SVG models: design taste, prompt accuracy, and production-grade vector output, from $0.04 per image.

Recraft V4, released in February 2026, is a ground-up rebuild of the Recraft model line, focused on design taste, prompt accuracy, and output quality at any size. It produces intentional, non-stock compositions and production-grade vector images.

> [card] \$0.04
>
> per image, standard raster

> [card] 1K / 2K
>
> WebP, PNG, or SVG

> [card] 10,000
>
> characters of prompt

> [card] recraftv4
>
> `model` value

## Try it

Create a token in [API tokens](https://www.recraft.ai/app/api/api-keys) (it needs a positive API units balance) and set it once per terminal session:

```bash theme={null}
export RECRAFT_API_TOKEN=your_token
```

Then run:

```bash cURL theme={null}
curl https://external.api.recraft.ai/v1/images/generations \
  -H "Authorization: Bearer $RECRAFT_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "two race cars on a track",
    "model": "recraftv4"
  }'
```

```python Python theme={null}
# pip install requests
import os

import requests

response = requests.post(
    'https://external.api.recraft.ai/v1/images/generations',
    headers={'Authorization': f"Bearer {os.environ['RECRAFT_API_TOKEN']}"},
    json={
        'prompt': 'two race cars on a track',
        'model': 'recraftv4',
    },
)
if not response.ok:
    raise SystemExit(f'{response.status_code}: {response.text}')
print(response.json()['data'][0]['url'])
```

```python Python (OpenAI SDK) theme={null}
# pip install openai
import os

from openai import OpenAI

client = OpenAI(
    base_url='https://external.api.recraft.ai/v1',
    api_key=os.environ['RECRAFT_API_TOKEN'],
)

response = client.images.generate(
    prompt='two race cars on a track',
    model='recraftv4',
)
print(response.data[0].url)
```

```javascript JavaScript theme={null}
// Node.js 18+, run as an ES module (file.mjs)
const response = await fetch('https://external.api.recraft.ai/v1/images/generations', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RECRAFT_API_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    prompt: 'two race cars on a track',
    model: 'recraftv4',
  }),
});
if (!response.ok) throw new Error(await response.text());
const result = await response.json();
console.log(result.data[0].url);
```

## Response

```json theme={null}
{
  "created": 1759140000,
  "credits": 40,
  "data": [
    {
      "image_id": "0e6a1b8c-5b1f-4a8e-9f3a-2c7d4e8b9a10",
      "url": "https://..."
    }
  ]
}
```

* `data` has one entry per image (`n`). Download each image from its `url`.
* Image URLs are temporary: files are kept for about 24 hours, so download them. See [Limits and sizes](https://www.recraft.ai/docs/api-reference/appendix.md#image-storage).
* `credits` is the number of API units charged for the request.
* Pass `"response_format": "b64_json"` to get the image bytes inline, or `"multipart"` for the lowest latency. See [Image inputs and results](https://www.recraft.ai/docs/api-reference/image-inputs-and-results.md#image-results).

## Parameters

| Parameter | Type, default | Description |
| - | - | - |
| `prompt` | string, **required** | What to generate. Up to 10,000 characters. |
| `model` | string | `recraftv4` or another of the [variants](#variants) below. Without it the API uses `recraftv4_1`. |
| `size` | string, auto | Aspect ratio (`1:1`, `16:9`, `3:4`, ...) or exact size (`1024x1024`). Picked from the prompt when omitted. See [supported sizes](https://www.recraft.ai/docs/api-reference/appendix.md#image-sizes). |
| `n` | integer, `1` | Number of images, 1 to 6. |
| `style_id` | UUID | Apply a [custom style](https://www.recraft.ai/docs/api-reference/styles.md#custom-styles). |
| `response_format` | string, `url` | `url`, `b64_json`, or `multipart`. |
| `image_format` | string, `webp` | `webp` (lossless) or `png`. Ignored for vector output, which is always SVG. |

> [accordion] More parameters
>
> | Parameter | Type, default | Description |
> | - | - | - |
> | `style_reference_urls` | array of strings | Up to 10 image URLs to use as style references instead of `style_id`. See [Style references](https://www.recraft.ai/docs/api-reference/endpoints.md#style-references). |
> | `style_match` | string | `flexible` or `precise`: how closely to follow the style. See [Style match](https://www.recraft.ai/docs/api-reference/styles.md#style-match). |
> | `random_seed` | integer | Seed for reproducible results. |
> | `controls.colors` | array of colors | Preferred colors, e.g. `[{"rgb": [255, 102, 0]}]`. See [Colors](https://www.recraft.ai/docs/api-reference/endpoints.md#colors). |
> | `controls.background_color` | color | Desired background color, e.g. `{"rgb": [255, 255, 255]}`. |
>
> Not supported by V4: `negative_prompt`, `style` (curated styles), `text_layout`, and the `artistic_level` and `no_text` controls.

## Variants

| `model` | Output | Price per image |
| - | - | - |
| `recraftv4` | Raster, 1K | \$0.04 |
| `recraftv4_vector` | Vector, SVG | \$0.08 |
| `recraftv4_pro` | Raster, 2K | \$0.25 |
| `recraftv4_pro_vector` | Vector, SVG | \$0.30 |

* **Pro** variants generate at 2K with finer detail, improving anatomy and realism in complex scenes. Use them for print-ready visuals.
* **Vector** variants return editable SVG.

## Capabilities

| Capability | Support |
| - | - |
| [Generate image](https://www.recraft.ai/docs/api-reference/endpoints.md#generate-image) | Yes |
| [Image to image](https://www.recraft.ai/docs/api-reference/tools/image-to-image.md) | Yes |
| [Create style](https://www.recraft.ai/docs/api-reference/endpoints.md#create-style) | Yes |
| Vector output | Yes, `_vector` variants |
| [Styles](https://www.recraft.ai/docs/api-reference/styles.md) | Custom styles and style references |
| [Controls](https://www.recraft.ai/docs/api-reference/endpoints.md#controls) | Partial: `colors` and `background_color` |
| Negative prompt, curated styles, text layout | No, see [Recraft V3](https://www.recraft.ai/docs/api-reference/models/recraft-v3.md) |

> [!NOTE]
>
> For style-driven work, see [Recraft V4 Styles](https://www.recraft.ai/docs/api-reference/models/recraft-v4-styles.md): a dedicated family that always generates against a style, at a lower price.

## Examples

> [accordion] Vector illustration
>
> ```bash theme={null}
> curl https://external.api.recraft.ai/v1/images/generations \
>   -H "Authorization: Bearer $RECRAFT_API_TOKEN" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "prompt": "flat illustration of a lighthouse at sunset",
>     "model": "recraftv4_vector",
>     "size": "16:9"
>   }'
> ```
>
> The `url` points to an SVG file.

> [accordion] Print-ready poster in 2K
>
> ```bash theme={null}
> curl https://external.api.recraft.ai/v1/images/generations \
>   -H "Authorization: Bearer $RECRAFT_API_TOKEN" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "prompt": "jazz festival poster, bold geometric shapes, warm palette",
>     "model": "recraftv4_pro",
>     "size": "2:3",
>     "image_format": "png"
>   }'
> ```

> [accordion] With a custom style
>
> A style works only with the model it was created for, so create it with `"model": "recraftv4"`. This creates the style (\$0.005) and generates with it:
>
> ```bash theme={null}
> STYLE_ID=$(curl -s https://external.api.recraft.ai/v1/styles \
>   -H "Authorization: Bearer $RECRAFT_API_TOKEN" \
>   -H "Content-Type: application/json" \
>   -d '{"model": "recraftv4", "image_urls": ["https://cdn.prod.website-files.com/655727fe69827d9a402de12c/679b82f54ef9617939df9d8e_motorcycle--going-fast.png"]}' \
>   | python3 -c 'import json, sys; print(json.load(sys.stdin)["id"])')
>
> curl https://external.api.recraft.ai/v1/images/generations \
>   -H "Authorization: Bearer $RECRAFT_API_TOKEN" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "prompt": "a cozy reading corner",
>     "model": "recraftv4",
>     "style_id": "'"$STYLE_ID"'"
>   }'
> ```
>
> Reuse the same `STYLE_ID` for later requests. To skip the separate step, pass `style_reference_urls` in the generation request instead.

## Related

> [card] [All models](https://www.recraft.ai/docs/api-reference/models/overview.md)
>
> The whole lineup with prices and best-fit use cases.

> [card] [Recraft V4.1](https://www.recraft.ai/docs/api-reference/models/recraft-v4-1.md)
>
> The next generation and the API default.

> [card] [Endpoints](https://www.recraft.ai/docs/api-reference/endpoints.md)
>
> Full request reference for every operation.

> [card] [What's new in V4](https://www.recraft.ai/docs/recraft-models/recraft-V4.md)
>
> What the V4 generation changed, and how to pick a model.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.