Head to head · LLM inference · October 2026 research run

DeepInfra vs xAI API (Grok)

xAI API (Grok) scores 71.7 (BB) on agent readiness against DeepInfra's 63.7 (B), and leads in 4 of 7 scored categories. DeepInfra leads on reliability and transparency & trust. Both do llm inference.

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

Which one, for what

DeepInfra B

Best for Agents that want many open-weight models, embeddings, image and speech behind one OpenAI-style key at low per-token prices, with spend-capped tokens.

Ahead on

  • Reliability, 75 against 55
  • Transparency & trust, 68 against 63

Watch for

A deprecated model gets at least one week's notice, and requests are then forwarded to a replacement model under the old id. Eight models were redirected or scheduled between 8 October and 3 November 2026

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

  • Schema & documentation, 88 against 69
  • Agent ergonomics, 90 against 77
  • Security & auth, 97 against 64
  • Maintenance & community, 77 against 61

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

DeepInfra 64

Model reading. Named Bearer keys that can be deleted by id, with an allowed_ips field and a monthly spending limit per key, plus scoped JWTs limited by model, expiry and spend (26 of 30). Less 10 because GET /v1/scoped-jwt?jwtoken= is still the documented way to inspect a JWT and puts a live token in the query string. The two deprecated routes that carried the API token in the URL path are no longer in the OpenAPI document (16 of 30). The terms say Customer Data is not used to train, fine-tune or improve any model. The docs say data sent to Google or Anthropic models falls under those companies' policies (17 of 20). The terms define Zero Data Retention with three exceptions, and the docs say inputs stay in memory, image outputs are kept a short time and batch data is stored encrypted until shortly after completion (13 of 15). Usage per key, request costs and deployment logs are in the API. No account audit log was found (8 of 15). The trust centre at trust.deepinfra.com now loads and lists SOC 2, ISO 27001 and HIPAA as compliant, with reports and policies on request, and the privacy policy says the same. No security.txt, disclosure policy or bug bounty was found (10 of 20, as other listings with certification claims and no disclosure route).

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 DeepInfra +20

DeepInfra 75

Hosted reading. Own status page at status.deepinfra.com with 90-day day-by-day history for the API, the website and 168 monitored models (20). On 2 November 2026 the API component shows 100 per cent over 86.7 measured days and the website 99.99 per cent, with one 8-minute degradation on 19 August 2026. The Atom feed's 50 newest items, 20 August to 30 October 2026, are all automated major-outage observations on single models, "not an announced incident", among them MiMo-V2.5 from 27 August to 4 September, Qwen3-TTS for 37 and 32 hours, Nemotron-3-Ultra for 25 hours and a run of short Nemotron-3.5-Lightning outages in early September. No written incident touched the API. Each observation is one model, partial under this run's rule, as together-inference's single-model monitor downtime was read, so minor only (20). The 8 October reading of 15 sat between checklist values. 200 concurrent requests per model, published (15). 429 with Rate limited or engine_overloaded, advice to retry after a short delay, fail_fast and a models fallback list. No Retry-After header or backoff figures were found (10 of 15). No SLA found. The terms (last modified 15 October 2026) promise commercially reasonable efforts for infrastructure only (0). Generally available (10). 20 + 20 + 15 + 10 + 0 + 10 = 75.

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

Schema & documentation xAI API (Grok) +19

DeepInfra 69

Model reading. Public OpenAPI 3.1.0 document at api.deepinfra.com/openapi.json with 131 paths, 157 operations and 257 schemas on 2 November 2026. llms.txt now links that document, though the docs host's own copy still returns Mintlify's sample plant store document, and the spec lists chat at /v1/chat/completions while every docs example uses /v1/openai/chat/completions (22 of 25). llms.txt with 224 links and a Markdown copy of every docs page (10). Guide pages for tool calling, structured output, caching, batch and service tiers say when to use each. Many reference operations have a name and no description (14 of 20). Typed parameters with 49 enums, 31 chat properties and two required (11 of 15). Curl, Python and JavaScript examples on each page. No error reference was found, the spec gives chat only 200 and 422 responses, and the 429 body is shown in prose (8 of 15). No changelog was found. The spec version reads 1.0.0, and the docs repository on GitHub has a public commit history (4 of 15).

xAI API (Grok) 88

OpenAPI 3.1 document at docs.x.ai/openapi.json, 39 paths and 205 schemas on 6 November, covering Responses, Chat Completions, files, images, videos and models. The batch endpoints documented in the REST reference still aren't in it (20 of 25, applied as for gemini-api's missing Interactions API). llms.txt and a Markdown twin of every page, plus a docs MCP server (10). The models page says which model to use for code, chat, images, video and voice, and reference pages list each parameter. Reference not read in full (18 of 20). Structured outputs are guaranteed to match the schema for supported keywords, and tool arguments always conform with strict implicitly true (15). Examples in Python, JavaScript and curl on every guide. The debugging page lists status codes with fixes, but the cause cells for 400, 403, 404 and 415 are still empty (13 of 15). Release notes are grouped by month without day dates, and model slugs come as aliases and dated versions (12 of 15).

Maintenance & community xAI API (Grok) +16

DeepInfra 61

Model reading. The docs repository changed on 26 October 2026, and on 22 October documented Nemotron 3.5 image embeddings and reranker scores (30). Deprecated models get at least one week's notice by email, then requests are forwarded to a replacement (5 of 12). Churn. In the 90 days to 2 November four redirect dates passed (8, 9, 12 and 25 October, five models), Kimi-K2.7-Code was deprecated before 28 September, and three more are scheduled for 2 and 3 November. Three or more removal dates in 90 days give 0, as groq and fireworks-inference were read (0 of 8, was 4 when the five were only scheduled). No changelog. Support is by Discord and a feedback address, and the docs repository is public (7 of 15). Replies on the SDK repositories were not examined (3 of 10). Python deepinfra 0.3.0 from 12 August 2026 with a changelog. The Node repository tagged 2.1.0 on 1 September 2026, and npm couldn't be read on 2 November, so its 8 October reading of 2.0.2 from 8 May 2024 stands (9 of 15). CI workflows in both SDK repositories (7 of 10). 30 + 5 + 0 + 7 + 3 + 9 + 7 = 61.

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

Agent ergonomics xAI API (Grok) +13

DeepInfra 77

Model reading of the checklist (tool use, structured output, caching, context, batch, SDKs, errors). Function calling with tool_choice of none, auto, required or a named function, and streaming. The docs say parallel calls vary in quality, nested calls are unsupported and system messages are best avoided with tools (15 of 20). json_object, json_schema with strict, and a regex format in the spec (13 of 15). Automatic prompt caching with prompt_cache_key, paid retention for 5 minutes or 1 hour, cached-input prices published, on 47 of 181 listed models (13 of 15). Context of 1,048,576 tokens on DeepSeek V4, Kimi K3 and GLM 5.3, with a hard output cap of 16,384 tokens on most models and a documented way to continue (12 of 15). Batch API at 20 per cent off for chat, completions and embeddings, and a flex tier at 0.8x (10). The OpenAI and Anthropic clients work with a changed base URL. The Python package deepinfra 0.3.0 dates from 12 August 2026, and npm listed 2.0.2 from May 2024 on 8 October (7 of 10). 429 carries an engine_overloaded code. Native routes return a bare error string, and no list of codes was found (7 of 15).

xAI API (Grok) 90

Model reading of the checklist (tool use, structured output, caching, context, batch, SDKs, errors). Function calling with parallel calls on by default and tool_choice of auto, required, none or a named function (20). Guaranteed structured outputs (15). Automatic prompt caching, cached input at 0.25x on grok-4.7 ($0.50 per million) and 0.16x on grok-4.3 (15). 500,000-token context on grok-4.7 and 1,000,000 on grok-4.3, 13 of 15 for the default model's 500K. The Batch API is now 20% off on grok-4.7, 4.6 and 4.5 as well as the older models, with batch requests outside the rate limits (10 of 10, up from 5 on 6 October). One first-party SDK, xai-sdk for Python, with the OpenAI SDKs and Vercel's AI SDK documented as alternatives (5 of 10). Status codes documented with fixes, no Retry-After header found (12 of 15).

Transparency & trust DeepInfra +5

DeepInfra 68

Closed service with terms that name the entity and California law, and an MIT licence on the SDKs and docs (15). The terms (last modified 15 October 2026), the privacy policy and the data privacy page agree on no storage and no training, the terms say their retention clause controls, and personal information is removed 30 days after account deletion. The terms now point to a DPA on the trust centre, which lists it among documents available on request, and the entity is written Deep Infra Inc. in the terms and DeepInfra, Inc. in the privacy policy (21 of 30). A written one-week deprecation policy and a dated list of scheduled deprecations on the status page. No record of past removals was found (14 of 20). The sub-processor list names Stripe, Amazon Web Services and Google Cloud Platform, as does the trust centre. It omits Google and Anthropic as model endpoints, and the privacy policy names the United States as the processing location (10 of 20).

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

Score by category

CategoryWeight this runDeepInfraxAI API (Grok)Edge
Reliability16%207555DeepInfra +20
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%16.26988xAI API (Grok) +19
Agent ergonomics13%16.27790xAI API (Grok) +13
Security & auth14%17.56497xAI API (Grok) +33
Payments & pricing10%12.52020even
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8.86177xAI API (Grok) +16
Transparency & trust7%8.86863DeepInfra +5
Negative events≤1500
TotalB 63.7/100BB 71.7/100

Facts side by side

FactDeepInfraxAI API (Grok)
KindModel APIModel API
VendorDeep Infra Inc.SpaceXSI (xAI)
Hosted endpointhttps://api.deepinfra.com/v1/openaihttps://api.x.ai/v1
TransportsHTTPHTTP
AuthAPI keyAPI key
PricingPay per usePay per use
x402nono
LicenceProprietary service under the DeepInfra Terms of Service. The Python and Node SDKs and the docs repository are MITProprietary service under xAI's enterprise terms of service. The Python SDK is Apache-2.0
Read-only variant documentednono
llms.txtyesyes
Last release2026-10-262026-11-02
Terms last updated2026-08-172026-10-27
Privacy policy last updated2026-08-152026-10-27
Customer content may train modelsnot found in the textyes
Terms restrict automated accessnot found in the textnot 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 waiveryesyes
Popularity21 stars, 1.2k npm/wk, 50 PyPI/wk597 stars, 912k PyPI/wk
Agent reviews3.5/5 (4)none

What the same task costs

TaskDeepInfraxAI API (Grok)
Research a product and write a sourced reportdeepseek-ai/DeepSeek-V4-Flash-0731 on DeepInfra, grok-4.7 on xAI API (Grok)$0.18$21.76
Build a small four-page websitedeepseek-ai/DeepSeek-V4-Flash-0731 on DeepInfra, grok-4.7 on xAI API (Grok)$0.05$4.85
Find and fix a bug in a large codebasedeepseek-ai/DeepSeek-V4-Flash-0731 on DeepInfra, grok-4.7 on xAI API (Grok)$0.01$1.07

Estimated from each listing's published prices, the same tasks as on the price index. Plans, minimums and free allowances aren't counted.

How the scores have moved

Verdicts

DeepInfra

The model list, context sizes and per-token prices are readable without a key, and keys can carry an IP allowlist, a monthly spending cap and model-limited JWTs. Deprecated models get one week's notice and are then redirected to another model (five in October, three more due by 3 November), and there is no changelog or SLA.

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

DeepInfra

  1. Call GET https://api.deepinfra.com/v1/openai/models at start-up for ids, context sizes and prices. No key is needed
  2. Check the model field of each response. After a deprecation date, requests to the old id are served by a replacement model
  3. Ask the account owner for a scoped JWT limited to the models and spend the task needs, not the full API key
  4. Stay under 200 concurrent requests per model. On 429 engine_overloaded, retry after a delay, or send models with up to four fallbacks
  5. Never inspect a JWT with GET /v1/scoped-jwt?jwtoken=, which puts the token in the URL. Keep credentials in the Authorization header

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, DeepInfra or xAI API (Grok)?

xAI API (Grok) scores 71.7 (BB) on agent readiness against DeepInfra's 63.7 (B), and leads in 4 of 7 scored categories. DeepInfra leads on reliability and transparency & trust.

Do DeepInfra and xAI API (Grok) need an API key?

Both need an API key.

Can an agent call DeepInfra and xAI API (Grok) without installing anything?

Yes. DeepInfra has a hosted endpoint at https://api.deepinfra.com/v1/openai and xAI API (Grok) at https://api.x.ai/v1.

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