LogoAIAny
Icon for item

xAI API

xAI API gives developers OpenAI-compatible endpoints for the Grok family of language, vision and image-generation models.

Introduction

xAI API is the developer platform from xAI—Elon Musk’s artificial-intelligence company—providing programmatic access to its Grok models.

Model lineup
  • Grok-3-beta / Grok-3-mini-beta – large language models with 131 072-token context windows for reasoning, data extraction and code generation.
  • Grok-2-vision-1212 – multimodal model that analyzes documents, charts, screenshots and photos.
  • Grok-2-image-1212 – autoregressive text-to-image model that can generate up to 10 JPG images per request.
Key features
  • OpenAI & Anthropic SDK compatibility – migrate by merely changing the base URL and using an xAI key.
  • Tool/function calling & structured outputs for automation workflows.
  • Realtime search endpoint (coming soon) that blends web and X data.
  • Management API, cached-prompt support and usage-based pricing documented in the 2025 release notes.

The service debuted as a public beta on November 4 2024 and entered full availability in 2025. Today, it underpins production search, customer-support and content-creation workloads across industries.

Information

  • Websitex.ai
  • AuthorsxAI
  • Published date2024/11/04

Categories