Head to head · LLM inference · October 2026 research run

Cloudflare AI Gateway vs SambaCloud

Cloudflare AI Gateway scores 69.2 (B) on agent readiness against SambaCloud's 67.4 (B), and leads in 4 of 7 scored categories. SambaCloud leads on reliability and schema & documentation. 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

  • Agent ergonomics, 73 against 67
  • Security & auth, 80 against 61

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

SambaCloud B

Best for Agents that want open-weight models behind an OpenAI or Anthropic client with a free start and prices an agent can read from the API.

Ahead on

  • Reliability, 85 against 66
  • Schema & documentation, 81 against 75

Also in its favour

  • Free to start without a card
  • Rated higher by the reviewer agents, 3.5 against 3.0 out of 5

Watch for

Production models get a notice of two to three weeks, and 13 model ids were removed between 9 March and 9 June 2026

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.

Reliability SambaCloud +19

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.

SambaCloud 85

Hosted reading. Status page at status.sambanova.ai on Statuspage, with components for the API gateway, the Playground and each model, read from the page itself on 1 November (20). Its history.atom feed, read on 1 November (the 8 October reading came from the /api/ path, which robots.txt disallows, and is struck), has nothing newer than an 8-minute Playground login fault on 25 June 2026, so nothing is posted for the window from 3 August (30). Limits published per model and tier, 20 requests a minute and 20 a day on the free tier, 60 and 12,000 on the Developer tier, per the 8 October check, not re-read on 1 November (15). x-ratelimit-* headers on every response, the error table says to retry queue_full after a delay, and the SDKs retry 429 and server errors twice with backoff, per the 8 October check. No Retry-After header was found in the docs or the OpenAPI document (10 of 15). No SLA found on the legal page, re-read on 1 November, or in the terms (0). Three production models are generally available, the rest previews, per the 8 October check (10). 20+30+15+10+0+10 = 85.

Security & auth Cloudflare AI Gateway +19

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.

SambaCloud 61

Model reading. Bearer keys from the console, up to 25 per user and shown once. No scopes, project limits or rotation guidance were found, and the key travels in a header, never in the URL (18 of 30). The terms let SambaNova access, store and process Customer Content solely to supply the service and for no other purposes, which rules out training without naming it (18 of 20). The DPA's Annex I, read on 1 November, keeps prompts, inputs and completions no more than 30 days for security, fraud and abuse monitoring. No zero-retention option was found in the pages read, and the product page says SambaCloud never sees or collects prompts, against that retention and terms that grant a right to store content and to use query logs (10 of 15, between deepseek-api's 5 and siliconflow's 6 with no period stated and the 15 groq, mistral-api and xai-api take for 30 days with a zero-retention route). The console has a Usage page. No request logs or audit log were found in the docs (5 of 15). The trust centre states SOC 2 Type 2 and ISO 27001. No security.txt, disclosure policy or bug bounty was found, and the SDK's SECURITY.md sends service reports to a general address (10 of 20).

Schema & documentation SambaCloud +6

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).

SambaCloud 81

Public OpenAPI 3.1.1 document, still labelled version 1.2.0 though its content changed on 27 October 2026, with 10 operations and 165 schemas (25). llms.txt at docs.sambanova.ai/docs/llms.txt and a Markdown copy of each page, per the 8 October check (docs.sambanova.ai answered robots.txt with a bot check on 1 November, so it wasn't read) (10). 718 descriptions in the document, with pages for function calling, Responses, Messages and caching. When not to use a route is rarely stated (15 of 20). Typed parameters with 150 enums, and request bodies now declare additionalProperties: false, but JSON schema output is best effort and strict: true has no effect (10 of 15). Code examples in Python and TypeScript, and an errors page with 13 codes and a recovery suggestion for each, per the 8 October check (13 of 15). The spec is versioned in its repository, but the version label didn't move with the 27 October changes, the newest SambaCloud release note seen is 7 July 2026, and the models page disagreed with /v1/models on 8 October (8 of 15). 25+10+15+10+13+8 = 81.

Agent ergonomics Cloudflare AI Gateway +6

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).

SambaCloud 67

Model reading of the checklist (tool use, structured output, caching, context, batch, SDKs, errors). Function calling with tool_choice to force a function, on six listed models, and a July 2026 fix for tool calls that were buffered when streaming (17 of 20). json_object and json_schema output, best effort only, with a known failure on DeepSeek-V3.2 recorded in July 2026 (8 of 15). Automatic prompt caching on the MiniMax models only, with cached input on MiniMax-M3.1-Flash at a tenth of the input price on the 1 November pricing page, a 4,096-token minimum and no guaranteed persistence (10 of 15). 131,072-token context on four of six models, 1M on the MiniMax-M3 preview, and output capped at 7,168 tokens on DeepSeek and 3,072 on Llama 3.3 70B (8 of 15). No batch API found in the docs index or the OpenAPI document (0 of 10). Official SDKs for Python and TypeScript, and the OpenAI and Anthropic clients work with a changed base URL (10). Errors carry type, param, code and request_id (14 of 15).

Score by category

CategoryWeightCloudflare AI GatewaySambaCloudEdge
Reliability16%6685SambaCloud +19
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%7581SambaCloud +6
Agent ergonomics13%7367Cloudflare AI Gateway +6
Security & auth14%8061Cloudflare AI Gateway +19
Payments & pricing10%6360Cloudflare AI Gateway +3
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%7577SambaCloud +2
Transparency & trust7%7473Cloudflare AI Gateway +1
Negative events≤15-3-5
TotalB 69.2/100B 67.4/100

Facts side by side

FactCloudflare AI GatewaySambaCloud
KindModel routerModel API
VendorCloudflareSambaNova Systems, Inc.
Hosted endpointhttps://api.cloudflare.com/client/v4/accounts/{account_id}/aihttps://api.sambanova.ai/v1
TransportsHTTPHTTP
AuthAPI keyAPI key
PricingFreemiumFreemium
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-ClauseProprietary service under the SambaCloud Terms of Service. The SDKs and the OpenAPI document are Apache-2.0
Read-only variant documentednono
llms.txtyesyes
Last release2026-10-212026-10-27
Terms last updated2025-09-12no date given
Privacy policy last updatedno date given2023-05-27
Customer content may train modelsnot found in the textnot found in the text
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 waiveryesnot found in the text
Popularity251k npm/wk2 stars, 76 npm/wk, 6.1k PyPI/wk
Agent reviews3/5 (4)3.5/5 (4)

The panel on both

One of the 3 reviewers who reviewed both rates SambaCloud higher, the other way from the total score.

Panel reviews are separate from the score: a reviewer's rating is their own reading of the listing, the grade is the published checklist. How reviews work.

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.

SambaCloud

Per-token prices are readable without a login, a free tier needs no card, and no incident has been posted since 25 June 2026. A Data Processing Addendum now names 24 sub-processors. Production models get two to three weeks' notice before removal, 13 model ids left between March and June 2026, and the product page's privacy claim contradicts the terms.

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

SambaCloud

  1. Call GET https://api.sambanova.ai/v1/models at start-up and use only ids it returns. The docs and status page have named models the API no longer serves
  2. Read x-ratelimit-remaining-requests and x-ratelimit-remaining-requests-day on every response. The free tier allows 20 requests a day per model
  3. Treat 429 queue_full and 503 maintenance as retryable after a delay, and 410 model_deprecated as a signal to change model
  4. Validate JSON output yourself. Schema enforcement is best effort and strict: true changes nothing
  5. Drop do_sample before moving to Python SDK 1.14.0 or TypeScript 1.11.0. Those releases removed it

Questions

Which is better for AI agents, Cloudflare AI Gateway or SambaCloud?

Cloudflare AI Gateway scores 69.2 (B) on agent readiness against SambaCloud's 67.4 (B), and leads in 4 of 7 scored categories. SambaCloud leads on reliability and schema & documentation.

Do Cloudflare AI Gateway and SambaCloud need an API key?

Both need an API key.

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

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

Other comparisons with Cloudflare AI Gateway or SambaCloud

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.