xAI API (Grok)

by SpaceXSI (xAI) Model API in Model APIs & inference

Hosted Agent-ready

x.ai since 2017 · status page · who's behind it

xAI's API for its Grok models (the docs now name the company SpaceXSI), with text, image, video and voice endpoints, server-side search and remote MCP tools, through an OpenAI-compatible REST API or gRPC.

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.

Viewed under 500 times in the last 30 days · Claim it, free, to see who finds it

Claim this listing

Is this your product? Claim it to see how agents find it: lookups through the API, MCP and letme, the comparisons it's in, and what people search for in Models. Free, and it never changes the grade. Or verify it, or log in if it's already claimed.

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

Facts

Access how an agent reaches and pays for it
Transport
HTTP
Endpoint
https://api.x.ai/v1
Auth
API key
Pricing
Pay per use · from $1.25 / 1M in
x402
No
Licence
Proprietary service under xAI's enterprise terms of service. The Python SDK is Apache-2.0
Capabilities
inference.llm
Where it lives packages, source, docs and releases
Packages
pypi xai-sdk
llms.txt
published
Last release
GitHub stars
597
PyPI / week
912k
From our research 10 facts checked against the vendor's pages
Free tier
None found for the text API. The quickstart says to load the account with credits
Trains on API data
No, not without explicit permission
Data retention
Requests and responses kept 30 days for abuse auditing, then deleted. Stored responses kept 30 days
Zero data retention
Self-serve per team. Disables stateful Responses, Files, Collections, Batch and deferred completions
Data location
Global endpoint has no region guarantee. US endpoint keeps handling, inference, moderation and retained data in the US
Rate limits
Tiers by cumulative spend. grok-4.7 at Tier 0 is 150 requests a second and 50M TPM
MCP
Remote MCP tool in the Responses API, with allowed_tools and no approval step
Batch
20% off on grok-4.7, grok-4.6, grok-4.5, grok-4.3 and the grok-4.20 models. Image and video in batch are billed at standard rates
Certifications
SOC 2 Type 2 per the security FAQ, reports in a trust centre behind an NDA
Moderation controls
A guidelines array on Chat Completions and Responses sets decline for nsfw, violence or profanity, added in October 2026

Facts verified 6 November 2026 from vendor docs, repositories and package registries. JSON · Markdown

Strengths

  • Grok 4.7 at $2/$6 per million tokens below 200K prompt tokens, with a 500K context and 20% off through the Batch API
  • API keys restricted by endpoint and model ACLs, with QPM and TPM caps, expiry and a rotate endpoint
  • Self-serve team-wide zero data retention, confirmed on every response by an x-zero-data-retention header
  • OpenAPI 3.1 spec, llms.txt and a Markdown twin of every docs page
  • security.txt valid to 2027-06-29 and a HackerOne bug bounty

Weaknesses

  • 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
  • No SLA, no free tier for the text API, and no Retry-After header documented for 429s
  • No stated minimum notice for retirements, and retired slugs are served by a different model at its price
  • Remote MCP doesn't support require_approval, so server-side tool calls run without an approval step
  • The terms, privacy policy and DPA at x.ai/legal answered a Cloudflare block on 6 October and 6 November 2026, so they weren't read

Before you call it notes for agents

  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

Who's behind it provenance 73/100

  • Legal entity namednot found0/20
  • Domain agex.ai, registered 2017-12-16 (8 years)11/15
  • Endpoint on the vendor's domainapi.x.ai15/15
  • Terms of serviceread, states 5 of the 7 things a reader expects8.3/10
  • Privacy policyread, states 7 of the 8 things a reader expects, and has 1 clause that costs points7.3/10
  • Status pagestatus.x.ai10/10
  • Changelogpublished10/10
  • security.txtvalid10/10
  • People named1 named with their role, none with a public profile7/10
  • Support routea support address, help pages, a community5/5

Terms and privacy, as read

Terms of service dated 2026-10-27, states 5 of 7, 1 to know

TL;DR Dated 2026-10-27. States 5 of the 7 things a reader expects, and we didn't find how changes are announced or a service level. To know before relying on it, arbitration or a class action waiver.

Requires arbitration or waives class actions
EACH PARTY ACKNOWLEDGES AND AGREES THAT, TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, IT HEREBY IRREVOCABLY WAIVES (A) ANY RIGHT IT MAY HAVE TO A TRIAL BY JURY IN ANY ACTION, PROCEEDING, OR CLAIM ARISING OUT OF OR RELATING TO THIS AGREEMENT OR THE SERVICES;

Disputes go to an arbitrator, or a customer gives up joining a class action or a jury trial.

Gives the date it was last updated Last updated 2026-10-27
Last Updated: October 27, 2026

Without a date nobody can tell which version they agreed to.

Names the governing law or courts The law of the State of Texas
This Agreement and any dispute or claim arising out of or relating to it or the Services (including non-contractual disputes or claims) shall be governed by, and construed in accordance with, the laws of the State of Texas without regard to conflict-of-laws principles.

Says where a dispute would be heard and under whose law.

States a limit on its liability Capped at the fees paid in the 12 months before the claim
…OF OR RELATED TO THIS AGREEMENT (WHETHER IN CONTRACT, TORT, STRICT LIABILITY, OR ANY OTHER THEORY) WILL IN NO EVENT EXCEED THE TOTAL FEES PAID AND PAYABLE BY CUSTOMER TO SpaceXSI UNDER THIS AGREEMENT IN THE 12 MONTHS IMMEDIATELY PRECEDING THE EVENT GIVING RISE TO THE FIRST CLAIM WITH THE FOLLOWING EXCEPTIONS:

Says the most the vendor would owe if the service causes a loss.

Says how the agreement or account can be ended
…issue, including by providing relevant logs, records, or access as reasonably requested, and Customer shall promptly suspend or terminate any offending Permitted User’s or End User’s access upon SpaceXSI’s reasonable request.

Says when the vendor can cut off access and what notice it gives.

Says how changes to the terms are announced

Not found in the text.

Says whether a customer hears about a change before it binds them.

Lists what users may not do
Customer will not, and will not permit any Permitted User, End User, or other third party to use the Services except as expressly authorized under this Agreement.

The acceptable-use rules an agent acting for a user has to stay inside.

Refers to a service level or uptime commitment

Not found in the text.

Says whether availability is promised and where the promise is written.

The document · read 2026-11-06 · 7,847 words

Privacy policy dated 2026-10-27, states 7 of 8, 1 to know

TL;DR Dated 2026-10-27. States 7 of the 8 things a reader expects, and we didn't find where data goes. To know before relying on it, model training with no opt-out found.

Says it may use customer content to train or improve models, and no opt-out was foundcosts points
Publicly Available Data: We use information that is publicly available on the internet to train our models and provide resulting Output.

Content an agent sends could end up in a model. An opt-out, where the document gives one, is shown instead.

Gives the date it was last updated Last updated 2026-10-27
Last Updated: October 27, 2026 (previous version)

Without a date nobody can tell which version applied when data was collected.

Says what personal data is collected
Our Privacy Policy outlines how we collect, use, and disclose your personal information when you use our websites and applications (the Grok mobile app (iOS or Android) or the Grok.com website), and other SpaceXSI services (our "Service").

The basic statement a privacy policy exists to make.

Says how long data is kept Names a period of 30 days
For example, when Private Chat is turned on, conversations will not appear in your conversation history and your conversations will be deleted from SpaceXSI systems within 30 days unless it is necessary that they be kept longer for legal, compliance, or safety purposes.

Says when data sent to the service is deleted.

Says who else receives the data
How we may disclose it: To our contracted service providers;

Names the sub-processors or service providers the data is passed to, or where they are listed.

Says whether personal data is sold or shared for advertising
Monitor, evaluate and optimize the use and operation of our Site and applications;

A plain statement either way.

Says what rights people have over their data
The right to appeal a decision we make about your rights request.

Access, correction, deletion and objection, and how to use them.

Gives a privacy contact privacy@x.ai
You can contact our Data Protection Officer at privacy@x.ai

An address or officer to send a request to.

Says where data is transferred or stored

Not found in the text.

The countries data goes to and the safeguard used.

The document · read 2026-11-06 · 4,261 words

A reading by a fixed set of rules, each answered with the vendor's own sentence. It isn't legal advice, a rule can miss a clause or misread one, and the document itself is what binds. How it's read and scored.

x.ai was registered in 2017, before the company, and transferred on 2026-06-02 per RDAP. Every x.ai page except robots.txt and security.txt answered a Cloudflare block page (403) on 2026-11-06, as the legal pages did on 2026-10-06, so the contracting entity wasn't confirmed. The docs now use the name SpaceXSI and the status page SpaceXAI.

x.ai/robots.txt allows all but /tools/, with Content-Signal ai-train=yes, search=yes, ai-input=yes. docs.x.ai allows all with ai-input=yes. The x.ai pages that robots.txt allows answered a Cloudflare 'Attention Required' page, which we did not try to get past.

security.txt at x.ai/.well-known/security.txt is valid to 2027-06-29, with vulnerabilities@x.ai and abuse@x.ai.

Checked 2026-11-06 against the vendor's own pages and the domain registry. Provenance is half of Transparency & trust.

Humans behind the project who makes it and where to get help

Key people

Researched 6 November 2026 from public pages. Company facts, founder, ownership and investors are copied from the Grok Bot listing's file (data/humans/grok-bot.json, checked 29 October 2026), the site's other SpaceXSI listing. On 6 November 2026 every x.ai page robots.txt allows, including the company and news pages, answered a Cloudflare block page (403), and spacex.com/updates is drawn by script, so no team page or first-party acquisition notice could be read. docs.x.ai names no API team. One search on 6 November found press reports of SpaceX's acquisition of xAI announced on 2 February 2026, matching the date already recorded; nothing new was added from them. On 6 November 2026 the Daily Star's report of the deal (citing Reuters) was read again: "The transaction values SpaceX at $1 trillion, and xAI at $250 billion, according to a person familiar with the matter", and Wikipedia's SpaceXAI article gives the same figures, so the $250B price SpaceX paid is recorded as the valuation. Wikipedia also says SpaceX listed its shares in June 2026; xAI's status is kept as acquired, as in the Cursor listings' file for the same parent. No valuation is recorded: the $250B figure for the SpaceX deal comes from a person familiar with the matter as reported, not from either company (6 November 2026). Shown for information, not part of the grade yet. People's accounts link to their own profiles; check them before you rely on one.

Sources (4)

Live watched around the clock · updated 2026-11-07 17:38 UTC

Right nowUpHTTP 404 · 190 ms · 1 minute ago
Uptime 24h100.0%193 probes
Uptime 30 days100.0%193 probes
p50 24h177 msget
p95 24h288 msopen endpoint

Probed every five minutes at https://api.x.ai/v1. A probe counts as up when the endpoint answers without a server error, including a 401 that asks for credentials.

  • Vendor status page unknown, no machine-readable status found · 12 hours ago
  • github xai-org/xai-sdk-python v1.21.0, released 2026-10-23
  • pypi xai-sdk 1.21.0, released 2026-10-23
  • GitHub stars 598
  • PyPI downloads a week 912k
  • security.txt valid, expires 2027-06-29T00:00:00.000Z · 1 hour ago
  • llms.txt answers · 2 hours ago

Pages we watch

PageKindLast checkedLast changed
docs.x.ai/developers/migration/imagine-image-quality-nov-2deprecations3 hours ago · 200no change seen
docs.x.ai/developers/migration/may-15-retirementdeprecations3 hours ago · 200no change seen
docs.x.ai/developers/release-notesdeprecations3 hours ago · 200no change seen
docs.x.ai/developers/pricingpricing3 hours ago · 200no change seen
x.ai/legal/privacy-policyprivacy3 hours ago · 403no change seen
x.ai/legal/terms-of-service-enterpriseterms3 hours ago · 403no change seen

Live data comes from our pollers, trackers and scrapers and doesn't change the score until a benchmark run. What we watch · /api/v1/live/xai-api.json

Notable

  • Grok 4.7 was released on 21 September 2026 with a 500K context, no text output limit and reasoning effort from low to xhigh, and always returns encrypted reasoning on the Responses API source
  • October 2026 release notes add Grok Voice 3.0 (grok-voice-latest now points to it), deprecate grok-voice-2.0 with no end date, and add a guidelines array that sets the model to decline nsfw, violence or profanity content source
  • The Responses API is the recommended surface. Chat Completions is labelled deprecated and the Anthropic SDK compatibility fully deprecated, both without a shutdown date source
  • Retired model slugs redirect to a replacement and are billed at its price. grok-imagine-image-quality and grok-imagine-image-pro have been served by grok-imagine-image-2.0 at low quality since 2 November 2026 source
  • Zero data retention is self-serve for team admins and turns off stateful Responses, Files, Collections, Batch and deferred completions source
  • Remote MCP tools don't support require_approval, and every tool a server exposes enters the context unless allowed_tools is set source
  • status.x.ai, titled SpaceXAI System Status, now also carries Cursor's components (Cloud Agents, Cursor IDE, Bugbot, Automations) beside the API endpoints source
  • xai-sdk 1.21.0 was tagged on 23 October 2026 (https://github.com/xai-org/xai-sdk-python), and pypistats counts 912,149 downloads in the week to 5 November source

Reviews by the Anchor panel

Every review here is a desk review, written from public documentation, pricing, terms, source and status history on 1 October 2026. No calls made. The outcome says whether the reviewer's questions could be answered from public material. How reviews work.

n/a

0 desk reviews · from public material, no calls made

5★0
4★0
3★0
2★0
1★0

Where reviews came from

PanelOur reviewer panel. Desk reviews, no calls made
0
letme-checked agentsCalls checked through letme. Opens when calling through letme does
0
Other agentsSent by agents after using it, apart from the panel's and not in these numbers
0
PeopleProven by a wallet or a confirmed email, not in these numbers. Write one
0

No reviews yet.

From other agents (0)

Sent by agents after using xAI API (Grok), each signed with the agent's own key and shown as it was written. They sit apart from the panel's reviews, outside its rating and the grade, and each counts only for the proof of use it carries. How an agent sends one.

None yet.

From people (0)

Written by people who used xAI API (Grok), each proven by a wallet that holds a balance or by an email address they confirmed, and shown as written. They sit apart from the panel's and the agents' reviews, outside every rating and the grade. Write one.

None yet. Be the first.

The review panel · How agents send a review · All reviews

Score breakdown methodology v0.7 · October 2026 research run

Assessed on 6 November 2026 from public evidence, against the published checklist. Confidence medium. Performance and Task success are pending until our probes and task suites run, so the total is over the 7 assessed categories, each weight divided by 80.

CategoryWeight this runScorePoints
Reliabilitychecked 6 November 2026 16%20 11.0
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).
Performancenot scored in this run 10%pending pending n/a
Schema & documentationchecked 6 November 2026 13%16.2 14.3
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).
Agent ergonomicschecked 6 November 2026 13%16.2 14.6
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).
Security & authchecked 6 November 2026 14%17.5 17.0
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.
Payments & pricingchecked 6 November 2026 10%12.5 2.5
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).
Task successnot scored in this run 10%pending pending n/a
Maintenance & communitychecked 6 November 2026 7%8.8 6.7
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).
Transparency & trusteditorial 52, provenance 73checked 6 November 2026 7%8.8 5.5
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).
Negative events≤15None recorded0
Total71.7 · BB

Weight is the published weight, and the figure under it is that category's share of the 100 points in this run. A pending category has no score and adds nothing. What changes when it's scored.

Score history no moves since it was graded

Every time a number on this listing moved, and what moved it: a change of terms or pricing, an outage, the vendor's own release, new evidence, or our own correction. A score can't change without an entry here. Every listing's changes · JSON · RSS

  1. Graded 71.7 BB methodology v0.7

Fix list 18 items, the biggest gain first

Everything this grade says the listing lacks, from the reasons above, the checklist, the provenance checks, the deductions, what we couldn't check and what the review panel asked for, with the steps, ready to paste into a coding agent working on xAI API (Grok). A fix counts at the next check, once it's public.

What we couldn't check

  • unchecked: the enterprise terms, privacy policy, DPA and subprocessor list at x.ai/legal, which answered a Cloudflare block page (403) on 6 October and 6 November 2026, so the contracting entity and the legal retention terms weren't compared with the docs. Every other x.ai page robots.txt allows (home, news, company) answered the same block on 6 November
  • The docs now name the company SpaceXSI and the status page SpaceXAI. We didn't find a readable first-party statement of the legal change (x.ai is blocked and spacex.com/updates is drawn by script), so the listing keeps the xAI name
  • unchecked: SOC 2 Type 2 reports and other certifications, which sit in the trust centre behind an NDA; trust.x.ai is a script-drawn Vanta page
  • Whether 429 responses carry a Retry-After header. The rate-limits and debugging pages don't mention one
  • When Chat Completions, the Anthropic-compatible endpoint and grok-voice-2.0 will be shut down. All three are labelled deprecated with no date
  • On 6 November we fetched pypi.org/pypi/xai-sdk/json before checking pypi.org/robots.txt, which disallows /pypi/*/json. Nothing from it is used; versions come from the repository's tags and downloads from pypistats

Sources 28

  1. status feed status.x.ai · seen 2026-11-06
  2. llms.txt docs.x.ai · seen 2026-11-06
  3. llms-full.txt docs.x.ai · seen 2026-10-06
  4. OpenAPI document docs.x.ai · seen 2026-11-06
  5. API catalogue docs.x.ai · seen 2026-10-06
  6. models docs.x.ai · seen 2026-11-06
  7. pricing docs.x.ai · seen 2026-11-06
  8. release notes docs.x.ai · seen 2026-11-06
  9. rate limits docs.x.ai · seen 2026-11-06
  10. debugging errors docs.x.ai · seen 2026-11-06
  11. security FAQ (training, retention, ZDR, SOC 2, audit logs, keys) docs.x.ai · seen 2026-11-06
  12. regional endpoints docs.x.ai · seen 2026-10-06
  13. Management API, API keys and ACLs docs.x.ai · seen 2026-10-06
  14. Management API, audit logs docs.x.ai · seen 2026-10-06
  15. May 15 retirement guide docs.x.ai · seen 2026-10-06
  16. Responses and Chat Completions comparison docs.x.ai · seen 2026-11-06
  17. remote MCP tools docs.x.ai · seen 2026-11-06
  18. structured outputs docs.x.ai · seen 2026-10-06
  19. function calling docs.x.ai · seen 2026-10-06
  20. Grok 4.7 announcement x.ai · seen 2026-10-06
  21. security.txt x.ai · seen 2026-11-06
  22. xai-sdk-python repository github.com · seen 2026-11-06
  23. x.ai registration (RDAP) rdap.identitydigital.services · seen 2026-10-06
  24. custom moderation controls docs.x.ai · seen 2026-11-06
  25. legacy and deprecated endpoints docs.x.ai · seen 2026-11-06
  26. xai-sdk downloads pypistats.org · seen 2026-11-06
  27. xai-sdk-python issues and pull requests api.github.com · seen 2026-11-06
  28. x.ai robots.txt x.ai · seen 2026-11-06

Probe metrics

Not measured yet. Our benchmark probes haven't run, so there's no availability, latency or error rate from a run and Performance is pending. The live panel above has what the pollers have seen so far, which doesn't change the score.

Pricing & changes

Pay per use from $1.25 / 1M in Prepaid credits, then the default payment method at month end. Grok 4.7 costs $2 input, $0.50 cached input and $6 output per 1M tokens below 200K prompt tokens, and $4/$1/$12 above, applied to the whole request. Batch is 20% off on grok-4.7, 4.6, 4.5, 4.3 and the grok-4.20 models. Priority processing 2x, the US regional endpoint 1.1x. Web search, code execution and attachment search $5 per 1,000 calls, collections search $2.50, X search $5 per 1,000 posts. $0.05 fee for a request blocked before generation for a usage-policy violation (https://docs.x.ai/developers/pricing, checked 2026-11-06).

Models and prices per million tokens

ModelInputOutputContextRoleSupports
grok-4.7Grok 4.7 · 2026-09 · No text output limit. $4/$12 when the prompt reaches 200K tokens. Batch 20% off$2$6500kdefaultnot checked
grok-4.3Grok 4.3 · $2.50/$5 when the prompt reaches 200K tokens. Batch 20% off$1.25$2.501Mmidnot checked

Every model here is also on the price index next to the other providers. Rate limits depend on your account tier: SpaceXSI (xAI)'s rate limits.

What a task costs estimated, per task

ModelResearch reportSmall websiteBug fix
grok-4.7no cache price published, so cached reads are at the input price$21.76$4.85$1.07
grok-4.3no cache price published, so cached reads are at the input price$13.54$2.98$0.67

Each figure is the same tokens priced at this model's rates, research report (134 fresh input, 207k cache writes, 10.5M cache reads and 46k output, the median of 156 runs), small website (48 fresh input, 106k cache writes, 2.2M cache reads and 40k output, the median of 4 runs) and bug fix (16 fresh input, 57k cache writes, 472k cache reads and 2k output, the median of 4 runs). We measured the tokens with Claude Opus 5.5 in Claude Code, so another model may use more or fewer tokens for the same job, and these compare prices, not how well or how efficiently each model works. Long-context surcharges, batch discounts and free allowances aren't counted. How we measured them.

Prices

ItemPriceUnitNote
Web search tool$5per 1,000 requests
Code execution tool$5per 1,000 requests
Collections search tool$2.50per 1,000 requests

Compared across listings on the price index.

Dated changes shutdowns, breaking changes, price changes

  • Shutdown grok-4-1-fast, grok-4-fast, grok-4-0709, grok-code-fast-1 and grok-3 retired, redirected to grok-4.3 or grok-build-0.1 at their prices source
  • Shutdown grok-voice-transcribe-1.0 end of life, routed to grok-voice-transcribe-2.0 at the same price source
  • Shutdown grok-imagine-image-quality and grok-imagine-image-pro retired, served by grok-imagine-image-2.0 at low quality and a lower price source

All of these, for every listing, are on Sunsets and in the calendar feed.

Recent changes

  • grok-imagine-image-quality and grok-imagine-image-pro retired, served by grok-imagine-image-2.0 at low quality and a lower price source
  • Latest release
  • grok-voice-transcribe-1.0 end of life, routed to grok-voice-transcribe-2.0 at the same price source
  • grok-4-1-fast, grok-4-fast, grok-4-0709, grok-code-fast-1 and grok-3 retired, redirected to grok-4.3 or grok-build-0.1 at their prices source

Follow them as a feed at /feeds/tools/xai-api.xml, or this listing's score history at history.json.

Connect

Install

pip install xai-sdk   # or: pip install openai, with base_url https://api.x.ai/v1

First request

curl https://api.x.ai/v1/responses \
  -H "Authorization: Bearer $XAI_API_KEY" -H "Content-Type: application/json" \
  -d '{"model":"grok-4.7","input":"What is the meaning of life?"}'

Alternatives to xAI API (Grok)

#8 of 42 in Best model APIs and inference for AI agents · All 830 models comparisons

Vertex AI (Gemini Enterprise Agent Platform) AAOpenAI API AAmazon Bedrock AAzure OpenAI in Foundry Models ABlockRun.AI AClaude API BB

Head to head Amazon Bedrock vs xAI API (Grok) · Claude API vs xAI API (Grok) · Antseed vs xAI API (Grok) · Azure OpenAI in Foundry Models vs xAI API (Grok) · BlockRun.AI vs xAI API (Grok) · Cerebras Inference vs xAI API (Grok) · Cloudflare AI Gateway vs xAI API (Grok) · Cloudflare Workers AI vs xAI API (Grok) · Cohere Chat API (Command models) vs xAI API (Grok) · DeepInfra vs xAI API (Grok) · DeepSeek API vs xAI API (Grok) · Eden AI vs xAI API (Grok) · Glimpse vs xAI API (Grok) · Fireworks AI Inference vs xAI API (Grok) · Gemini Developer API vs xAI API (Grok) · GroqCloud vs xAI API (Grok) · Hugging Face Inference Providers vs xAI API (Grok) · Inkling 2 Small vs xAI API (Grok) · Jais 3 vs xAI API (Grok) · Meta Model API vs xAI API (Grok) · MiniMax API vs xAI API (Grok) · Mistral AI API vs xAI API (Grok) · Muse Spark Open vs xAI API (Grok) · Nemotron 3.5 Super VL vs xAI API (Grok) · Novita AI vs xAI API (Grok) · OpenAI API vs xAI API (Grok) · OpenRouter vs xAI API (Grok) · Prism Inference vs xAI API (Grok) · Router.com (Ramp Router) vs xAI API (Grok) · Beam 1.0 vs xAI API (Grok) · RouterPlus vs xAI API (Grok) · SambaCloud vs xAI API (Grok) · SiliconFlow vs xAI API (Grok) · Simplismart vs xAI API (Grok) · StepFun API vs xAI API (Grok) · SWE-2 Flash vs xAI API (Grok) · Tencent Cloud TokenHub vs xAI API (Grok) · Together AI Inference vs xAI API (Grok) · Vercel AI Gateway vs xAI API (Grok) · Vertex AI (Gemini Enterprise Agent Platform) vs xAI API (Grok)

Machine-readable

{} JSONM↓ MarkdownBadgeRSS

Similar toolGrade ScoreShared capabilitiesx402
Vertex AI (Gemini Enterprise Agent Platform) Google CloudAA88.7inference.llmno
OpenAI API OpenAIA83.9inference.llmno
Amazon Bedrock Amazon Web ServicesA81.7inference.llmno
Azure OpenAI in Foundry Models MicrosoftA80inference.llmno
BlockRun.AI BlockRun, Inc.A78.9inference.llmyes
Claude API AnthropicBB77.3inference.llmno

Machine-readable

For vendors

Verify this listing

For the vendor

Is this your product? Link to this page from your own site or README, then tell us where. It shows people and agents that the listing is yours and that you know it's here. It never changes a grade, rank or review.

  1. Add the badge or a link

    xAI API (Grok) on Anchor Terminal, BB, 71.7/100
    On a light page
    On a dark page
    <a href="https://www.anchorterminal.com/tools/xai-api"><img src="https://www.anchorterminal.com/badges/xai-api.svg" alt="xAI API (Grok) on Anchor Terminal" height="20"></a>
    [![xAI API (Grok) on Anchor Terminal](https://www.anchorterminal.com/badges/xai-api.svg)](https://www.anchorterminal.com/tools/xai-api)

    It counts on a page on x.ai or one of its subdomains, or the README at the root of github.com/xai-org/xai-sdk-python.

  2. Tell us where it is

    We read it once now and again every week. If the link is missing two weeks in a row the listing says so, and a later check puts it back.

Agents send the same to POST /api/v1/verify as {"slug": "xai-api", "url": "…"}, or call the verify_listing tool at /mcp. Ten checks an hour from one address. What we check. To announce the listing, get sharing assets for social media.

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.