Grok
Grok is a family of AI models and a unified API from SpaceXAI (formerly xAI) spanning code, text, voice, images, and video. On the text side, you can use it to build chat assistants that can call tools and pull in current information from the web and x.com.
The family is led by grok-4.6 for text and code, with grok-4.5 and grok-4.3 still available. Alongside them, grok-imagine covers image and video generation, and grok-voice covers speech.
Developers access Grok through a REST API, the recommended interface, which supports prompting and function calling to integrate external tools.
For coding work, there’s the Code API, an early-access API and CLI for agentic coding with grok-4.6, the dedicated coding model.
For up-to-date information, Grok can call server-side search tools (web_search and x_search) that retrieve current data from the web, news, and x.com. You enable them by including the tools in a request, and Grok invokes them as needed.
Grok-1 base model weights and architecture were released under the Apache 2.0 license for local experimentation outside the hosted API.
Official website: docs.x.ai
Related Resources
Tutorial
How to Use the OpenRouter API to Access Multiple AI Models via Python
Access models from popular AI providers in Python through OpenRouter's unified API with smart routing, fallbacks, and cost controls.
For additional information on related topics, take a look at the following resources:
- Building Type-Safe LLM Agents With Pydantic AI (Course)
- AI Coding Agents Guide: A Map of the Four Workflow Types (Tutorial)
- How to Debug Python Code With an AI Agent (Tutorial)
- Accessing Multiple AI Models With the OpenRouter API (Course)
- How to Use the OpenRouter API to Access Multiple AI Models via Python (Quiz)
- AI Coding Agents Guide: A Map of the Four Workflow Types (Quiz)
- How to Debug Python Code With an AI Agent (Quiz)