Head to head · LLM inference · October 2026 research run

Gemini 4 Hydrogen vs xAI API (Grok)

xAI API (Grok) scores 72.9 (BB) on agent readiness against Gemini 4 Hydrogen's 64.9 (B), and leads in 3 of 7 scored categories. Gemini 4 Hydrogen leads on payments & pricing, maintenance & community and transparency & trust. Both do llm inference.

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

Which one, for what

Gemini 4 Hydrogen B

Best for Agents doing everyday coding, tool calls and document work at volume on the Gemini API, including ones that need to start on a free key, or as the executor beside Carbon or Argon.

Ahead on

  • Payments & pricing, 40 against 30
  • Maintenance & community, 85 against 77
  • Transparency & trust, 72 against 63

Watch for

temperature, top_p and top_k are ignored, and thinking_budget, MINIMAL, penalties and extra candidates return a 400

xAI API (Grok) BB

Best for Agents that want a capable model at a low per-token price with built-in web and X search, remote MCP and voice, and teams that need self-serve ZDR or US-only processing.

Ahead on

  • Reliability, 55 against 45
  • Security & auth, 97 against 50

Also in its favour

  • Agent-ready, a grade of BB or better

Watch for

API models outage of about 3 hours 40 minutes on 3 September 2026, and high error rates on grok-4.6 and grok-4.5 on 17 August

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.

Security & auth xAI API (Grok) +47

Gemini 4 Hydrogen 50

Model reading for gemini-4-hydrogen on the Gemini API. Platform facts are the Gemini API listing's (gemini-api, re-read 1 November), carried over as RULES.md allows for a model on an already graded platform. Keys bound to a service account and restricted to the Gemini API, with no scopes and a token accepted in the URL (15 of 30, the platform's deduction). Hydrogen is on the free tier, where Google's terms say content is used to improve products and may be read by humans; paid-tier content isn't (10 of 20, the platform's reading; Carbon, paid tier only, got 15). Abuse retention has no number and new paid projects store requests by default since 26 October; Google's prompt-injection figure (2.3 times more resilient on Gray Swan's benchmark) is its own, and the model card says jailbreak resistance is still being improved (5 of 15). Request logs for billed projects (15). security.txt and a reward programme, no certification naming the API (5 of 20). 15 + 10 + 5 + 15 + 5 = 50.

xAI API (Grok) 97

Model reading. Team API keys with ACLs per endpoint and per model, QPM and TPM caps, expiry, and create, rotate, disable and delete through the Management API, plus documented mTLS. GitHub secret scanning disables leaked keys and emails the owner (30). The security FAQ says SpaceXSI never trains on API inputs or outputs without explicit permission (20). Requests and responses are kept 30 days for abuse auditing, then deleted, and team admins can switch on zero data retention themselves, confirmed by an x-zero-data-retention header on every response (15). Console audit log and a Management API audit-events endpoint, plus optional per-key request logging (15). security.txt valid to 2027-06-29 with a HackerOne bug bounty and a separate safety contact for prompt-injection issues. SOC 2 Type 2 is claimed in the security FAQ with the reports behind an NDA in the trust centre, so 17 of 20. Remote MCP doesn't support require_approval, which the model checklist doesn't score but reviewers should see. New in October, a guidelines array lets the caller make the model decline nsfw, violence or profanity content, which the checklist doesn't score.

Reliability xAI API (Grok) +10

Gemini 4 Hydrogen 45

Model reading for gemini-4-hydrogen on the Gemini API. Platform facts are the Gemini API listing's (gemini-api, re-read 1 November), carried over as RULES.md allows for a model on an already graded platform. Status page at aistudio.google.com/status with no readable components or history (10 of 20) and no readable incident record (5 of 30). Rate-limit tiers and spend limits published, per-model limits in AI Studio (5 of 15). Backoff guidance for 429 and 503 and SDK retries (15). No SLA (0). Google Cloud's release notes and model page call Hydrogen generally available, a short-term release, under the same model ID; the Gemini API pages read don't name a stage, so full marks rest on Cloud's statement (10, a judgement call; Carbon, with no stage stated anywhere, got 5). 10 + 5 + 5 + 15 + 0 + 10 = 45.

xAI API (Grok) 55

Status page at status.x.ai with components for the global and US API endpoints, voice, the consumer apps and, since the Cursor merger, Cursor's services, with an RSS feed (20). The feed, read on 6 November, now holds 267 incidents back to 11 August, so the whole 90-day window is readable. On the API components there were high error rates on grok-4.6 and grok-4.5 from 21:57 to 23:28 UTC on 17 August (about 90 minutes) and a models outage on the global and US endpoints from 13:30 to 17:09 UTC on 3 September (about 3 hours 40 minutes), so several majors. A 26-minute datacenter outage across the API on 22 September, voice disruptions of 12 and 28 minutes on 10 September and 6 October, a 63-minute voice and Imagine degradation on 30 October and a 37-second model degradation on 24 October add to the record (0). Rate limits published per model and tier, grok-4.7 at Tier 0 is 150 requests a second and 50M TPM, with the per-second cap derived as RPM divided by 48 (15). The rate-limits page shows exponential backoff on 429, but no Retry-After header or overload guidance was found (10 of 15). No SLA found in the docs or llms.txt (0). The Responses API has been GA since September 2025 and grok-4.7 carries no preview label (10).

Payments & pricing Gemini 4 Hydrogen +10

Gemini 4 Hydrogen 40

Model reading for gemini-4-hydrogen on the Gemini API. Platform facts are the Gemini API listing's (gemini-api, re-read 1 November), carried over as RULES.md allows for a model on an already graded platform. No machine payment protocol (0). Prices published in Google's announcement without a login, $1.50 input and $7.50 output per million tokens, flat across the window; the Gemini API pricing page, now at aistudio.google.com, is still to be read for Hydrogen's row (20). A free tier with no card: Google's announcement puts Hydrogen on all tiers of the Gemini API, and the free tier needs no billing account per the gemini-api listing; its limits for Hydrogen are on that pricing page (20). A Google account and AI Studio for a key (0). 0 + 20 + 20 + 0 = 40.

xAI API (Grok) 30

No x402, MPP or L402 (0). Per-token and per-call prices published without a login on docs.x.ai/developers/pricing (20). No free tier found for the text API, and the quickstart says to load the account with credits (0). Sign-up is in the browser at console.x.ai. The Management API can create keys and top up prepaid credit, but only with a management key made by a person in the console, so no line credit (0). Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 20 is 30.

Transparency & trust Gemini 4 Hydrogen +9

Gemini 4 Hydrogen 72

Model reading for gemini-4-hydrogen on the Gemini API. Platform facts are the Gemini API listing's (gemini-api, re-read 1 November), carried over as RULES.md allows for a model on an already graded platform. Closed service with clear terms, SDKs Apache-2.0 (15). Free-tier content is used to improve products, paid-tier content isn't, abuse retention has no number, and request storage is on by default for new paid projects; the statements agree with each other (20 of 30). Deprecations table, and a stated 45-day minimum on Cloud (15 of 20). Data may be cached anywhere Google has facilities; no subprocessor list checked (5 of 20). A DeepMind model card gives a March 2026 knowledge cutoff, automated safety results and Frontier Safety Framework outcomes, with the full safety report marked coming soon. Every benchmark figure is Google's own. 15 + 20 + 15 + 5 = 55.

xAI API (Grok) 63

Closed service under xAI's enterprise terms, with the Python SDK under Apache-2.0 (15). The docs agree with each other on no training, 30-day abuse retention, 30-day storage of stateful responses and the ZDR route, but the privacy policy, enterprise terms and DPA at x.ai/legal answered a Cloudflare block page on 6 October and again on 6 November, so they couldn't be compared (15 of 30). Dated migration guides and redirect tables for each retirement, but no written deprecation policy, and Chat Completions, Anthropic compatibility and grok-voice-2.0 are labelled deprecated with no date (12 of 20). The US regional endpoint states what stays in the US, the global endpoint guarantees no region, and no subprocessor list was readable (10 of 20).

Maintenance & community Gemini 4 Hydrogen +8

Gemini 4 Hydrogen 85

Model reading for gemini-4-hydrogen on the Gemini API. Platform facts are the Gemini API listing's (gemini-api, re-read 1 November), carried over as RULES.md allows for a model on an already graded platform. Released on 12 November 2026, recorded in Google Cloud's release notes; the Gemini API changelog, last updated 30 October, has no entry for it yet (30). Google Cloud states a minimum of 45 days' notice before Hydrogen is retired, short and stated for Cloud only; the Gemini API's deprecations give earliest dates with no stated minimum (6 of 12). Shutdowns in the last 90 days kept to their table (4 of 8). Dated changelog (15). SDK replies not sampled (5 of 10). Current SDKs; the developer guide names the minimum google-genai, @google/genai, Go and Java versions (15). Runtimes stated (10). 30 + 6 + 4 + 15 + 5 + 15 + 10 = 85.

xAI API (Grok) 77

Model reading. grok-imagine-image-quality and grok-imagine-image-pro retired on 2 November 2026 as announced in September, Grok Voice 3.0 and custom moderation controls in October, Grok 4.7 on 21 September (30). No minimum notice period found. Retirements come as dated migration guides, retired slugs redirect to a replacement rather than failing, billed at the replacement's price, and grok-voice-2.0 was deprecated in October with no end date (4 of 12). Shutdowns in the last 90 days with dates given in advance, grok-voice-transcribe-1.0 on 2 October and grok-imagine-image-quality on 2 November (8 of 8). Release notes several times a month but dated only by month, support by email and a Discord #help channel, not tested. On xai-sdk-python a collaborator commented on 2 of the 16 most recent threads with replies, and most outside pull requests since 23 October are open without a maintainer reply (10 of 15, down from 12). The repository has CI, release and version-bump workflows (5 of 10). One current first-party SDK, xai-sdk 1.21.0 tagged on 23 October, Python only (10 of 15). Supported runtimes stated, Python 3.10 or later (10).

Score by category

CategoryWeight this runGemini 4 HydrogenxAI API (Grok)Edge
Reliability16%204555xAI API (Grok) +10
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%16.28588xAI API (Grok) +3
Agent ergonomics13%16.29090even
Security & auth14%17.55097xAI API (Grok) +47
Payments & pricing10%12.54030Gemini 4 Hydrogen +10
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8.88577Gemini 4 Hydrogen +8
Transparency & trust7%8.87263Gemini 4 Hydrogen +9
Negative events≤1500
TotalB 64.9/100BB 72.9/100

Facts side by side

FactGemini 4 HydrogenxAI API (Grok)
KindModel APIModel API
VendorGoogleSpaceXSI (xAI)
Hosted endpointhttps://generativelanguage.googleapis.com/v1betahttps://api.x.ai/v1
TransportsHTTP
AuthAPI keyAPI key
PricingPay per usePay per use
x402nono
LicenceClosed model, used through the Gemini API and Google's apps under Google's termsProprietary service under xAI's enterprise terms of service. The Python SDK is Apache-2.0
Read-only variant documentednono
llms.txtyesyes
Last release2026-11-122026-11-02
Terms last updated2026-04-282026-10-27
Privacy policy last updated2026-10-012026-10-27
Customer content may train modelsyesyes
Terms restrict automated accessyesnot found in the text
Terms restrict benchmarkingyesnot found in the text
Terms or service can change without noticenot found in the textnot found in the text
Arbitration or class-action waivernot found in the textyes
Popularitynone597 stars, 912k PyPI/wk

How the scores have moved

Verdicts

Gemini 4 Hydrogen

Google's fast Gemini 4 model, on every tier of the Gemini API including the free one, at $1.50 and $7.50 per million tokens with a 1M-token budget, four thinking levels, function calling and structured output. Sampling parameters are ignored, explicit caching isn't supported, it's a short-term release with 45 days' notice on Cloud, and the benchmarks are Google's.

xAI API (Grok)

Grok 4.7 at $2/$6 per million tokens, now 20% off in batch, with a public OpenAPI spec, llms.txt, API keys limited by endpoint and model, and self-serve zero data retention. The API endpoints had a 3 hour 40 minute models outage on 3 September 2026, no SLA was found, and there's no free tier or first-party SDK beyond Python.

Before you call either

Gemini 4 Hydrogen

  1. Call generateContent at https://generativelanguage.googleapis.com/v1beta with model gemini-4-hydrogen and an x-goog-api-key
  2. Set thinking_level instead of thinking_budget; the default is HIGH, so set MEDIUM to keep 3.8 Flash's latency
  3. Don't send temperature, top_p, top_k, penalties or candidate_count above 1
  4. Pass every thought_signature back in its original part, on the first parallel functionCall only, or the call returns a 400
  5. Put static content of 4,096 tokens or more first so implicit caching applies, and keep confidential prompts off the free tier

xAI API (Grok)

  1. Build on the Responses API at https://api.x.ai/v1. Chat Completions is labelled deprecated and the Anthropic-compatible endpoint fully deprecated
  2. Pin a dated model slug. A retired slug keeps answering from a replacement model, billed at the replacement's price
  3. Back off exponentially on 429. The per-second cap is the per-minute budget divided by 48, with a minimum of 2
  4. Set allowed_tools on remote MCP servers. There's no approval step, and every exposed tool enters the context
  5. Use https://us.api.x.ai/v1 when processing must stay in the US. It costs 1.1x and serves only grok-4.7 and grok-4.6

Questions

Which is better for AI agents, Gemini 4 Hydrogen or xAI API (Grok)?

xAI API (Grok) scores 72.9 (BB) on agent readiness against Gemini 4 Hydrogen's 64.9 (B), and leads in 3 of 7 scored categories. Gemini 4 Hydrogen leads on payments & pricing, maintenance & community and transparency & trust.

Do Gemini 4 Hydrogen and xAI API (Grok) need an API key?

Both need an API key.

Can an agent call Gemini 4 Hydrogen and xAI API (Grok) without installing anything?

Yes. Gemini 4 Hydrogen has a hosted endpoint at https://generativelanguage.googleapis.com/v1beta and xAI API (Grok) at https://api.x.ai/v1.

Other comparisons with Gemini 4 Hydrogen or xAI API (Grok)

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.