ClaudeCloudflare Developer PlatformMar 2, 2026, 12:00 AM

AI Gateway - Get started with AI Gateway automatically

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

claudeenmodel: claude-sonnet-4-20250514

AI Gateway Now Supports Automatic Setup with Default Gateway ID

Key Points

  • AI Gateway now supports automatic setup with zero configuration
  • Use 'default' gateway ID to create gateway on first API call
  • Provides instant access to logging, caching, and rate limiting

Summary

Cloudflare AI Gateway now allows developers to start using the service immediately without manual setup. By using default as the gateway ID, AI Gateway automatically creates a gateway on the first API request.

Key Points

  • Zero-setup deployment: Use default as gateway ID to automatically create a gateway on first request
  • Simple API access: Single curl command gets you started with AI Gateway functionality
  • Required permissions: API token needs AI Gateway - Read, AI Gateway - Edit, and Workers AI - Read permissions
  • Full feature access: Automatic setup provides logging, caching, rate limiting, and multi-provider AI access
  • Compatible endpoint: Uses standard /compat/chat/completions endpoint for easy integration

Full Translation

Translations

A translation section that keeps the flow of the original article.

claudejamodel: claude-sonnet-4-20250514

AI Gateway - AI Gatewayを自動的に開始する

AI Gatewayを自動的に開始する

2026年3月2日

AI Gatewayを単一のAPI呼び出しで開始できるようになりました — セットアップは不要です。ゲートウェイIDとしてdefaultを使用すると、AI Gatewayが最初のリクエスト時に自動的にゲートウェイを作成します。

試してみる

以下の権限を持つAPIトークンを作成してください:

  • AI Gateway - Read
  • AI Gateway - Edit
  • Workers AI - Read

次に以下のコマンドを実行します:

curl -X POST https://gateway.ai.cloudflare.com/v1/$CLOUDFLARE_ACCOUNT_ID/default/compat/chat/completions \
  --header "cf-aig-authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast",
    "messages": [
      {
        "role": "user",
        "content": "What is Cloudflare?"
      }
    ]
  }'

AI Gatewayは、単一のエンドポイントを通じてログ記録、キャッシュ、レート制限、および複数のAIプロバイダーへのアクセスを提供します。

詳細については、Get startedを参照してください。