Skip to content
Recraft logo

Recraft V4 SVG

Text-to-ImageRecraftProxied

Generate production-ready SVG vector graphics from text prompts with clean geometry, structured layers, and editable paths.

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

Usage

TypeScript
const response = await env.AI.run(
'recraft/recraftv4-vector',
{
prompt: 'A simple flat icon of a coffee cup with steam rising',
},
{
gateway: { id: 'default' },
}
)
console.log(response)
Simple Icon

Examples

App Icon — Mobile app icon in vector format
TypeScript
const response = await env.AI.run(
'recraft/recraftv4-vector',
{
prompt:
'A colorful gradient app icon featuring a chat bubble with a sparkle effect',
size: '1024x1024',
},
{
gateway: { id: 'default' },
}
)
console.log(response)
App Icon
Illustration — Vector illustration for web use
TypeScript
const response = await env.AI.run(
'recraft/recraftv4-vector',
{
prompt:
'A flat vector illustration of a person working at a desk with a computer, plants, and a window showing a city view',
size: '1024x1024',
},
{
gateway: { id: 'default' },
}
)
console.log(response)
Illustration
With Brand Colors — Vector with specific color palette
TypeScript
const response = await env.AI.run(
'recraft/recraftv4-vector',
{
prompt:
'A badge or seal design with a star in the center, suitable for a certification mark',
controls: {
colors: [
{
rgb: [0, 119, 182],
},
{
rgb: [255, 209, 102],
},
],
background_color: {
rgb: [255, 255, 255],
},
},
},
{
gateway: { id: 'default' },
}
)
console.log(response)
With Brand Colors

Parameters

prompt
stringrequired
size
string
style
string
substyle
string

API Schemas (Raw)

Input
Output