- Third-party
- Zero data retention
Recraft V4 Pro 可生成 2048px 以上的高分辨率、具有艺术指导效果的图像,具备出色的构图、文字渲染能力和设计品味。专为印刷和生产工作打造。
| 模型信息 | |
|---|---|
| 条款和许可证 | 链接 ↗ |
| 更多信息 | 链接 ↗ |
| 零数据保留 | 是 |
| 定价 | 在 Cloudflare 仪表板中查看定价 ↗ |
用法
const response = await env.AI.run(
'recraft/recraftv4-pro',
{
prompt:
'A detailed vintage botanical illustration of a rose with leaves and thorns, scientific illustration style',
},
)
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-pro",
"input": {
"prompt": "A detailed vintage botanical illustration of a rose with leaves and thorns, scientific illustration style"
}
}'
{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/recraft__recraftv4-pro/print-ready-illustration.png"
},
"state": "Completed"
}示例
大幅面艺术作品 — 大画布数字艺术作品
const response = await env.AI.run(
'recraft/recraftv4-pro',
{
prompt:
'A sweeping fantasy landscape with floating islands, waterfalls cascading into clouds, and ancient stone bridges connecting the islands',
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-pro",
"input": {
"prompt": "A sweeping fantasy landscape with floating islands, waterfalls cascading into clouds, and ancient stone bridges connecting the islands",
"size": "2048x2048"
}
}'
{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/recraft__recraftv4-pro/large-format-art.png"
},
"state": "Completed"
}品牌素材 — 颜色受控的专业品牌素材
const response = await env.AI.run(
'recraft/recraftv4-pro',
{
prompt:
'A modern, clean illustration of a shield with a checkmark inside, representing security and trust',
controls: {
background_color: { rgb: [15, 23, 42] },
colors: [{ rgb: [46, 117, 182] }, { rgb: [255, 255, 255] }],
},
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-pro",
"input": {
"prompt": "A modern, clean illustration of a shield with a checkmark inside, representing security and trust",
"controls": {
"background_color": {
"rgb": [
15,
23,
42
]
},
"colors": [
{
"rgb": [
46,
117,
182
]
},
{
"rgb": [
255,
255,
255
]
}
]
},
"size": "2048x2048"
}
}'
{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/recraft__recraftv4-pro/brand-asset.png"
},
"state": "Completed"
}编辑类插画 — 杂志级编辑类插画
const response = await env.AI.run(
'recraft/recraftv4-pro',
{
prompt:
'A conceptual illustration of artificial intelligence as a tree with circuit-board branches and glowing data leaves',
},
)
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-pro",
"input": {
"prompt": "A conceptual illustration of artificial intelligence as a tree with circuit-board branches and glowing data leaves"
}
}'
{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/recraft__recraftv4-pro/editorial-illustration.png"
},
"state": "Completed"
}参数
prompt
stringrequiredsize
stringstyle
stringsubstyle
string▶controls{}
objectimage
string