# Cloudflare AI Gateway vs Tencent Cloud TokenHub (slim)

> Cloudflare AI Gateway scores 67.8 (B) to Tencent Cloud TokenHub's 59.5 (C) for llm inference. Prices, MCP, x402, uptime and agent notes side by side.

- Full: https://www.anchorterminal.com/compare/cloudflare-ai-gateway-vs-tencent-tokenhub.md (~7,350 tokens) · this version ~3,980 tokens · JSON https://www.anchorterminal.com/compare/cloudflare-ai-gateway-vs-tencent-tokenhub.json · canonical https://www.anchorterminal.com/compare/cloudflare-ai-gateway-vs-tencent-tokenhub
- Index: https://www.anchorterminal.com/llms.txt · API: https://www.anchorterminal.com/api/v1/index.json · MCP: https://www.anchorterminal.com/mcp · Updated: 2026-11-01
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)

Cloudflare AI Gateway scores 67.8 (B) on agent readiness against Tencent Cloud TokenHub's 59.5 (C), and leads in 6 of 7 scored categories. Tencent Cloud TokenHub leads on agent ergonomics. Both do llm inference.

- Cloudflare AI Gateway: B 67.8, rank #235 of 1260 · https://www.anchorterminal.com/tools/cloudflare-ai-gateway.min.md
- Tencent Cloud TokenHub: C 59.5, rank #646 of 1260 · https://www.anchorterminal.com/tools/tencent-tokenhub.min.md
- Cloudflare AI Gateway, good 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 46; Security & auth, 80 against 71; Payments & pricing, 52 against 35; Transparency & trust, 74 against 54.
- Tencent Cloud TokenHub, good for Teams in or near Tencent Cloud that want one key and bill for Tencent's Hy models and Chinese open-weight models (DeepSeek, Kimi, GLM, MiniMax, Qwen, MiMo) with per-key limits and CNY billing. Ahead on Agent ergonomics, 83 against 73.

| Category | Cloudflare AI Gateway | Tencent Cloud TokenHub |
| --- | --- | --- |
| Reliability (16%) | 66 | 46 |
| Performance (10%) | pending | pending |
| Schema & documentation (13%) | 75 | 73 |
| Agent ergonomics (13%) | 73 | 83 |
| Security & auth (14%) | 80 | 71 |
| Payments & pricing (10%) | 52 | 35 |
| Task success (10%) | pending | pending |
| Maintenance & community (7%) | 75 | 73 |
| Transparency & trust (7%) | 74 | 54 |

| Fact (where they differ) | Cloudflare AI Gateway | Tencent Cloud TokenHub |
| --- | --- | --- |
| Vendor | Cloudflare, Inc. | Tencent Cloud |
| Hosted endpoint | `https://api.cloudflare.com/client/v4/accounts/{account_id}/ai` | `https://tokenhub.tencentmaas.com/v1` |
| Pricing | Freemium | Pay per use |
| x402 | payer tooling only | no |
| Licence | Proprietary 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 | Proprietary service under the TokenHub Terms of Service, the TokenHub SLA and the Tencent Cloud Service Agreement, with a special note for third-party deployed models. The `tencent-tokenhub-cli` package is Apache-2.0 |
| Last release | 2026-10-21 | 2026-10-24 |
| Terms last updated | 2025-09-12 | couldn't be read |
| Privacy policy last updated | no date given | couldn't be read |
| Customer content may train models | not found in the text | couldn't be read |
| Terms restrict automated access | yes | couldn't be read |
| Terms restrict benchmarking | not found in the text | couldn't be read |
| Terms or service can change without notice | yes | couldn't be read |
| Arbitration or class-action waiver | yes | couldn't be read |
| Popularity | 251k npm/wk | 204 npm/wk |
| Agent reviews | 3/5 (4) | none |

Why the edge:
- Reliability, Cloudflare AI Gateway +20: 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.); Tencent Cloud TokenHub 46 (Hosted reading. No public status page was found. status.cloud.tencent.com did not answer and the Tencent Cloud health dashboard documentation answered with a bot check (0). With no page there is no incident record to read (5 of 30). The announcements carry one incident, DeepSeek's directly supplied models unavailable from 9:06 to 13:04 Beijing time on 15 October 2026 after a fault at DeepSeek, compensated with vouchers. Rate limits are per model, shown in the console and returned by DescribeModelQuota. The public docs give numbers only for batch jobs (20 created a minute, 10 active), image models (5 concurrent) and DeepSeek V4 Flash and Pro (2,500 and 500 concurrent), with the rules for self-serve increases (8 of 15). Six 429 codes separate RPM, TPM, TPD, concurrency and upstream capacity, 429s may carry `Retry-After` and the docs advise exponential backoff. No idempotency guidance, though inference calls are not writes (13 of 15). The TokenHub SLA promises 99.5% monthly availability with vouchers of 10, 25 or 50 per cent of the month's fee. It excludes free use and third-party deployed models such as DeepSeek's directly supplied ones (10). Generally available since 7 April 2026, with some models marked preview (10).)
- Transparency & trust, Cloudflare AI Gateway +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.); Tencent Cloud TokenHub 54 (Closed service under the TokenHub Terms of Service (effective 14 September 2026), the SLA (23 April 2026), a special note on third-party deployed models and the Tencent Cloud Service Agreement, naming Tencent Cloud Computing (Beijing) Co., Ltd. The CLI is Apache-2.0 (18 of 30). The terms and the FAQ agree that inputs are processed on the customer's instructions and not used for training, and clause 2.14 limits retention to what the service needs without periods. The TokenHub privacy policy on privacy.qq.com renders only with JavaScript and was not read (15 of 30). Dated retirement notices, shutdown dates in the model list, a `pre-offline` status in `/v1/models` and a `DiscontinuedAt` field in the control API. Clause 6.3 refunds paid, unused tokens when a third-party model is removed. No minimum notice period is written (13 of 20). Clause 2.13 places processing generally in mainland China for the China site and in Singapore for the international site, and the third-party model list names DeepSeek's Hangzhou company with a link to its terms. No subprocessor list was found (13 of 20).)
- Payments & pricing, Cloudflare AI Gateway +17: 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.); Tencent Cloud TokenHub 35 (No x402, MPP or L402 (0). Per-token prices for every model are public in CNY for Guangzhou and Singapore, with DeepSeek's peak and off-peak rates (20). Each account gets 1M free tokens per language model, valid for a year, in a campaign running to 31 December 2026. No card is mentioned, but the account needs real-name verification, so this line takes 15 of 20. A person signs up and completes real-name verification in a browser. Keys can then be created in code or by `thcli auth login`, but only from that account (0).)
- Agent ergonomics, Tencent Cloud TokenHub +10: 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).); Tencent Cloud TokenHub 83 (Router, read on the model lines. Function calling is marked on most chat models in the model list, with behaviour depending on the model routed (14 of 20). Structured output is marked per model and missing on the MiniMax and Qwen models, and an unsupported `response_format` returns code 400006 (12 of 15). Cache-hit prices are published per model, Kimi K3.1 Pro lists five-minute and one-hour cache writes, and a guide covers `prompt_cache_key` and the `X-Session-ID` header for instance affinity (14 of 15). Most listed chat models have contexts of one million tokens, a judgement call since a router has no default model (15). Batch at half price covers only Hy3 and Hy4 preview, reads and writes JSONL in the customer's own COS bucket and is documented for the Guangzhou endpoint (5 of 10). No TokenHub inference SDK. The OpenAI and Anthropic SDKs work with a changed base URL, and Tencent Cloud SDK 3.0 and the `thcli` CLI cover the control plane (8 of 10). Errors return a code, English and Chinese messages, the source, the upstream code and status and a request ID, and stream errors arrive as SSE error frames (15 of 15).)
- Security & auth, Cloudflare AI Gateway +9: 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.); Tencent Cloud TokenHub 71 (Router, read on the model lines. Bearer keys can be limited to chosen models and inference services, up to 200 source IP ranges and daily, monthly or total token quotas, can be disabled or deleted, and can be created in code through CreateApiKey with signed Tencent Cloud credentials. Keys are long-lived with no expiry setting or built-in rotation (26 of 30). Clause 2.17 of the terms says inputs are not used to train Tencent Cloud's own models, and the FAQ says data is not used for training. Inputs to third-party deployed models (DeepSeek's directly supplied ones) go to DeepSeek under its terms (14 of 20). Clause 2.14 keeps data only as long as the service needs, with no periods stated. When a customer asks for generated content without AI labels, Tencent Cloud keeps logs of who received it for at least six months. No zero-retention option was found (7 of 15). Per-call audit logs (request ID, key, client IP, status, tokens, latency) and optional full call logs go to the customer's CLS, billed separately, with usage by key and a monitoring dashboard (14 of 15). No security.txt on cloud.tencent.com, www.tencent.com or tokenhub.tencentmaas.com (404). Tencent's bug bounty through TSRC lists Tencent Cloud in scope. No certification for TokenHub was checked (10 of 20).)
