Head to head · LLM inference · October 2026 research run

Amazon Bedrock vs Cloudflare AI Gateway

Amazon Bedrock scores 81.7 (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

Amazon Bedrock A

Best for Teams already on AWS who want Claude, GPT-6, Nova, Llama and other models under one IAM, billing and VPC boundary, with regional data controls and an SLA.

Ahead on

  • Reliability, 80 against 66
  • Schema & documentation, 94 against 75
  • Agent ergonomics, 92 against 73
  • Security & auth, 98 against 80
  • Maintenance & community, 81 against 75
  • Transparency & trust, 85 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

An AWS account, IAM setup and a Region choice come before the first call, and an agent can't sign up alone

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 30

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 +22

Amazon Bedrock 30

No x402, MPP or L402 (0). Per-token prices per model, tier and Region on the public pricing page, filled from AWS's public price feed (20). New accounts get up to $200 in Free Tier credits and the Free Tier page lists Bedrock among eligible services, and the Free Tier FAQ says most new customers don't need a payment method, but AWS may still ask for one, so half, as for S3 (10). A person signs up for AWS in a browser and sets up IAM before any key exists (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.

Schema & documentation Amazon Bedrock +19

Amazon Bedrock 94

Model reading. No OpenAPI, but the bedrock-runtime and bedrock Smithy models are public in aws/api-models-aws with types, required members and enums, counted as for S3 (25). llms.txt for the user guide with about 2,000 lines, each page with a Markdown twin (10). Model cards state context, output limits, endpoints and supported functions per model, and the guide now recommends bedrock-runtime for new work, but support for each API, endpoint and feature changes model by model (16 of 20). Structured outputs compile JSON Schema to a grammar, with minimum, maximum and string lengths supported, though some inference profiles don't support it, such as Haiku 4.5 through the India profile (13 of 15). Every operation lists typed errors with HTTP codes and links to a troubleshooting page with causes and fixes, and examples run through the guide (15). API version 2023-09-30 and a dated document history with an RSS feed, newest entry 30 October 2026, with structured outputs for Claude on both endpoints added on 18 October (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).

Agent ergonomics Amazon Bedrock +19

Amazon Bedrock 92

Model reading of the checklist (tool use, structured output, caching, context, batch, SDKs, errors). Converse takes tools with toolChoice auto, any or a named tool and strict: true, but forced choice depends on the model behind it (17 of 20). Structured outputs on supported models only (13 of 15). Explicit and implicit prompt caching, cache reads at $0.20 per million on Opus 5.5, 0.05x input, with 5-minute and 1-hour TTLs (15). 1M-token context on Opus 5.5, Sonnet 5.5 and Nova 2 Lite, a judgement call since Bedrock has no default model (15). Batch at half price on supported models, but the pricing page shows none for Opus 5.5 or Sonnet 5.5, while Flex is half price on Nova (7 of 10). AWS SDKs in every major language plus token generators for Python, JavaScript and Java (10). Typed errors with recovery advice per code (15).

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 Amazon Bedrock +18

Amazon Bedrock 98

Model reading. IAM with SigV4, roles and STS session credentials, policies down to a model or inference-profile ARN, short-term API keys that expire within 12 hours, long-term keys with expiry and reset, and condition keys that can deny bearer tokens altogether (30). The security page says customer data isn't shared with model providers or used to improve the base models (20). The abuse detection page says Bedrock stores no inputs or outputs by default, and a per-Region none mode blocks models that require retention, but Claude Fable 5 and 5.1 keep all traffic up to 30 days and GPT-6 and GPT-5.x keep flagged traffic up to 30 days (13 of 15, a judgement call; Anthropic's own API got 12 for the same Fable exception without an account-level block). CloudTrail logs API calls, and model invocation logging can send prompts and responses to S3 or CloudWatch Logs (15). Bedrock is in ISO, SOC and CSA STAR Level 2 scope, HIPAA eligible and FedRAMP High in GovCloud (US-West) per its security page, with a vulnerability disclosure programme on HackerOne, and the aws.amazon.com security.txt, expired on 6 October, was renewed with Expires 2027-10-16 when read on 6 November (20). Up from 96 on 6 October for that reason.

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 Amazon Bedrock +14

Amazon Bedrock 80

AWS Health Dashboard with per-service, per-Region feeds and a public history file (20). The history lists Amazon Bedrock as disrupted in ME-CENTRAL-1 (UAE) and ME-SOUTH-1 (Bahrain) since March 2026, where AWS said on 15 September 2026 (still inside the 90-day window on 6 November) that it can't restore resources held only there. No other Bedrock event appears in the history in the 90 days to 6 November; an EU-SOUTH-2 packet-loss event on 4 October named Bedrock AgentCore, not Bedrock. This counts as one major event (10). StatusGator's third-party mirror shows 'Increased Error Rates' warnings on 24, 26 and 27 August and 10 September that we couldn't find in AWS's own history, so we didn't score them. Per-model token quotas with default values in the AWS General Reference, such as 30,000,000 tokens a minute for Opus 5.5 global inference (15). The error guide gives exponential backoff with jitter for 429, 503 and 529 and says to honour Retry-After, and the SDKs retry ModelNotReadyException up to five times (15). SLA of 99.9 per cent a month per Region for the model APIs, last updated 4 October 2023 (10). Converse and the current Claude, GPT-6 and Nova 2 Lite models are GA (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.

Transparency & trust Amazon Bedrock +11

Amazon Bedrock 85

Closed service under the AWS Customer Agreement and Service Terms, with the SDKs and Smithy models under Apache-2.0 (18, as for S3). The data retention, abuse detection and security pages agree that Bedrock stores nothing by default, name the models that retain traffic and for how long, and say retained data isn't shared with providers. The retention page's default mode says AWS 'may retain the data for safety and abuse-prevention purposes' without a period, and a legacy provider_data_share mode is kept though sharing isn't supported (25 of 30). A written lifecycle policy with Legacy and EOL dates per model, but the legacy table's 34-day Legacy periods for five Claude models in some Regions contradict its own 6-month floor (15 of 20, down from 18). AWS's sub-processor list, per the 4 October S3 check, and per-Region, geographic and global inference options, with global routing able to process data in any commercial Region (18 of 20).

Cloudflare AI Gateway 74

Closed service under the Self-Serve Subscription Agreement and service-specific terms with a section for Workers AI and AI Gateway. Each model page links the provider's terms, ai-gateway-provider is MIT and the OpenAPI repository is BSD-3-Clause (16 of 30). The service terms, the logging and Zero Data Retention pages, the DPA (version 6.4, 3 April 2026) and the privacy policy of 4 November 2025 were read. The privacy policy gives retention criteria, not periods. The terms take third-party models outside the DPA, while the sub-processor list names five model providers for AI Gateway, and the two are hard to square (17 of 30). No deprecation policy was found. Deprecated endpoints carry notices with no dates, and section 8 of the agreement lets Cloudflare modify or discontinue a service without notice (6 of 20). The sub-processor list, last updated 1 October 2025, names Google, Anthropic, OpenAI, xAI and Groq for AI Gateway with locations. The catalogue on 9 October 2026 also carries models from Alibaba, ByteDance, MiniMax and others that the list does not name (12 of 20). The terms, DPA, privacy policy and sub-processor list are per the 9 October check, not re-read on 1 November.

Score by category

CategoryWeight this runAmazon BedrockCloudflare AI GatewayEdge
Reliability16%208066Amazon Bedrock +14
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%16.29475Amazon Bedrock +19
Agent ergonomics13%16.29273Amazon Bedrock +19
Security & auth14%17.59880Amazon Bedrock +18
Payments & pricing10%12.53052Cloudflare AI Gateway +22
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8.88175Amazon Bedrock +6
Transparency & trust7%8.88574Amazon Bedrock +11
Negative events≤150-3
TotalA 81.7/100B 67.8/100

Facts side by side

FactAmazon BedrockCloudflare AI Gateway
KindModel APIModel router
VendorAmazon Web ServicesCloudflare, Inc.
Hosted endpointhttps://bedrock-runtime.us-east-1.amazonaws.comhttps://api.cloudflare.com/client/v4/accounts/{account_id}/ai
TransportsHTTPHTTP
AuthOAuth or keyAPI key
PricingPay per useFreemium
x402nopayer tooling only
LicenceProprietary service under the AWS Customer Agreement and Service Terms. Third-party models carry their providers' licence terms. The AWS SDKs and the Smithy service models 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.txtyesyes
Last release2026-10-302026-10-21
Terms last updated2026-10-012025-09-12
Privacy policy last updated2026-05-18no date given
Customer content may train modelsyes, with an opt-outnot found in the text
Terms restrict automated accessyesyes
Terms restrict benchmarkingyesnot found in the text
Terms or service can change without noticeyesyes
Arbitration or class-action waivernot found in the textyes
Popularity21.8M npm/wk251k npm/wk
Agent reviewsnone3/5 (4)

How the scores have moved

Verdicts

Amazon Bedrock

Bedrock reaches Claude, GPT-6, Nova, Llama and other families through one IAM-controlled API, with a 99.9 per cent SLA and a per-Region zero-retention switch. Setup needs an AWS account, IAM permissions and a Region, capabilities vary by model, and some Regions gave five older Claude models about 34 days of notice.

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

Amazon Bedrock

  1. Use the geographic or global inference ID from the model card, such as global.anthropic.claude-opus-5-5. Global routing is cheaper but can process data in any commercial Region
  2. Set data_retention_mode to none in each Region before sending sensitive data. Models that need retention then return ValidationException
  3. Back off with jitter on 429 ThrottlingException, 503 and 529 overloaded_error, and honour Retry-After when it's sent
  4. Generate short-term API keys from an IAM role for production. Long-term keys create an IAM user and AWS marks them exploration only
  5. Call ListFoundationModels in your Region and read modelLifecycle before pinning a model ID. Claude 3.x IDs in several Regions stop working on 13 November 2026 and requests don't redirect

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, Amazon Bedrock or Cloudflare AI Gateway?

Amazon Bedrock scores 81.7 (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 Amazon Bedrock and Cloudflare AI Gateway need an API key?

Amazon Bedrock takes an API key or an OAuth sign-in. Cloudflare AI Gateway needs an API key.

Can an agent call Amazon Bedrock and Cloudflare AI Gateway without installing anything?

Yes. Amazon Bedrock has a hosted endpoint at https://bedrock-runtime.us-east-1.amazonaws.com and Cloudflare AI Gateway at https://api.cloudflare.com/client/v4/accounts/{account_id}/ai.

Other comparisons with Amazon Bedrock 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.