- サードパーティ
- ゼロデータ保持
デザインやイラストなど幅広い用途に適した汎用モデルで、テキストプロンプトから制作向け SVG ベクターグラフィックを生成します。
| モデル情報 | |
|---|---|
| 利用規約とライセンス | リンク ↗ |
| 詳細情報 | リンク ↗ |
| ゼロデータ保持 | はい |
| 料金 | Cloudflare ダッシュボードで料金を見る ↗ |
const response = await env.AI.run(
'recraft/recraftv4-1-utility-vector',
{ prompt: 'A simple flat icon of a calendar with a date marked' },
)
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-utility-vector",
"input": {
"prompt": "A simple flat icon of a calendar with a date marked"
}
}'{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/recraft__recraftv4-1-utility-vector/simple-icon.jpg"
},
"state": "Completed"
}アプリアイコン — ベクター形式のモバイルアプリアイコンです
const response = await env.AI.run(
'recraft/recraftv4-1-utility-vector',
{ prompt: 'A clean app icon featuring a magnifying glass over a document', size: '1024x1024' },
)
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-utility-vector",
"input": {
"prompt": "A clean app icon featuring a magnifying glass over a document",
"size": "1024x1024"
}
}'{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/recraft__recraftv4-1-utility-vector/app-icon.jpg"
},
"state": "Completed"
}イラスト — 汎用のベクターイラストです
const response = await env.AI.run(
'recraft/recraftv4-1-utility-vector',
{
prompt:
'A flat vector illustration of a team of people collaborating around a table with laptops',
size: '1024x1024',
},
)
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-utility-vector",
"input": {
"prompt": "A flat vector illustration of a team of people collaborating around a table with laptops",
"size": "1024x1024"
}
}'
{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/recraft__recraftv4-1-utility-vector/illustration.jpg"
},
"state": "Completed"
}ブランドカラー指定 — 指定パレットのベクターです
const response = await env.AI.run(
'recraft/recraftv4-1-utility-vector',
{
prompt: 'A simple shield icon representing protection and security',
controls: {
background_color: { rgb: [245, 245, 245] },
colors: [{ rgb: [34, 139, 87] }, { rgb: [255, 255, 255] }],
},
},
)
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-utility-vector",
"input": {
"prompt": "A simple shield icon representing protection and security",
"controls": {
"background_color": {
"rgb": [
245,
245,
245
]
},
"colors": [
{
"rgb": [
34,
139,
87
]
},
{
"rgb": [
255,
255,
255
]
}
]
}
}
}'
{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/recraft__recraftv4-1-utility-vector/with-brand-colors.jpg"
},
"state": "Completed"
}prompt
string必須size
stringstyle
stringsubstyle
string▶controls{}
objectimage
string