Recraft: Recraft V4 Pro
Recraft V4 Pro generates 2K raster images for detailed compositions, photorealism, illustration and print-oriented creative work. It is the higher-resolution V4 edition, with text briefs, optional style inputs and a separate image-to-image workflow.
About the model
This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.
Recraft V4 Pro is the higher-resolution raster model in Recraft’s V4 family. V4 focuses on visual judgement, balanced composition, coherent colour and careful interpretation of creative direction. The producer positions Pro for finer detail, more realistic complex scenes and substantial production visuals. Use it for a detailed illustration, editorial image, poster concept or another asset that benefits from a larger raster result. It remains separate from the later V4.1 model and from V4 Pro Vector’s SVG output.
The exact producer code is recraftv4_pro. The documented output is 2K raster in lossless WebP or PNG: 2048 × 2048 pixels for a square, 2688 × 1536 for 16:9 and 1664 × 2560 for 2:3. Other supported ratios have their own dimensions. Choose an aspect ratio for the intended layout or an exact allowed size; an arbitrary pixel size is not part of the documented generation contract. Standard V4 has a smaller 1K raster output, while vector models have no fixed pixel resolution.
V4 can interpret a short prompt for exploration or a structured prompt for a controlled result. For a specific art direction, the manufacturer guide moves from subject and environment to framing, attributes, spatial relationships, lighting, depth and mood. For an editorial product image, request a dramatic vertical photograph of a sculptural chair, brushed-metal surfaces, side lighting, a quiet dark background and space above the object for a title. Naming those relationships makes the intended composition clearer than a general request for a premium image.
The family’s creative range includes narrative illustration, photorealistic scenes and dimensional visuals with material and lighting cues. A 3D-looking result is still an image, not an editable 3D scene. For a graphic poster, specify the visual layers and their interaction: background, illustration or photograph, headline hierarchy and supporting text. V4 is positioned for readable short and medium-length phrases, but the finished spelling and hierarchy should be inspected rather than inferred from the model name.
The current generation reference permits prompts up to 10,000 characters, one to six outputs, a random seed and preferred-colour and background-colour controls. Optional custom styles or compatible reference images can guide appearance with flexible or precise matching. The model does not accept the older V3 controls negative_prompt, curated styles, text_layout, artistic_level or no_text. Describe the intended final image in the positive prompt and keep the subject, layout and colour requirements explicit. For reference-style generation, use one to ten PNG, JPG or WebP images, no more than 64 MB in total and under 20 MB each. Each reference needs a shortest side of at least 256 pixels, a longest side of no more than 4,096 pixels and a resolution of no more than 16 megapixels. Use either these references or a compatible saved style, rather than both.
Recraft documents a separate image-to-image operation for V4. It combines an existing image and a prompt with strength from 0 to 1 to control the degree of change, and does not accept V4 custom style controls in that operation. Prepare the source within the producer image-input limits and state the attributes that should carry into the new result. For a larger final asset, check fine details, crop and lettering at the intended size. Pro’s additional raster detail supports that inspection, while the image remains a generated interpretation of the supplied creative brief. For image-to-image, supply PNG, JPG, WebP or SVG under 20 MB, no more than 16 megapixels, with both sides between 256 and 4,096 pixels.
Ailoot Ultra · Images POST /v1/images/generations recraft/recraft-v4-pro
recraft/recraft-v4-proOverview
Recraft V4 Pro generates 2K raster images for detailed compositions, photorealism, illustration and print-oriented creative work. It is the higher-resolution V4 edition, with text briefs, optional style inputs and a separate image-to-image workflow.
- Accepted inputs
- Text · Images
- Results
- Images
Available in Ailoot · inputs & methods
Ailoot Ultra · Images POST /v1/images/generations
- Input types
text,image- Output types
image- Output format
- Image file
| Field | Type | Requirement | Values & limits | Default |
|---|---|---|---|---|
Fieldmodel | Typestring | RequirementRequired | Values & limits recraft/recraft-v4-pro | Default— |
Fieldprompt | Typestring | RequirementRequired | Values & limits Minimum length: 1 | Default— |
Fieldn | Typeinteger | RequirementOptional | Values & limits Minimum: 1 Maximum: 6 | Default— |
Fieldaspect_ratio | Typestring | RequirementOptional | Values & limits 1:1, 4:3, 3:4, 16:9, 9:16, auto | Default— |
Fieldinput_references | Typearray | RequirementOptional | Values & limits Minimum items: 0 Maximum items: 1 | Default— |
Input material combinations
Text to image · Required: prompt
Method parameters and lifecycle
| Parameter | Contract |
|---|---|
Parametercontent_type | Contractapplication/json |
Parameterrequired | Contractmodel, prompt |
Parametermaterial_types | Contracttext, image |
Parameteroptional_controls | Contractaspect_ratio, n, input_references |
Parameterexact_supported_parameters | Contract{"aspect_ratio":{"type":"enum","values":["1:1","4:3","3:4","16:9","9:16","auto"]},"n":{"type":"range","min":1,"max":6},"input_references":{"type":"range","min":0,"max":1}} |
Parameterreference_material_rule | ContractActual customer image references only; provider endpoint conditions govern them. |
Method aliases: /v1/images
Lifecycle: synchronous_result_then_owned_library
GET /v1/media/tasks/{task_id} · actual returned task_id or media library record
GET /v1/media/assets/{asset_id}/content
GET /v1/media/assets
GET /v1/media/assets/{asset_id}
Use the exact model and documented input fields.
Keep the complete response, every actual output and original returned IDs.
Pricing
How the final charge is calculated
The displayed rates estimate the cost before generation. The final charge is calculated from the cost recorded for the original generation. Measured output duration and forecast quantities are not the final billable quantity.
Tariff references do not add request options. Supported parameters are listed for the selected method.
- Fast mode
- Not specified When fast mode is selected
- Flex mode
- Not specified When flex mode is selected
- Maximum reasoning effort
- Not specified When maximum reasoning effort uses the default adjustment
Estimated rates for comparison
Prices by configuration
Match each charge to the conditions shown. Use one rate for each set of alternative configurations.
| Configuration | Rate schedule | Forecast quantity | Billing unit | Charge |
|---|---|---|---|---|
| ConfigurationBase token rates | Rate scheduleBase rate | Forecast quantity— | Billing unit— | Charge Input · Input tokens · Estimate for comparison only — / 1K tokens Output · Output tokens · Estimate for comparison only — / 1K tokens Input · Cache read · Estimate for comparison only — / 1K tokens Input · Cache write · Estimate for comparison only — / 1K tokens Input · Cache write, 1 hour · Estimate for comparison only — / 1K tokens |
| ConfigurationUltra | Rate schedule— | Forecast quantity— | Billing unitper image output | Charge Output · image output · Estimate for comparison only $0.5 per image output |
| ConfigurationEstimated generation cost | Rate schedule— | Forecast quantityone generation estimate | Billing unit— | Charge Output · Estimated generation cost · Estimate for comparison only $0.5 estimate before generation This estimate is not an additional charge or a fixed rate for the completed generation. |
Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. How reservation and settlement work →
Reference tariff details
Model-level reference schedules do not change method selection, quotes or charges. Active charges use the selected Ailoot method rates.
Image pricing configurations
Prices by configuration
| Configuration | Billing conditions | Charge |
|---|---|---|
| ConfigurationOutput image | Billing conditionsNo pricing variant is declared. | Charge Output · Output image $0.5 per image Equivalent listings describe the same charge; they do not add a second fee. |
Example requests
Ailoot Ultra · Images
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p={'model': 'recraft/recraft-v4-pro', 'prompt': 'a red panda astronaut floating in space, studio lighting'}
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/images/generations \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json, os, subprocess
from pathlib import Path
from urllib.parse import urlsplit, urljoin
def save_images(items):
if not items: raise SystemExit("No completed images; retain the full response")
for index, item in enumerate(items):
encoded=item.get("b64_json")
uri=item.get("url", "")
if not encoded and uri.startswith("data:image/"):
header, separator, encoded=uri.partition(",")
if not separator or ";base64" not in header: raise SystemExit("Unsupported image data URI")
if encoded:
raw=base64.b64decode(encoded,validate=True)
elif uri:
uri=urljoin("https://api.ailoot.ai",uri)
parsed=urlsplit(uri)
if parsed.scheme!="https" or not parsed.netloc or parsed.username or parsed.password:
raise SystemExit("Invalid returned image URL")
owned=parsed.netloc=="api.ailoot.ai" and parsed.path.startswith("/v1/media/assets/") and parsed.path.endswith("/content")
args=["curl","--fail-with-body","--silent","--show-error",uri]
if owned: args += ["-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"]]
temporary=Path(f"image-{index}.bin")
subprocess.run(args+["-o",str(temporary)],check=True)
raw=temporary.read_bytes()
temporary.unlink()
else: raise SystemExit("Image has neither bytes nor URL")
if not raw: raise SystemExit("Empty image result")
ext="png" if raw.startswith(b"\x89PNG") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else "svg" if raw.lstrip().startswith((b"<svg",b"<?xml")) else "bin"
Path(f"image-{index}.{ext}").write_bytes(raw)
print("Every returned image saved; complete response metadata retained")
save_images(json.loads(Path("result.json").read_text())["data"])
PY_RESULT
from openai import OpenAI
import base64, json, os, subprocess
from pathlib import Path
from urllib.parse import urlsplit, urljoin
def save_images(items):
if not items: raise SystemExit("No completed images; retain the full response")
for index, item in enumerate(items):
encoded=item.get("b64_json")
uri=item.get("url", "")
if not encoded and uri.startswith("data:image/"):
header, separator, encoded=uri.partition(",")
if not separator or ";base64" not in header: raise SystemExit("Unsupported image data URI")
if encoded:
raw=base64.b64decode(encoded,validate=True)
elif uri:
uri=urljoin("https://api.ailoot.ai",uri)
parsed=urlsplit(uri)
if parsed.scheme!="https" or not parsed.netloc or parsed.username or parsed.password:
raise SystemExit("Invalid returned image URL")
owned=parsed.netloc=="api.ailoot.ai" and parsed.path.startswith("/v1/media/assets/") and parsed.path.endswith("/content")
args=["curl","--fail-with-body","--silent","--show-error",uri]
if owned: args += ["-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"]]
temporary=Path(f"image-{index}.bin")
subprocess.run(args+["-o",str(temporary)],check=True)
raw=temporary.read_bytes()
temporary.unlink()
else: raise SystemExit("Image has neither bytes nor URL")
if not raw: raise SystemExit("Empty image result")
ext="png" if raw.startswith(b"\x89PNG") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else "svg" if raw.lstrip().startswith((b"<svg",b"<?xml")) else "bin"
Path(f"image-{index}.{ext}").write_bytes(raw)
print("Every returned image saved; complete response metadata retained")
request={'model': 'recraft/recraft-v4-pro', 'prompt': 'a red panda astronaut floating in space, studio lighting'}
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
result=client.images.generate(**request)
Path("sdk-result.txt").write_text(str(result),encoding="utf-8")
save_images([{"b64_json":getattr(item,"b64_json",None),"url":getattr(item,"url",None)} for item in result.data])
import OpenAI from "openai";
import { readFileSync, writeFileSync } from "node:fs";
const key=process.env.AILOOT_API_KEY;
if(!key) throw new Error("Set your actual Ailoot API key");
const client=new OpenAI({baseURL:"https://api.ailoot.ai/v1",apiKey:key,maxRetries:0});
const request={"model": "recraft/recraft-v4-pro", "prompt": "a red panda astronaut floating in space, studio lighting"};
const result=await client.images.generate(request);
writeFileSync("sdk-result.json",JSON.stringify(result,null,2));
if(!result.data?.length) throw new Error("No completed images");
for(let index=0;index<result.data.length;index++) {
const item=result.data[index];let encoded=item.b64_json,uri=item.url||"",raw;
if(!encoded && uri.startsWith("data:image/")) {
const comma=uri.indexOf(",");if(comma<0 || !uri.slice(0,comma).includes(";base64")) throw new Error("Unsupported image data URI");
encoded=uri.slice(comma+1);
}
if(encoded) {
if(encoded.length%4!==0 || !/^[A-Za-z0-9+/]*={0,2}$/.test(encoded)) throw new Error("Invalid Base64");
raw=Buffer.from(encoded,"base64");
} else if(uri) {
const u=new URL(uri,"https://api.ailoot.ai");
if(u.protocol!=="https:" || u.username || u.password) throw new Error("Invalid returned URL");
const owned=u.origin==="https://api.ailoot.ai" && u.pathname.startsWith("/v1/media/assets/") && u.pathname.endsWith("/content");
const response=await fetch(u,{headers:owned?{Authorization:"Bearer "+key}:{},redirect:"manual"});
if(!response.ok) throw new Error("Image content download failed: "+response.status);
raw=Buffer.from(await response.arrayBuffer());
} else throw new Error("Image has neither bytes nor URL");
if(!raw.length) throw new Error("Empty image result");
const ext=raw.subarray(0,4).equals(Buffer.from([137,80,78,71]))?"png":raw[0]===255&&raw[1]===216?"jpg":raw.toString("ascii",0,4)==="RIFF"&&raw.toString("ascii",8,12)==="WEBP"?"webp":raw.toString("utf8").trimStart().startsWith("<svg")||raw.toString("utf8").trimStart().startsWith("<?xml")?"svg":"bin";
writeFileSync(`image-${index}.${ext}`,raw);
}
console.log("Every returned image saved; sdk-result.json retains complete metadata");
Receive and save results
Ailoot Ultra · Images
Download each returned image or save its Base64 contents
GET /v1/media/tasks/{task_id}GET /v1/media/assets/{asset_id}/contentGET /v1/media/assetsGET /v1/media/assets/{asset_id}
Keep all completed results
Save every completed image; retrieve each returned URL or decode its Base64 contents.
Retain every data item and complete usage; own and save all actual returned images. No invented URLs or IDs.
If the original response needs checking
If an image generation or edit result requires a check, keep the original operation_id/X-Client-Request-ID and returned result information. Recover existing owned results through the media library using actual task_id or asset_id values. Do not resubmit the generation/edit request or construct a polling URL from operation_id.
Response fields
| Field | Type |
|---|---|
Fieldcreated | Typeinteger |
Fielddata[].url | Typestring |
Fielddata[].b64_json | Typebase64 string |
Fieldusage | Typeobject |
Aliases
Model aliases
Ailoot Ultra recraft/recraft-v4-pro
Method path aliases
/v1/images
Related caller IDs
FAQ · Recraft: Recraft V4 Pro
- What inputs and results are available?
POST /v1/images/generations·recraft/recraft-v4-pro:text,image→image- Which fields does the request use?
POST /v1/images/generations·recraft/recraft-v4-pro:model,prompt,n,aspect_ratio,input_references- What limits apply?
POST /v1/images/generations·recraft/recraft-v4-pro:n.minimum:1;n.maximum:6