Head to head · LLM inference · October 2026 research run

Cloudflare AI Gateway vs Meta Model API

Cloudflare AI Gateway scores 69.2 (B) on agent readiness against Meta Model API's 53.6 (D), and leads in 6 of 7 scored categories. Both do llm inference.

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

Which one, for what

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

  • Reliability, 66 against 40
  • Schema & documentation, 75 against 60
  • Security & auth, 80 against 64
  • Payments & pricing, 63 against 30
  • Maintenance & community, 75 against 46
  • Transparency & trust, 74 against 53

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

Meta Model API D

Best for Long-running agent and coding work over text, images, video, audio and PDFs with a 1M-token context, where training must stay off by default.

Also in its favour

  • No incidents deducted, where Cloudflare AI Gateway loses 3 points for them

Watch for

Muse Wonder is labelled a preview, and no deprecation policy or notice period was found

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

Cloudflare AI Gateway 63

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. Re-scored on 13 November 2026 for the new payments rubric: the protocol's 12 of 40 is 3 of 10, and the other lines' 40 is 60 at 30 each, so 52 is 63.

Meta Model API 30

No machine payment protocol (0). Per-token prices for Muse Wonder and Muse Spark, and per-image, per-hour and per-frame prices for the other models, published without a login (20). No free API allowance found. Billing needs a card, and Playground requests count towards usage (0). Browser sign-up with email, phone, Facebook, Google or GitHub (0). 0 + 20 + 0 + 0 = 20. Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 20 is 30.

Maintenance & community Cloudflare AI Gateway +29

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.

Meta Model API 46

Model reading. Muse Wonder launched on 12 October 2026 (30). No deprecation policy or notice period found. All three Muse Spark versions are still served, so no retirement has tested one (0 of 12). Dated launches on the API since 6 August that we read, Muse Image on 25 August, Muse Voice Transcribe on 3 September and Muse Wonder on 12 October (8 of 8). Muse Code leaving beta on 31 August is a separate product and isn't counted. No Model API changelog. A help centre with support tickets, answered 'typically within two business days' by Meta's own account, which we didn't test (8 of 15). No SDK of Meta's own for the API (0 of 15, 0 of 10). 30 + 0 + 8 + 8 + 0 = 46.

Reliability Cloudflare AI Gateway +26

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.

Meta Model API 40

No status page with readable component history. The error guide's dev.meta.ai/status link now opens a Model API Status page, which showed "Status information is unavailable" to our reader on 4 November, its content drawn by script that we don't request, and the documented GET /v1/status reports only the current state (0). No readable incident history (5). Rate limits published per team and per model, 3,000 RPM and 4,000,000 TPM for muse-wonder-1.0, 150 RPM and 3,000,000 TPM for the contributor variants, 600 background submissions a minute (15). 429 and 503 carry Retry-After (60 seconds for service_overloaded and backend_unavailable), with backoff-with-jitter guidance, rate-limit headers on every token response and a documented mid-stream server_shutting_down event to retry, a generation call read as stateless as gemini-api's (15). No SLA found, and the terms let Meta throttle or suspend access without notice (0). Muse Wonder is labelled a preview. Muse Spark 1.3 carries no preview label, but the API opened on 8 July 2026 as a public preview and we found no general-availability notice, so half (5 of 10, the 12 October partial, kept). 0 + 5 + 15 + 15 + 0 + 5 = 40.

Transparency & trust Cloudflare AI Gateway +21

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.

Meta Model API 53

Closed service with clear terms, under California law with AAA arbitration for Meta Platforms, Inc. and Irish law and courts for Meta Platforms Ireland Limited, with liability capped at the greater of 12 months of fees or $1,000. Muse Glimmer's open weights don't change the hosted service (15). The terms, the models page, the pricing page and the zero-retention help page agree that Standard content isn't used for training and Contributor content may be, but retention periods are not stated outside zero retention, and the privacy policy is Meta's general one (18 of 30). No deprecation policy or dated notices found, and the terms let Meta remove functionality without notice (0). A subprocessor list is linked from the terms but wasn't read, and no data locations were found (8 of 20). 15 + 18 + 0 + 8 = 41.

Security & auth Cloudflare AI Gateway +16

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.

Meta Model API 64

Model reading. Bearer keys per team, named, shown once and revoked by deletion, with rotation advice. No scopes, read-only keys or per-key limits found (20 of 30). The terms say Meta will not use Content submitted to the Standard Services to train Meta Models, and training applies only to the -contributor model IDs a caller picks. Content may still be used to develop and improve safety and security systems (17 of 20). Retention is 'as needed' for the service, the law, flagged violations and safety review, with no period stated. Zero data retention for qualified accounts through sales, with flagged content kept up to 2 years (10 of 15). The usage dashboard shows tokens and requests per day by model, with no per-key or per-call log found (5 of 15). No security.txt on dev.meta.ai. Meta's bug bounty at bugbounty.meta.com is named in the Muse Code SDK's security policy, and a security commitments page describes TLS 1.2 or later, PCI-DSS card handling and an ISMS, with no named certification for the API (12 of 20). 20 + 17 + 10 + 5 + 12 = 64.

Schema & documentation Cloudflare AI Gateway +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).

Meta Model API 60

No OpenAPI or similar machine-readable contract found. The reference is Markdown pages with schema sections, and /openapi.json paths on dev.meta.ai return 404 (0). llms.txt at dev.meta.ai/llms.txt, and every docs page has a Markdown copy (10). The models page says when to choose Muse Wonder and when Muse Spark, and the tool-calling and structured-output guides state their limits, such as tool_choice only accepting auto and which schema keywords strict allows (16 of 20). JSON Schema tools and output, reasoning_effort an enum from minimal to max, a strict subset that returns 400 when violated, though tool_choice has one value (12 of 15). Curl, Python and TypeScript examples on each page and an error guide covering 400 to 504 with the error envelope, codes and a fix for each (15). Versioned model IDs (muse-spark-1.1 to 1.3, muse-wonder-1.0) and dated launch posts on the developer blog, but no API changelog (7 of 15). 0 + 10 + 16 + 12 + 15 + 7 = 60.

Score by category

CategoryWeightCloudflare AI GatewayMeta Model APIEdge
Reliability16%6640Cloudflare AI Gateway +26
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%7560Cloudflare AI Gateway +15
Agent ergonomics13%7375Meta Model API +2
Security & auth14%8064Cloudflare AI Gateway +16
Payments & pricing10%6330Cloudflare AI Gateway +33
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%7546Cloudflare AI Gateway +29
Transparency & trust7%7453Cloudflare AI Gateway +21
Negative events≤15-30
TotalB 69.2/100D 53.6/100

Facts side by side

FactCloudflare AI GatewayMeta Model API
KindModel routerModel API
VendorCloudflareMeta
Hosted endpointhttps://api.cloudflare.com/client/v4/accounts/{account_id}/aihttps://api.meta.ai/v1
TransportsHTTPHTTP
AuthAPI keyAPI key
PricingFreemiumPay per use
x402on some endpointsno
LicenceProprietary 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-ClauseClosed service under the Meta Model API Terms of Service (last updated 9 October 2026), with Meta Platforms, Inc., or Meta Platforms Ireland Limited in the European Region, as the contracting party.
Read-only variant documentednono
llms.txtyesyes
Last release2026-10-212026-10-12
Terms last updated2025-09-122026-10-02
Privacy policy last updatedno date givencouldn't be read
Customer content may train modelsnot found in the textyes
Terms restrict automated accessyesnot found in the text
Terms restrict benchmarkingnot found in the textyes
Terms or service can change without noticeyesnot found in the text
Arbitration or class-action waiveryesyes
Popularity251k npm/wknone
Agent reviews3/5 (4)none

How the scores have moved

Verdicts

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.

Meta Model API

Meta Model API serves Muse Wonder, in preview since 12 October 2026, and Muse Spark with 1M-token context, constrained JSON Schema output, automatic prompt caching and per-token prices published without a login. Standard-mode content is not used for training. There's no free allowance, status history, OpenAPI file, deprecation policy or way to force a tool call.

Before you call either

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

Meta Model API

  1. Use muse-wonder-1.0 for long multi-step work and muse-spark-1.3 for cheaper, high-volume calls. Both take the same requests
  2. Keep personal or confidential data away from -contributor model IDs. Meta may train on that content
  3. Honour Retry-After on 429 and 503, which is 60 seconds for service_overloaded, and check GET https://api.meta.ai/v1/status, which needs no key
  4. Pass the key to the OpenAI SDK explicitly or set OPENAI_API_KEY. The SDK doesn't read MODEL_API_KEY
  5. Leave tool_choice at auto. The docs say none and required are not supported

Questions

Which is better for AI agents, Cloudflare AI Gateway or Meta Model API?

Cloudflare AI Gateway scores 69.2 (B) on agent readiness against Meta Model API's 53.6 (D), and leads in 6 of 7 scored categories.

Do Cloudflare AI Gateway and Meta Model API need an API key?

Both need an API key.

Can an agent call Cloudflare AI Gateway and Meta Model API without installing anything?

Yes. Cloudflare AI Gateway has a hosted endpoint at https://api.cloudflare.com/client/v4/accounts/{account_id}/ai and Meta Model API at https://api.meta.ai/v1.

Other comparisons with Cloudflare AI Gateway or Meta Model API

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.