Introduction

What is Grok?

Grok is a family of Large Language Models (LLMs) developed by xAI.

Inspired by the Hitchhiker's Guide to the Galaxy, Grok is a maximally truth-seeking AI that provides insightful, unfiltered truths about the universe.

xAI offers an API for developers to programmatically interact with our Grok models. The same models power our consumer facing services such as Grok.com, the iOS and Android apps, as well as Grok in X experience.

Build with grok-4

To access the grok-4 models via API, please create an xAI account and an API key.

What is the xAI API? How is it different from Grok in other services?

The xAI API is a toolkit for developers to integrate xAI's Grok models into their own applications, the xAI API provides the building blocks to create new AI experiences.

To get started building with the xAI API, please head to The Hitchhiker's Guide to Grok.

xAI API vs Grok in other services

ProductxAI APIGrok.comGrok iOS and Android AppsGrok in X
AccessiblexAI API Endpoint (https://api.x.ai)Website (https://grok.com) and Progressive Web App (PWA) on AndroidApple App Store or Google PlayX.com and X apps
Account BillingManaged by xAIManaged by xAI (X subscription managed by X)Managed by xAI (X subscription managed by X)Managed by X
Programming Knowledge LevelLikely requiredNot requiredNot requiredNot required
DescriptionAPI access that provides a programmatic way to interact with Grok. Developers can integrate Grok into applications to expand the capabilities of their applications.Provides an AI assistant via UI to complete tasks. Receives the latest features among the consumer products.Provides an AI assistant via UI to complete tasks.Fewer features than Grok.com or mobile apps, but has tighter integration with X such as analyzing X post and posting chat results.

Because these are separate offerings, your purchase on X (e.g. X Premium) won't affect your service status on xAI API, and vice versa.

This documentation is intended for users using xAI API.