colorsarray
An array of preferable colors
Default: []
recraft/recraft/v4.1/utilityRecraft V4.1 Utility by Recraft - generate stunning images from text prompts with state-of-the-art AI. Supports multiple aspect ratios, styles, and high-resolution output for creative and commercial use.
Try the model
Select an example to load its inputs and result into the playground.
{
"prompt": "Tilt-shift miniature effect on a real Portuguese fishing village at golden hour, colorful boats in the harbor appearing toy-like, selective focus band across the middle, saturated primary colors of blue red and yellow boats against white buildings, 90mm tilt-shift lens, the familiar made fantastical, Wes Anderson color sensibility"
}Human preference
Elo ratings from blind side-by-side votes, compared with other image and video models.
Rankings sourced from Artificial Analysis Arena
Text-to-image arena: people pick the better of two images generated from the same prompt, without seeing the model names.
Recraft V4.1 Utility: fast, low-cost images for everyday design assets, with palette control.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 10,000 characters. |
aspect_ratio | 21:9 / 16:9 / 3:2 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 2:3 / 9:16 | — | Output shape. |
background_color | string | — | Background color. |
colors | object[] | [] | Preferred palette as RGB values. |
$0.04 per image.
| Request | Price |
|---|---|
| One image | $0.04 |
Failed runs are not charged.
Related: recraft/recraft/v4.1.
Start building
Submit this model through the SandBase Unified Run API.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "recraft/recraft/v4.1/utility",
"colors": [],
"prompt": "Tilt-shift miniature effect on a real Portuguese fishing village at golden hour, colorful boats in the harbor appearing toy-like, selective focus band across the middle, saturated primary colors of blue red and yellow boats against white buildings, 90mm tilt-shift lens, the familiar made fantastical, Wes Anderson color sensibility"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"Create a SandBase API key and set it in your server environment. All requests use Bearer authentication.
export SANDBASE_API_KEY="YOUR_API_KEY"Keep the key on your server. Do not expose it in browser code or commit it to a repository.
POST to /v1/run with this model ID and its inputs. The request example above includes submission and polling.
Use the returned run ID to poll until the status is completed, failed or timeout. Read output only after completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Pass a publicly accessible file URL in the model’s image, video or audio field. Supported formats and limits are shown beside each Playground input.
Use the upload or replace control on supported image fields in the Playground. Video URL fields accept a hosted driving video; they do not imply video-upload support.
colorsarrayAn array of preferable colors
Default: []
promptstringrequiredaspect_ratiostringThe aspect ratio of the generated image.
Possible values: "21:9", "16:9", "3:2", "4:3", "5:4", "1:1", "4:5", "3:4", "2:3", "9:16"
background_colorstringThe preferable background color of the generated images.
{
"model": "recraft/recraft/v4.1/utility",
"colors": [],
"prompt": "Tilt-shift miniature effect on a real Portuguese fishing village at golden hour, colorful boats in the harbor appearing toy-like, selective focus band across the middle, saturated primary colors of blue red and yellow boats against white buildings, 90mm tilt-shift lens, the familiar made fantastical, Wes Anderson color sensibility"
}A completed run exposes its result in output. The following is the model’s saved example, not a new generation.
[
{
"source": "recraft schema mirror",
"source_url": "https://recraft.example/",
"url": "https://static.sandbase.ai/examples/b91a6428-495b-46bc-8b58-fc89e9664517/output/5d9c66a7-2620-4daa-b9bd-7969aed4d0a7.webp"
}
]