Skip to content
Recraft logo

Recraft V4.1 Utility

Text-to-ImageRecraftProxied

Recraft V4.1 Utility is a general-purpose text-to-image model balancing quality and flexibility for a wide range of everyday use cases at standard resolution.

Model Info
Terms and Licenselink
More informationlink
PricingView pricing in the Cloudflare dashboard

Usage

TypeScript
const response = await env.AI.run(
'recraft/recraftv4-1-utility',
{ prompt: 'A friendly cartoon robot waving hello against a white background' },
)
console.log(response)
Simple Generation

Examples

Product Mockup — Generate a product concept image
TypeScript
const response = await env.AI.run(
'recraft/recraftv4-1-utility',
{ prompt: 'A clean product photo of a white ceramic coffee mug on a wooden table' },
)
console.log(response)
Product Mockup
Custom Size — Specify output dimensions
TypeScript
const response = await env.AI.run(
'recraft/recraftv4-1-utility',
{
prompt: 'A simple banner illustration with abstract shapes and warm colors',
size: '1024x1024',
},
)
console.log(response)
Custom Size
With Color Controls — Guide generation with specific colors
TypeScript
const response = await env.AI.run(
'recraft/recraftv4-1-utility',
{
prompt: 'A flat illustration of a globe with network connections',
controls: { colors: [{ rgb: [30, 90, 200] }, { rgb: [255, 255, 255] }] },
},
)
console.log(response)
With Color Controls
Background Color — Set a specific background color
TypeScript
const response = await env.AI.run(
'recraft/recraftv4-1-utility',
{
prompt: 'A simple icon of a checkmark inside a circle',
controls: { background_color: { rgb: [240, 248, 255] } },
size: '1024x1024',
},
)
console.log(response)
Background Color

Parameters

prompt
stringrequired
size
string
style
string
substyle
string

API Schemas (Raw)

Input
Output