- Third-party
- Zero data retention
根据文本提示词生成精细的高分辨率 SVG 矢量图形,美学质量高、几何细节精细,可缩放至任意尺寸,适用于印刷和设计工作。
| 模型信息 | |
|---|---|
| 条款和许可证 | 链接 ↗ |
| 更多信息 | 链接 ↗ |
| 零数据保留 | 是 |
| 定价 | 在 Cloudflare 仪表板中查看定价 ↗ |
用法
const response = await env.AI.run(
'recraft/recraftv4-1-pro-vector',
{ prompt: 'A modern minimalist logo for a cloud computing company, clean geometric shapes' },
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "recraft/recraftv4-1-pro-vector",
"input": {
"prompt": "A modern minimalist logo for a cloud computing company, clean geometric shapes"
}
}'
{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/recraft__recraftv4-1-pro-vector/logo-design.jpg"
},
"state": "Completed"
}示例
图标集 — 生成矢量图标
const response = await env.AI.run(
'recraft/recraftv4-1-pro-vector',
{
prompt: 'A flat design icon of a rocket launching, suitable for a mobile app',
size: '2048x2048',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "recraft/recraftv4-1-pro-vector",
"input": {
"prompt": "A flat design icon of a rocket launching, suitable for a mobile app",
"size": "2048x2048"
}
}'{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/recraft__recraftv4-1-pro-vector/icon-set.jpg"
},
"state": "Completed"
}可直接印刷的矢量图 — 适用于大幅面印刷的高分辨率矢量图
const response = await env.AI.run(
'recraft/recraftv4-1-pro-vector',
{
prompt:
'An intricate mandala pattern with floral and geometric elements, highly detailed and symmetrical',
size: '2048x2048',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "recraft/recraftv4-1-pro-vector",
"input": {
"prompt": "An intricate mandala pattern with floral and geometric elements, highly detailed and symmetrical",
"size": "2048x2048"
}
}'
{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/recraft__recraftv4-1-pro-vector/print-ready-vector.jpg"
},
"state": "Completed"
}品牌插画 — 使用品牌颜色的矢量插画
const response = await env.AI.run(
'recraft/recraftv4-1-pro-vector',
{
prompt: 'A vector illustration of a cityscape skyline at sunset with clean lines and flat colors',
controls: { colors: [{ rgb: [255, 87, 51] }, { rgb: [41, 50, 65] }, { rgb: [239, 239, 239] }] },
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "recraft/recraftv4-1-pro-vector",
"input": {
"prompt": "A vector illustration of a cityscape skyline at sunset with clean lines and flat colors",
"controls": {
"colors": [
{
"rgb": [
255,
87,
51
]
},
{
"rgb": [
41,
50,
65
]
},
{
"rgb": [
239,
239,
239
]
}
]
}
}
}'
{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/recraft__recraftv4-1-pro-vector/brand-illustration.jpg"
},
"state": "Completed"
}参数
prompt
stringrequiredsize
stringstyle
stringsubstyle
string▶controls{}
objectimage
string