ClaudeCloudflare Developer Platform2026/05/21 0:00

AI Gateway - Call any AI model through AI Gateway's new REST API

要点だけを先に読めるように短く再構成したセクションです。

元記事

Quick Digest

要約

要点だけを先に読めるように短く再構成したセクションです。

claudeja

AI Gateway - Call any AI model through AI Gateway's new REST API の要約

Key Points

  • ポイント1: Changelog New updates and improvements at Cloudflare.
  • ポイント2: Subscribe to RSS View RSS feeds ← Back to all posts Call any AI model through AI Gateway's new REST API May 21, 2026 AI Gateway AI Gateway now uses the AI REST API on api.cloud
  • ポイント3: You can call any model — whether from OpenAI, Anthropic, Google, or hosted on Workers AI — through one unified API, using the same endpoints and authentication regardless of provid

Summary

この記事は 2026-05-21 に公開された「AI Gateway - Call any AI model through AI Gateway's new REST API」の内容を日本語で簡潔にまとめたものです。

Key Points

  • ポイント1: Changelog New updates and improvements at Cloudflare.
  • ポイント2: Subscribe to RSS View RSS feeds ← Back to all posts Call any AI model through AI Gateway's new REST API May 21, 2026 AI Gateway AI Gateway now uses the AI REST API on api.cloud
  • ポイント3: You can call any model — whether from OpenAI, Anthropic, Google, or hosted on Workers AI — through one unified API, using the same endpoints and authentication regardless of provid

Full Translation

翻訳

原文の流れを保ったまま読める翻訳セクションです。

claudeja

AI Gateway - Call any AI model through AI Gateway's new REST API(原文タイトル)

概要

公開日: 2026-05-21 翻訳生成に失敗したため、原文をそのまま保存しています。

原文

Changelog New updates and improvements at Cloudflare. Subscribe to RSS View RSS feeds ← Back to all posts Call any AI model through AI Gateway's new REST API May 21, 2026 AI Gateway AI Gateway now uses the AI REST API on api.cloudflare.com . You can call any model — whether from OpenAI, Anthropic, Google, or hosted on Workers AI — through one unified API, using the same endpoints and authentication regardless of provider. Four endpoints are available: POST /ai/run — universal endpoint for all models and modalities POST /ai/v1/chat/completions — OpenAI SDK compatible POST /ai/v1/responses — OpenAI Responses API compatible POST /ai/v1/messages — Anthropic SDK compatible Terminal window curl -X POST "https://api.cloudflare.com/client/v4/accounts/ $CLOUDFLARE_ACCOUNT_ID /ai/v1/chat/completions" \ --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN " \ --header "Content-Type: application/json" \ --data '{ "model": "openai/gpt-5.5", "messages": [{"role": "user", "content": "What is Cloudflare?"}] }' All AI Gateway features — logging, caching, rate limiting, and guardrails — are applied automatically. Third-party models are billed through Unified Billing , so you do not need to manage separate provider API keys. Third-party model requests are routed through your account's default gateway, which is created automatically on first use. To route requests through a specific gateway, add the cf-aig-gateway-id header. If you are already calling Workers AI models through the existing REST API, that path ( /ai/run/@cf/{model} ) continues to work. To call Workers AI models through AI Gateway, use the @cf/ model prefix (for example, @cf/moonshotai/kimi-k2.6 ) and include the cf-aig-gateway-id header to specify which gateway to route through. For more details and examples, refer to the REST API documentation . Resources API New to Cloudflare? Directory Sponsorships Open Source Support Help Center System Status Compliance GDPR Company cloudflare.com Our team Careers Tools Cloudflare Radar Speed Test Is BGP Safe Yet? RPKI Toolkit Certificate Transparency Community X Discord YouTube GitHub © 2026 Cloudflare, Inc. Privacy Policy Terms of Use Report Security Issues Trademark Cookie Settings Was this helpful? Yes No