Recraft V2 API
Recraft V2 generates images and SVG graphics, with brand consistency controls and a curated style library for icons, illustrations, and design work.
Recraft V2 generates images, vector images, icons, illustrations, and graphics. It supports brand consistency and brand color inputs across generated images, as well as vector image generation with SVG output. Its curated style library includes Plastic3D, Linocut, Grain, and Vector Art. Recraft described it as a breakthrough in human anatomical accuracy at the time of release, and it was the first model trained entirely from scratch by Recraft.
The model is suited to creating brand-consistent vector icons and graphics, app UI and presentation graphics in Plastic3D, packaging in Linocut, blog and book illustrations in Grain, and logos in Vector Art. It can maintain line width, corner shapes, and other stylistic rules across multiple icons. Vector Icon Outline produces consistent results by default. For Vector Icon and Pictogram styles, however, individually generated icons may vary; consistency requires creating a new style or using the Image Set tool with Recraft V2 Icon selected.
Compared with Recraft V3, Recraft V2 has less prompt adherence and text accuracy. The standard version takes approximately8 seconds to generate an image, while Recraft V2 Vector takes about14 seconds. Recraft V2 has20 billion parameters.
Updated:
MODEL ID
- Generated images
- $0.022/ 1 images
- Released
- Context
- 65.536K
- Max output
- 58.982K
- Input
- Text
- Output
- Image
Highlights
- Image and SVG generation
- Brand colors and consistency
- Curated style library
- Consistent icon design rules
- 20 billion parameters
Providers
Compare API prices across providers. Select a provider to view all charges and conditions.
| Uptime | ||
|---|---|---|
| $0.022 |
Historical observations are not a live health check. Missing data does not mean an outage.
Best for
Quick Start
Submit an image task, poll its status, then save the images. These examples use curl and Python 3 (standard library only).
POST https://openapi.felo.ai/api/v1/images/generations
1Get your API key
Create a key from your Felo API Platform account and set it as an environment variable.
export FELO_API_KEY="YOUR_API_KEY"2Make your first request
Optional values vary by model. This example leaves them unset; confirm supported values in Playground before adding them. Request fields sit alongside model and prompt, without an input wrapper.
curl --fail-with-body --max-time 60 "https://openapi.felo.ai/api/v1/images/generations" \
-H "Authorization: Bearer $FELO_API_KEY" \
-H "Content-Type: application/json" \
-o created.json \
-d '{
"prompt": "A studio product photo of a ceramic coffee cup on warm linen, soft morning light",
"model": "recraft-v2"
}'3Poll the task
Submission returns task_id. Poll every 3 seconds while queued or running; stop on succeeded, failed or interrupted. This example stops waiting after 30 minutes. Keep created.json to resume querying the same task instead of submitting again.
python3 - <<'PY'
import json, os, time
from pathlib import Path
from urllib.parse import quote
from urllib.request import Request, urlopen
task = json.loads(Path("created.json").read_text())
task_id = task["task_id"]
url = "https://openapi.felo.ai/api/v1/images/generations/" + quote(task_id, safe="")
headers = {"Authorization": "Bearer " + os.environ["FELO_API_KEY"]}
deadline = time.monotonic() + 1800
while task["status"] in ("queued", "running"):
if time.monotonic() >= deadline:
raise TimeoutError(f"Keep task_id={task_id} to resume polling")
time.sleep(3)
with urlopen(Request(url, headers=headers), timeout=60) as response:
task = json.load(response)
if task.get("task_id") != task_id or task.get("kind") != "image":
raise ValueError("Unexpected task response")
print(task["status"])
if task["status"] != "succeeded":
raise RuntimeError(task.get("error") or task["status"])
if not task.get("outputs"):
raise ValueError("Task succeeded without image outputs")
Path("task.json").write_text(json.dumps(task))
print("Saved task.json")
PY4Download the output
After success, save outputs from task.json. Results may be HTTPS URLs, URL objects or b64_json. Download signed URLs promptly; media downloads do not use your API key.
python3 - <<'PY'
import base64, json
from pathlib import Path
from urllib.request import urlopen
task = json.loads(Path("task.json").read_text())
if task.get("status") != "succeeded" or not task.get("outputs"):
raise ValueError("No completed image outputs")
extensions = {"image/png": ".png", "image/jpeg": ".jpg", "image/webp": ".webp", "image/gif": ".gif", "image/avif": ".avif"}
for index, output in enumerate(task["outputs"], 1):
item = output if isinstance(output, dict) else {}
url = output if isinstance(output, str) else item.get("url") or item.get("unsigned_url")
mime = item.get("media_type") or "image/png"
if url and url.startswith("https://"):
with urlopen(url, timeout=60) as response:
data = response.read()
mime = response.headers.get_content_type()
elif url and url.startswith("data:image/") and ";base64," in url:
header, encoded = url.split(",", 1)
mime = header[5:].split(";", 1)[0]
data = base64.b64decode(encoded, validate=True)
elif item.get("b64_json"):
data = base64.b64decode(item["b64_json"], validate=True)
else:
raise ValueError("Unrecognized image output")
path = Path(f"image-{index}" + extensions.get(mime, ".bin"))
path.write_bytes(data)
print(path)
PYSupported parameters
- n
- aspect_ratio
Prefer the full reference?
API reference →Frequently asked questions
What is Recraft V2?
Recraft V2 generates images, vector images, icons, illustrations, and graphics. It supports brand consistency and brand color inputs across generated images, as well as vector image generation with SVG output. Its curated style library includes Plastic3D, Linocut, Grain, and Vector Art. Recraft described it as a breakthrough in human anatomical accuracy at the time of release, and it was the first model trained entirely from scratch by Recraft. The model is suited to creating brand-consistent vector icons and graphics, app UI and presentation graphics in Plastic3D, packaging in Linocut, blog and book illustrations in Grain, and logos in Vector Art. It can maintain line width, corner shapes, and other stylistic rules across multiple icons. Vector Icon Outline produces consistent results by default. For Vector Icon and Pictogram styles, however, individually generated icons may vary; consistency requires creating a new style or using the Image Set tool with Recraft V2 Icon selected. Compared with Recraft V3, Recraft V2 has less prompt adherence and text accuracy. The standard version takes approximately8 seconds to generate an image, while Recraft V2 Vector takes about14 seconds. Recraft V2 has20 billion parameters.
How is usage billed?
Your bill depends on the provider you use, its prices and your usage. Longer inputs or other conditions may have different prices.
What kinds of inputs and outputs does Recraft V2 support?
It generates images, vector images, icons, illustrations, and graphics. It supports brand color inputs and vector image output in SVG.
What are its context and output limits?
The provided information does not specify a context length or output limit.
What tasks is Recraft V2 suited for?
It is suited to brand-consistent vector graphics, app UI and presentation graphics, packaging, blog and book illustrations, and logos.
How does Recraft V2 compare with Recraft V3?
Recraft V2 has less prompt adherence and text accuracy than Recraft V3.
How can it keep multiple icons visually consistent?
It supports consistent line width, corner shapes, and other stylistic rules. For Vector Icon and Pictogram styles, create a new style or use the Image Set tool with Recraft V2 Icon selected.
Related models
Recraft V4.1 Flash V2
RecraftImagerecraft-v4.1-flash-v2Recraft V4.1 Flash V2 is a fast text-to-image model for rapid raster visual exploration, prototyping, and high-volume generation.
Output
image
Generated images
$0.007 / 1 images
Recraft V4.1 Flash V2 (free)
RecraftImagerecraft-v4.1-flash-v2:freeRecraft V4.1 Flash V2 is a fast text-to-image model for rapid creative exploration, prompt iteration, and high-volume image variation.
Output
image
Context
65.536K
Generated images
$0 / 1 images
Recraft V4.1 Flash
RecraftImagerecraft-v4.1-flashRecraft V4.1 Flash is Recraft's fastest image model, generating 1K raster images from prompts in about 1.3 seconds via API.
Output
image
Generated images
$0.007 / 1 images