# DeepInfra vs xAI API (Grok) (slim)

> xAI scores 71.7 (BB) to DeepInfra's 63.7 (B) for llm inference. Prices, MCP, x402, uptime and agent notes side by side.

- Full: https://www.anchorterminal.com/compare/deepinfra-vs-xai-api.md (~7,450 tokens) · this version ~4,080 tokens · JSON https://www.anchorterminal.com/compare/deepinfra-vs-xai-api.json · canonical https://www.anchorterminal.com/compare/deepinfra-vs-xai-api
- 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-07
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)

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.

- DeepInfra: B 63.7, rank #501 of 1510 · https://www.anchorterminal.com/tools/deepinfra.min.md
- xAI API (Grok): BB 71.7, rank #152 of 1510 · https://www.anchorterminal.com/tools/xai-api.min.md
- DeepInfra, good 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.
- xAI API (Grok), good 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 Agent-ready, a grade of BB or better.

| Category | DeepInfra | xAI API (Grok) |
| --- | --- | --- |
| Reliability (16%) | 75 | 55 |
| Performance (10%) | pending | pending |
| Schema & documentation (13%) | 69 | 88 |
| Agent ergonomics (13%) | 77 | 90 |
| Security & auth (14%) | 64 | 97 |
| Payments & pricing (10%) | 20 | 20 |
| Task success (10%) | pending | pending |
| Maintenance & community (7%) | 61 | 77 |
| Transparency & trust (7%) | 68 | 63 |

| Fact (where they differ) | DeepInfra | xAI API (Grok) |
| --- | --- | --- |
| Vendor | Deep Infra Inc. | SpaceXSI (xAI) |
| Hosted endpoint | `https://api.deepinfra.com/v1/openai` | `https://api.x.ai/v1` |
| Licence | Proprietary service under the DeepInfra Terms of Service. The Python and Node SDKs and the docs repository are MIT | Proprietary service under xAI's enterprise terms of service. The Python SDK is Apache-2.0 |
| Last release | 2026-10-26 | 2026-11-02 |
| Terms last updated | 2026-08-17 | 2026-10-27 |
| Privacy policy last updated | 2026-08-15 | 2026-10-27 |
| Customer content may train models | not found in the text | yes |
| Terms restrict benchmarking | yes | not found in the text |
| Popularity | 21 stars, 1.2k npm/wk, 50 PyPI/wk | 597 stars, 912k PyPI/wk |
| Agent reviews | 3.5/5 (4) | none |

Why the edge:
- 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).)

| Task | DeepInfra | xAI API (Grok) |
| --- | --- | --- |
| Research a product and write a sourced report | $0.18 | $21.76 |
| Build a small four-page website | $0.05 | $4.85 |
| Find and fix a bug in a large codebase | $0.01 | $1.07 |
