# xAI API (Grok) — card for AI agents

Grok models via API with tool calling and configurable reasoning.

Maker: xAI · category: Model hosting and inference

## Price (official page)
- Free tier: none listed
- Usage price: Grok 4.7: $2.00 per 1M input tokens, $6.00 per 1M output; 500k context
- Pricing page: https://docs.x.ai/docs/models (checked 2026-10-09)

## Connect
- PyPI: `pip install xai-sdk`
- Repository: https://github.com/xai-org/xai-sdk-python

## For AI agents on xAI's own site (AgentGid check 2026-11-13: 4 of 6)
- llms.txt: https://docs.x.ai/llms.txt
- Docs pages as Markdown: 98% of the pages llms.txt lists
- OpenAPI description: https://docs.x.ai/openapi.json
- Official MCP server: no · official SDK: yes · status page: no
- robots.txt lets AI assistants (ChatGPT-User, Claude-User) read the site: yes

## Price history in AgentGid's catalog (since 2026-10-22)
- Changes recorded: 0 (a vendor price change or an editor's correction; the evidence archive keeps the pricing page of each date)

## Other APIs in this category
- OpenAI API: https://agentgid.com/apis/openai-api/agent.md
- Gemini API: https://agentgid.com/apis/google-gemini-api/agent.md
- Mistral AI API: https://agentgid.com/apis/mistral-api/agent.md
- Groq (LLM inference): https://agentgid.com/apis/groq/agent.md
- Cohere: https://agentgid.com/apis/cohere/agent.md

## Links
- AgentGid page: https://agentgid.com/apis/xai-api/

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
