Getting started

Welcome

Welcome to the xAI developer docs! Our API makes it easy to harness Grok's intelligence in your projects. Grok is our flagship AI model designed to deliver truthful, insightful answers.

Grok 4 now available

We're proud to bring you Grok 4 access on the API. Grok 4 currently supports text modality with vision, image gen and other capabilities coming soon.

Modalities

Context window

256,000

Features

Function calling

Structured outputs

Reasoning

Jump right in

Are you a non-developer or simply looking for our consumer services? Visit Grok.com or download one of the iOS or Android apps. See our Comparison Table for the differences.


Questions and feedback

If you have any questions or feedback, feel free to email us at support@x.ai.

Happy Grokking! 😎