# xAI

Canonical: https://inetgeek.com/llm-apis/xai/

Hosted inference for the Grok model family from xAI (SpaceXAI in its docs), priced per million tokens with a higher rate once a prompt reaches 200k tokens.

## Who it suits

Grok models on pay-as-you-go credits: grok-4.7 at $2 in / $6 out per million tokens with a 500k context, or grok-4.3 at $1.25 / $2.50 with a 1M context and 20% off through the Batch API, plus a US-only endpoint when data must stay in the US.

Consider something else if You need a free tier, EU residency or paperwork up front: there is no free offer, the only residency option is a US endpoint, HIPAA starts with a BAA questionnaire, and SOC 2 details sit behind an NDA. Prompts of 200k tokens or more are billed at double on every token.

## iScore

44 / 100 (80% interval 36–52), rank 10 of 10 in llm-apis — interval overlaps the next rank, so this is an ordering, not a finding.

inetGeek's own reading, computed from sourced facts against category peers by disclosed rules. Not a provider claim. Intervals are 80%; a provider with few documented facts is pulled toward the category middle rather than scored on what little is known.
Method: https://inetgeek.com/iscore/. Full output with every criterion's basis: https://inetgeek.com/scores.json. Every llm-apis peer ranked: https://inetgeek.com/llm-apis/xai/alternatives/

- Price: 27 (12–41), weight 42%, 5 of 7 criteria scored; scored for peers, not here — undocumented or stated without a number or a yes/limited/no: free_card_required, gpu_hourly_price
- Capacity and limits: 34 (15–52), weight 30%, 2 of 4 criteria scored; scored for peers, not here — undocumented or stated without a number or a yes/limited/no: max_output_tokens, max_vram
- Capabilities: 100 (94–100), weight 5%, 1 of 1 criteria scored
- Trust and compliance: 73 (62–84), weight 12%, 5 of 12 criteria scored; scored for peers, not here — undocumented or stated without a number or a yes/limited/no: customer_managed_keys, dedicated_infrastructure, iso27001, pci_dss, private_networking, support_included, uptime_sla
- Evidence: 88 (88–88), weight 11%, 4 of 4 criteria scored

## What the documentation says

### Pricing

- Free tier: No ([source](https://docs.x.ai/developers/quickstart), read 2026-09-25)
- Kind of free offer: No free offer — Usage draws on purchased credits; the billing page mentions promo codes but publishes no free offer. ([source](https://docs.x.ai/developers/quickstart), read 2026-09-25)
- Entry paid plan: No plan fee: API usage is drawn from prepaid credits bought in the xAI Console, with monthly invoicing off by default and requested through sales. Auto top-ups start at $5; no minimum is stated for a one-off credit purchase. ([source](https://docs.x.ai/console/billing), read 2026-09-25)
- Pricing model: Per million tokens, per model, with a higher long-context rate applied to every token in a request once its prompt reaches 200k tokens. Priority processing bills at 2x, the US regional endpoint at 1.1x, and some models take a batch discount. ([source](https://docs.x.ai/developers/pricing), read 2026-09-25)

### Infrastructure

- Regions: Two API endpoints: the global api.x.ai, which may route requests between regions and guarantees no processing location, and a US regional endpoint (us.api.x.ai) serving only grok-4.7 and grok-4.6 at a 10% token premium. ([source](https://docs.x.ai/developers/advanced-api-usage/regions), read 2026-09-25)

### Inference

- Input price, top model: $2.00 per million input tokens for grok-4.7 below 200k prompt tokens; $4.00 once a prompt reaches 200k, billed on every token in that request. ([source](https://docs.x.ai/developers/pricing), read 2026-09-25)
- Output price, top model: $6.00 per million output tokens for grok-4.7 below 200k prompt tokens; $12.00 at long context. ([source](https://docs.x.ai/developers/pricing), read 2026-09-25)
- Input price, cheapest model: $1.25 per million input tokens for grok-4.3 below 200k prompt tokens (output $2.50), the cheapest generally available text model. The early-access coding model grok-build-0.1 is listed at $1.00. ([source](https://docs.x.ai/developers/pricing), read 2026-09-25)
- Context window: 500,000 tokens on grok-4.7; 1M on grok-4.3 and the grok-4.20 models, 256k on grok-build-0.1. ([source](https://docs.x.ai/developers/pricing), read 2026-09-25)
- Max output tokens: No separate output cap on grok-4.7: its overview lists no text output limit. ([source](https://docs.x.ai/developers/grok-4-7), read 2026-09-25)
- Prompt caching: Supported — Automatic prefix caching; cached input is billed at a lower per-model rate, e.g. $0.50 vs $2.00 on grok-4.7. ([source](https://docs.x.ai/developers/advanced-api-usage/prompt-caching), read 2026-09-25)
- Batch discount: 20% off all token types through the Batch API on grok-4.3 and the three grok-4.20 models; other models, including grok-4.7, get no batch discount. ([source](https://docs.x.ai/developers/pricing), read 2026-09-25)
- Rate limits: Per-team, per-model caps in requests per second and tokens per minute, set by a tier that rises with cumulative spend (Tier 0 at $0 to Tier 4 at $5,000; Enterprise on request) and never downgrades. grok-4.7 allows 150 RPS and 50M TPM at Tier 0, 500 RPS and 100M TPM at Tier 4. ([source](https://docs.x.ai/developers/rate-limits), read 2026-09-25)

### Compliance

- SOC 2: SOC 2 Type 2 compliant; the Trust Center carries certification details for customers with a signed NDA. ([source](https://docs.x.ai/developers/faq/security), read 2026-09-25)
- HIPAA: BAA by inquiry: xAI's answer to whether the API is HIPAA compliant is to complete a BAA questionnaire, after which the team reviews it and follows up. ([source](https://docs.x.ai/developers/faq/security), read 2026-09-25)
- GDPR / data residency: The only residency option is the US endpoint, which keeps request handling, inference, moderation and retained request data in the US; files, collections and server-side tools are outside it, and xAI says it is not by itself a comprehensive data-residency guarantee. ([source](https://docs.x.ai/developers/advanced-api-usage/regions), read 2026-09-25)
- Encryption at rest: API requests and responses kept for the default 30-day abuse-audit window are stored encrypted at rest; Zero Data Retention teams have nothing persisted. ([source](https://docs.x.ai/developers/faq/security), read 2026-09-25)
- Role-based access control: Two team roles: Admin (team name, billing and members) and Member. ([source](https://docs.x.ai/developers/faq/team-management), read 2026-09-25)
