Skip to content

非公式 / UnofficialCloudflare, Inc. 非提携。アカウント情報は入力しないでください。Not affiliated with Cloudflare, Inc. Do not enter Cloudflare credentials here.Official docsこのサイトについてプライバシー

Replicate

最終更新 Markdown で表示Agent セットアップ

Replicate ↗ は、オープンソースモデルの実行とファインチューンを行います。

エンドポイント

https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/replicate

URL の構成

Replicate へリクエストを送るときは、いま使っている URL の https://api.replicate.com/v1 を https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/replicate に置き換えます。

前提条件

Replicate へリクエストを送るときは、次を用意してください。

  • AI Gateway のアカウント ID
  • AI Gateway のゲートウェイ名
  • 有効な Replicate API トークン。トークンは replicate.com/account/api-tokens ↗ で作成できます
  • 使う Replicate モデルの名前。例: anthropic/claude-4.5-haiku または google/nano-banana

例

cURL

リクエストbash
curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/replicate/predictions \
  --header 'Authorization: Bearer {replicate_api_token}' \
  --header 'Content-Type: application/json' \
  --data '{
    "version": "anthropic/claude-4.5-haiku",
    "input":
      {
        "prompt": "Write a haiku about Cloudflare"
      }
    }'

役に立ちましたか?