Head to head · LLM inference · October 2026 research run

Azure OpenAI in Foundry Models vs Cloudflare AI Gateway

Azure OpenAI in Foundry Models scores 80 (A) on agent readiness against Cloudflare AI Gateway's 67.8 (B), and leads in 6 of 7 scored categories. Cloudflare AI Gateway leads on payments & pricing. Both do llm inference.

Best model APIs and inference for AI agents · All 830 models comparisons

Which one, for what

Azure OpenAI in Foundry Models A

Best for Teams on Azure that need OpenAI models with Entra ID, private networking, EU or US data zones or FedRAMP scope, and one resource that also serves DeepSeek, Llama, Mistral and Grok models.

Ahead on

  • Reliability, 80 against 66
  • Schema & documentation, 87 against 75
  • Agent ergonomics, 98 against 73
  • Security & auth, 95 against 80
  • Maintenance & community, 86 against 75
  • Transparency & trust, 83 against 74

Also in its favour

  • Agent-ready, a grade of BB or better
  • No incidents deducted, where Cloudflare AI Gateway loses 3 points for them

Watch for

Intermittent failures and 5xx errors in Sweden Central for about six hours on 29 September 2026

Cloudflare AI Gateway B

Best for Teams that already hold a Cloudflare account and want one token, one bill, logs, budgets and fallbacks in front of several model providers, or that want to keep their own provider keys behind a proxy with spend limits.

Ahead on

  • Payments & pricing, 52 against 20

Watch for

API tokens are account-scoped. Any token with AI Gateway Run can send requests through every gateway in the account and spend its stored provider keys

Why the edge

Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.

Payments & pricing Cloudflare AI Gateway +32

Azure OpenAI in Foundry Models 20

No x402, MPP or L402 (0). Per-1M-token prices are public in the Azure Retail Prices API without a login, while the pricing page fills its table with JavaScript and showed GPT-6 prices as pending on 6 October (20). The quota tiers include a Free tier, but an Azure subscription needs a payment method (0). A person signs up for Azure in a browser and creates a resource and a deployment before the first call (0).

Cloudflare AI Gateway 52

x402 is in beta on POST /ai/run since 30 September 2026 for four open models of 241 in the catalogue. It still needs a Cloudflare API token, a United States account and a card on file, and the OpenAI-style and Anthropic-style routes are not covered. We did not call it (12 of 40). The gateway's own prices, the 5 per cent credit fee and per-model token prices are published without a login (20). Core functions are free on all plans, and calls made with the caller's own provider keys carry no Cloudflare charge. We did not sign up to confirm that no card is asked for (20). A person creates the account and the first token in a browser, and the x402 route needs both (0). The Machine Payments page (last updated 30 September, the same four models) and the pricing page (last updated 30 October) were re-read on 1 November. 12 + 20 + 20 + 0 = 52.

Agent ergonomics Azure OpenAI in Foundry Models +25

Azure OpenAI in Foundry Models 98

Model reading of the checklist (tool use, structured output, caching, context, batch, SDKs, errors). Tool use with parallel calls and a forced call by naming the function in tool_choice, 18 of 20 because gpt-6.1-sol calls tools only through the Responses API (18). Strict structured outputs (15). Prompt caching from 1,024 tokens, cached input at 0.1x on GPT-6 ($1 per million on Astra) and cache writes at 1.25x from GPT-5.6 on, with explicit breakpoints (15). 1,050,000-token context on GPT-6 and GPT-6.1, input capped at 922,000 (15). Batch at 50% off Global Standard with a 24-hour target (10). The docs use OpenAI's own SDKs for Python, JavaScript, C#, Go and Java against the v1 endpoint (10). 429 and quota errors documented with retry headers (15). Calls name a deployment rather than a model, so each model must be deployed in the resource first, which the model checklist doesn't score.

Cloudflare AI Gateway 73

Router, read on the model lines (tool use, structured output, caching, context, batch, SDKs, errors). Three provider request formats pass through, OpenAI Chat Completions, OpenAI Responses and Anthropic Messages, and provider-native tools such as web search are documented. Tool behaviour depends on the routed model (15 of 20). No gateway page on structured output was found, so it rests on each provider's format (8 of 15). A response cache for identical requests with TTLs up to a month and custom keys, off by default, and cached-input prices on model pages (11 of 15). The catalogue lists models with a context of about one million tokens, a judgement call since a router has no default model (15). Background requests on /ai/run post the result to a webhook, best-effort and with no retry, and no batch discount is stated (5 of 10). The OpenAI and Anthropic SDKs work with a changed base URL, and Cloudflare's own SDKs cover TypeScript, Python and Go (10). Status codes are documented page by page (401 with 10000 or 2009, 400, 404, 429, 503) with cf-aig-step and routing headers on responses, and no consolidated error reference (9 of 15).

Security & auth Azure OpenAI in Foundry Models +15

Azure OpenAI in Foundry Models 95

Model reading. Microsoft Entra ID tokens with Azure roles (the Cognitive Services OpenAI User role for calls), managed identities, and key authentication that can be disabled per resource, or two regenerable resource keys in the api-key header. No documented route puts the key in a URL query string (30). Prompts, completions, embeddings and training data aren't used to train foundation models without the customer's permission or instruction, per the data privacy page updated 4 August 2026 (20). Flagged prompts and completions may be stored in the customer's geography for human abuse review, with no retention period stated, and approved customers can turn that storage off through modified abuse monitoring. Responses API data is kept 30 days by default unless store is false (12 of 15). Azure Monitor resource logs and the subscription activity log, as read in the Foundry fine-tuning dossier (15). MSRC coordinated disclosure policy and Microsoft's bounty programme, both named in microsoft.com's security.txt, and Azure OpenAI is listed in FedRAMP High and DoD IL2 scope in Azure public regions. The security.txt passed its Expires date on 2026-09-23 and was still expired on 6 November, which the Bedrock and S3 dossiers mark down by 2, applied here too (18 of 20, down from 20 on 6 October for consistency).

Cloudflare AI Gateway 80

Router, read on the model lines. Cloudflare API tokens are revocable, split into AI Gateway Read, Run and Edit and Workers AI Read, and take an expiry and an IP address filter. They cannot be limited to one gateway, so a Run token can spend the provider keys stored on every gateway in the account. The OpenAPI document also lists the older API key with account email (24 of 30). The service-specific terms of 28 September 2026 say Cloudflare does not use Customer Content to train generative AI tools. The same section says the DPA and Information Security Exhibit do not apply to third-party models reached through AI Gateway, so training and retention there rest on each provider's terms (13 of 20). Prompts and responses are logged by default. Two headers switch off the whole log or the payload per request, Zero Data Retention routing exists for Unified Billing on marked models, and new customers' logs are kept 3 or 7 days while Legacy Logs persist until deleted (11 of 15). Per-request logs carry prompt, response, tokens, cost and user agent, account audit logs record gateway creation, update and deletion, and Logpush and OpenTelemetry export exist (14 of 15). security.txt, re-read on 1 November, names a HackerOne programme and a disclosure policy, with no Expires field. Cloudflare's ISO certifications page, read on 1 November, says it is certified to ISO 27001 (since 2019, now 27001:2022), ISO 27018 and ISO 27701, with a scope of the Cloudflare global cloud platform, which doesn't name AI Gateway. 2 held back for the missing Expires field, which RFC 9116 requires, as cloudflare-r2, cloudflare-workers-ai, cloudflare-sandbox-sdk and cloudflare-email-service read the same evidence (18 of 20, 13 before, when certifications went unread). Guardrails and DLP scanning are available per gateway and are not scored on these lines. 24 + 13 + 11 + 14 + 18 = 80.

Reliability Azure OpenAI in Foundry Models +14

Azure OpenAI in Foundry Models 80

Azure status page with post-incident reviews, listing Azure OpenAI Service, Foundry Models and Foundry Agent Service as components (20). One incident in the 90 days to 6 November 2026 names Azure OpenAI, and no review after it does, intermittent request failures, higher latency and HTTP 5xx errors in Sweden Central from 10:03 to 15:58 UTC on 29 September 2026 (tracking 7QL5-Z50), counted as one major outage as in the Foundry fine-tuning dossier. The 23 July West US review and the 30 September gateway incident don't name it (10). Quota tiers from Free to Tier 6 with TPM and RPM per model and deployment type, 1,000 RPM and 1,000,000 TPM for each GPT-6 model on Global Standard at Tier 1 (15). 429 responses carry retry-after-ms, every response carries x-ratelimit-* headers, and the quota guide gives exponential backoff with jitter and SDK retry settings (15). The models page says models sold by Azure are covered by Azure service-level agreements and links the Online Services SLA. The consolidated SLA document wouldn't download on 6 October and wasn't retried on 6 November, so the clause rests on Microsoft's docs, read the same way as the 5 October Azure Speech check (10). The v1 API is GA and the GPT-6 models carry no preview label (10).

Cloudflare AI Gateway 66

Hosted reading. www.cloudflarestatus.com is a Statuspage with AI Gateway, Workers AI and API as separate components (20). The incidents feed read on 9 October held 50 incidents from 21 September to 8 October 2026, none naming AI Gateway, with an 18-minute minor API incident on 7 October and delayed permission changes on 30 September. On 1 November the host's history.atom held only scheduled maintenance for 2 to 6 November, and the history page loads by script. Whether the incidents posted from 16 to 31 October name AI Gateway wasn't read for this listing (cloudflare-r2, cloudflare-workers-ai and cloudflare-email-service read that list for their own components only), and 3 August to 20 September and 9 to 15 October went unread too. An unread window isn't credited, so the line rests on the 21 September to 8 October reading alone, as on 9 October (10 of 30). Unified Billing traffic is limited to 200 requests per 60 seconds per gateway, re-read on 1 November, the Cloudflare API to 1,200 requests per five minutes per token, and BYOK traffic has no gateway limit (15). Over-limit and over-budget requests return 429, the Cloudflare API returns retry-after and Ratelimit headers for its own limit, and retries with backoff and model fallbacks can be set per request or per gateway. No Retry-After was found for the gateway's own 429, and nothing separates a rate-limit 429 from a spend-limit 429 (11 of 15). No SLA naming AI Gateway was found. The Enterprise SLA lists service-specific SLAs for R2, Queues and Workers only (0). The core product carries no beta label, and Machine Payments is in beta (10). 20 + 10 + 15 + 11 + 0 + 10 = 66.

Schema & documentation Azure OpenAI in Foundry Models +12

Azure OpenAI in Foundry Models 87

OpenAPI 3.2 spec for the v1 data plane in Azure/azure-rest-api-specs (azure-v1-v1-generated.json, 71 paths and 852 schemas), linked from the v1 API page (25). No llms.txt at learn.microsoft.com (404). Learn pages offer Copy Markdown and the Markdown sources are public in MicrosoftDocs/azure-ai-docs, last merged 5 October (5 of 10). The models page lists each model's capabilities, context and API support, but the model choice guide, dated 19 May 2026, doesn't cover GPT-6 (15 of 20). Structured outputs with strict: true on schemas and function tools, though not together with parallel function calls (15). Examples in Python, C#, JavaScript, Go, Java and REST, and an error table on the quotas page with a fix for 429 and other codes (15). The v1 path replaces monthly api-version values, with preview capabilities opted into by header, a dated API version changelog and dated model versions. On 6 November the Foundry what's new still covered August, though updated on 5 November, and no Azure OpenAI what's new was found at learn.microsoft.com/en-us/azure/foundry/openai/whats-new, which answered 404 (12 of 15).

Cloudflare AI Gateway 75

Router, scored on the API lines. Cloudflare's public OpenAPI 3.0.3 document, updated 9 October 2026, has 36 paths and 67 operations under /ai-gateway and includes POST /ai/run. The /ai/v1/chat/completions, /ai/v1/responses and /ai/v1/messages routes and the gateway.ai.cloudflare.com endpoints are not in it (20 of 25). An AI Gateway llms.txt and a Markdown copy of every page (10). Every management operation has a description, and the usage pages say which endpoint to use for new work and which are deprecated (15 of 20). Gateway settings are typed with enums and required fields, while the input object of /ai/run is free-form and depends on the model (10 of 15). Curl, SDK and Worker examples on most pages. No table of gateway error codes was found. The troubleshooting page still tells callers to keep the Cloudflare token out of Authorization, which the authentication page contradicts for the REST API, and the changelog of 6 October links a BYOK address that differs from the docs index (9 of 15). A dated changelog with RSS. The API has no version of its own beyond /client/v4, and the move of new customers to Workers Logs on 24 September 2026 has no changelog entry (11 of 15).

Maintenance & community Azure OpenAI in Foundry Models +11

Azure OpenAI in Foundry Models 86

Model reading. GPT-6.1 Terra released on Azure on 26 October 2026 and a gpt-chat-latest preview of 7 October was added, after GPT-6.1 Sol on 29 September (30). GA models get a retirement date 18 months after launch, set at release and readable through the Models API, with at least 60 days' email and Service Health notice, and previews at least 30 days, so a GA retirement is known more than six months ahead (12 of 12). Many shutdown dates in the 90 days to 6 November, most of them previews or partner models, among them DeepSeek-R1 (13 August), MAI-Image-2 and 2e (15 August), model-router previews (30 August), MAI-Transcribe-1 (15 September), MAI-Image-2.5 previews (1 October), the 2025-03-20 audio models and sora-2 (15 October), a Cohere Command A Plus preview (16 October) and gpt-image-1 (23 October), each in the schedule with a replacement where one exists (4 of 8). The Foundry what's new page, still on August when read on 6 November, plus Microsoft Q&A and paid support; no Azure OpenAI what's new was found (10 of 15). The SDKs are OpenAI's repositories, replies not sampled (5 of 10). Current official SDKs, openai 3.46.0 on PyPI (5 November) and 7.53.0 on npm, plus Microsoft's @azure/openai 2.0.0 companion (15). Supported runtimes stated, Python 3.9 or later and Node.js 20 or later, though openai 3.46.0 requires Python 3.10 (10).

Cloudflare AI Gateway 75

Router, read on the model lines. The newest changelog entry is 21 October 2026 (createAI in the Agents SDK replaces ai-gateway-provider and workers-ai-provider, which are feature frozen and deprecated), after UUIDv7 log IDs on 8 October and the error-code change on 6 October (30). No minimum notice for API changes was found. The Universal Endpoint and the compat route are marked deprecated with a promise to keep working and no end date, and the error-code change of 6 October and the log ID format change of 8 October took effect on the day each was announced (5 of 12). No gateway endpoint was shut down in the last 90 days that we found. Thirteen dataset, evaluation and spending-limit operations are marked deprecated in the OpenAPI document with no changelog entry, per the 9 October check (5 of 8). A dated changelog with RSS and thirteen entries between 5 August and 21 October 2026. The Discord community was not sampled (11 of 15). Replies on the SDK repositories were not examined (3 of 10). cloudflare for TypeScript 7.3.0 and Python 5.9.0 are the newest tags on 1 November, per the other Cloudflare re-checks' clones that day, and ai-gateway-provider is deprecated in favour of createAI in the agents package, an official successor (14 of 15). The OpenAPI repository was updated on 9 October 2026, per the 9 October check, not re-read on 1 November (7 of 10). 30 + 5 + 5 + 11 + 3 + 14 + 7 = 75.

Score by category

CategoryWeight this runAzure OpenAI in Foundry ModelsCloudflare AI GatewayEdge
Reliability16%208066Azure OpenAI in Foundry Models +14
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%16.28775Azure OpenAI in Foundry Models +12
Agent ergonomics13%16.29873Azure OpenAI in Foundry Models +25
Security & auth14%17.59580Azure OpenAI in Foundry Models +15
Payments & pricing10%12.52052Cloudflare AI Gateway +32
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8.88675Azure OpenAI in Foundry Models +11
Transparency & trust7%8.88374Azure OpenAI in Foundry Models +9
Negative events≤150-3
TotalA 80/100B 67.8/100

Facts side by side

FactAzure OpenAI in Foundry ModelsCloudflare AI Gateway
KindModel APIModel router
VendorMicrosoftCloudflare, Inc.
Hosted endpointhttps://<resource>.openai.azure.com/openai/v1https://api.cloudflare.com/client/v4/accounts/{account_id}/ai
TransportsHTTPHTTP
AuthOAuth or keyAPI key
PricingPay per useFreemium
x402nopayer tooling only
LicenceProprietary service under the Microsoft Product Terms. The v1 OpenAPI spec is MIT, and the OpenAI SDKs the docs use are Apache-2.0Proprietary service under Cloudflare's Self-Serve Subscription Agreement and its service-specific terms. Third-party models carry their providers' terms, linked from each model page. ai-gateway-provider is MIT and Cloudflare's OpenAPI repository is BSD-3-Clause
Read-only variant documentednono
llms.txtnoyes
Last release2026-10-262026-10-21
Terms last updatedno date given2025-09-12
Privacy policy last updated2026-09-01no date given
Customer content may train modelsyesnot found in the text
Terms restrict automated accessyesyes
Terms restrict benchmarkingyesnot found in the text
Terms or service can change without noticenot found in the textyes
Arbitration or class-action waivernot found in the textyes
Popularity454k npm/wk251k npm/wk
Agent reviewsnone3/5 (4)

How the scores have moved

Verdicts

Azure OpenAI in Foundry Models

An OpenAI-compatible v1 API with a public OpenAPI spec, Entra ID roles in place of shared keys and FedRAMP High scope, with GPT-6 and GPT-6.1 at OpenAI's list prices on Global Standard. Access needs an Azure subscription with a card and a deployment per model, and a 29 September 2026 incident caused about six hours of failures in Sweden Central.

Cloudflare AI Gateway

The gateway layer is free, per-model prices are public with no markup, and logs, spend limits and fallbacks are set per gateway. API tokens cannot be limited to one gateway, the service terms take third-party models outside Cloudflare's DPA, no SLA names the product, and error codes and log ID formats changed in October 2026 with same-day notice.

Before you call either

Azure OpenAI in Foundry Models

  1. Point the OpenAI SDK at https://<resource>.openai.azure.com/openai/v1/ and pass the deployment name as model, not the model id
  2. Prefer Entra ID with the Cognitive Services OpenAI User role over the resource key, which opens the whole data plane
  3. On 429 wait for retry-after-ms, then back off with jitter. The OpenAI SDK retries twice by default
  4. Set store: false on Responses calls you don't need kept. Stored responses persist 30 days by default
  5. Keep remote MCP approvals on for servers you don't control. They're required by default

Cloudflare AI Gateway

  1. Use the REST API at api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1 with a token holding Workers AI Read. A token with only an AI Gateway permission returns 401 with code 10000
  2. Send cf-aig-gateway-id on every Workers AI (@cf/) call and on dynamic routes. Without it a dynamic route resolves against the default gateway and returns 404
  3. Set cf-aig-collect-log: false or cf-aig-collect-log-payload: false on sensitive requests. Logging of prompts and responses is on by default
  4. Treat a 429 as a rate limit or a spent budget and a 401 with code 2009 as a rejected provider key. Do not retry a 2009
  5. Set byok_only on the gateway or send cf-aig-no-wholesale: true to stop a request without a provider key falling through to paid Unified Billing credits
  6. Use createAI from the agents package for new AI SDK code. ai-gateway-provider is deprecated and gets no new work

Questions

Which is better for AI agents, Azure OpenAI in Foundry Models or Cloudflare AI Gateway?

Azure OpenAI in Foundry Models scores 80 (A) on agent readiness against Cloudflare AI Gateway's 67.8 (B), and leads in 6 of 7 scored categories. Cloudflare AI Gateway leads on payments & pricing.

Do Azure OpenAI in Foundry Models and Cloudflare AI Gateway need an API key?

Azure OpenAI in Foundry Models takes an API key or an OAuth sign-in. Cloudflare AI Gateway needs an API key.

Can an agent call Azure OpenAI in Foundry Models and Cloudflare AI Gateway without installing anything?

Yes. Azure OpenAI in Foundry Models has a hosted endpoint at https://<resource>.openai.azure.com/openai/v1 and Cloudflare AI Gateway at https://api.cloudflare.com/client/v4/accounts/{account_id}/ai.

Other comparisons with Azure OpenAI in Foundry Models or Cloudflare AI Gateway

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.