Skip to content

非公式本サイトは非公式の日本語ドキュメントであり、Cloudflare 公式サイトではありません。最新情報はdevelopers.cloudflare.comをご確認ください。

Recraft のロゴ

Recraft V4.1 Utility SVG

テキストから画像 • Recraft

Markdown で表示Agent セットアップ
  • サードパーティ
  • ゼロデータ保持

デザインやイラストなど幅広い用途に適した汎用モデルで、テキストプロンプトから制作向け 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
string
style
string
substyle
string
image
string

API スキーマ(Raw)

Input
Output

役に立ちましたか?