Recraft: Recraft V4 Styles
Recraft V4 Styles generates 1K raster images in a visual style defined by references. It is designed for everyday brand and campaign work where each new subject should retain the same rendering, texture and overall look.
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 Styles is the standard raster edition of Recraft’s dedicated style-consistent generation family. It creates a new image from a text prompt while following a style established by reference assets. The model is useful for a series of illustrations, banners or product scenes that should share a recognisable visual treatment. The reference carries the rendering, texture and colour logic; the prompt introduces the subject and the scene for each new asset.
The producer lists 1K raster output in lossless WebP or PNG. The square size is 1024 × 1024 pixels, and the documented 16:9 size is 1344 × 768; portrait and other supported ratios use their own sizes. This edition is distinct from Styles Pro’s 2K raster output and from the SVG-producing Vector models. Choose the aspect ratio for the final layout rather than assuming the label 1K means every image has the same width and height.
A style is mandatory. Use one to ten PNG, JPG or WebP references or a compatible style saved from earlier style creation. The documented workflow does not accept a saved style identifier and new references together. References can be existing brand or campaign assets rather than images originally generated by Recraft. They must be under 20 MB per file and no more than 64 MB altogether. There is no separate user-run training task before the style can be used. Each reference must have a shortest side of at least 256 pixels, a longest side of no more than 4,096 pixels and a total resolution of no more than 16 megapixels.
Start with one strong reference, or several references that already agree on the visual language. Consistent references help apply the style beyond one object or pose; an unrelated mood board can introduce competing motifs. Flexible matching is the default and leaves more interpretive room; precise matching follows the reference’s rendering, palette, composition and lighting more closely. Exact colour reproduction is still not guaranteed.
For a banner series, describe a courier placing a parcel on a doorstep, a calm horizontal composition and open space on one side for later text. Subsequent briefs can change the event or camera angle while retaining the same style. The producer permits prompts up to 10,000 characters, preferred colours, a desired background colour, a random seed and one to six images. It does not support negative_prompt, curated style names or text_layout, so describe the intended subject and layout directly in the brief.
The Styles line does not offer image-to-image or inpainting. A style reference guides a newly generated image rather than guaranteeing preservation of the reference’s objects or pixels. If the set looks repetitive, revise pose, action, framing or scene detail instead of adding a conflicting reference. Evaluate each result in its intended layout for subject clarity, useful space and coherent rendering, then keep the same compatible style for the next asset. That makes the model practical for a repeatable visual language with changing content.
Ailoot Ultra · Images POST /v1/images/generations recraft/recraft-v4-styles
recraft/recraft-v4-stylesOverview
Recraft V4 Styles generates 1K raster images in a visual style defined by references. It is designed for everyday brand and campaign work where each new subject should retain the same rendering, texture and overall look.
- 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
| Field | Type | Requirement | Values & limits | Default |
|---|---|---|---|---|
Fieldmodel | Typestring | RequirementRequired | Values & limits recraft/recraft-v4-styles | Default— |
Fieldprompt | Typestring | RequirementRequired | Values & limits Minimum length: 1 | Default— |
Fieldaspect_ratio | Typestring | RequirementOptional | Values & limits 1:1, 2:1, 1:2, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 16:9, 9:16, auto | Default— |
Fieldn | Typeinteger | RequirementOptional | Values & limits Minimum: 1 Maximum: 6 | Default— |
Fieldinput_references | Typearray | RequirementOptional | Values & limits Minimum items: 1 Maximum items: 10 | Default— |
Fieldprovider | Typeobject | RequirementOptional | Values & limits | Default— |
Method parameters and lifecycle
| Parameter | Contract |
|---|---|
Parametercontent_type | Contractapplication/json |
Parameterrequired | Contractmodel, prompt |
Parametermaterial_types | Contracttext, image |
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}
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 | Billing conditions | Charge |
|---|---|---|---|---|---|
| ConfigurationBase token rates | Rate scheduleBase rate | Forecast quantity— | Billing unit— | Billing conditions— | 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 |
| ConfigurationInput reference | Rate schedule— | Forecast quantity— | Billing unitper request | Billing conditionsStyle creation when generating with style references; once per request, in addition to the output-image price. | Charge Input · Input reference · Estimate for comparison only $0.01 per request |
| Configurationoutput image | Rate schedule— | Forecast quantity— | Billing unitper output image | Billing conditions— | Charge Output · output image · Estimate for comparison only $0.07 per output image |
| ConfigurationEstimated generation cost | Rate schedule— | Forecast quantityone generation estimate | Billing unit— | Billing conditions— | Charge Output · Estimated generation cost · Estimate for comparison only $0.07 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 →
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-styles', '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
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}
Other content reads
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/media/assets \
-H "Authorization: Bearer $AILOOT_API_KEY" -o owned-assets.json
# Preserve every returned asset and follow its exact signed content URL. Do not construct a signed token.
Keep all completed results
Save every completed image; retrieve each returned URL or decode its Base64 contents.
Retain the complete response and headers, every actual output, original returned identifiers and all usage fields. Recover the original operation without submitting creation again.
If the original response needs checking
Keep the returned X-Client-Request-ID for reconciliation. Read only actual returned task_id/asset_id values or the owned media library; never build a task URL from the operation ID and never resubmit creation.
Response fields
| Field | Type |
|---|---|
Fieldcreated | Type |
Fielddata[].url | Type |
Fielddata[].b64_json | Type |
Fieldusage | Type |
Aliases
Model aliases
Ailoot Ultra recraft/recraft-v4-styles
Method path aliases
/v1/images
Related caller IDs
FAQ · Recraft: Recraft V4 Styles
- What inputs and results are available?
POST /v1/images/generations·recraft/recraft-v4-styles:text,image→image- Which fields does the request use?
POST /v1/images/generations·recraft/recraft-v4-styles:model,prompt,aspect_ratio,n,input_references,provider- What limits apply?
POST /v1/images/generations·recraft/recraft-v4-styles:n.minimum:1;n.maximum:6