DocsREST APIgRPCPricingConsole
Developers
Welcome
Introduction
Getting Started
Models and Pricing
Rate Limits
Regional Endpoints
Debugging Errors
Release Notes
Model Capabilities
Text
Generate Text
Reasoning
Structured Outputs
Streaming
Comparison
Images
Image Understanding
Image Generation
new
Video
new
Video Generation
new
Audio
new
Voice Overview
Voice Agent API
Files
Chat with Files
Legacy
Chat Completions
Files & Collections
Files Overview
Managing Files
Collections
Collections via API
Collection Metadata
Tools
Overview
Function Calling
Web Search
X Search
Code Execution
Collections Search (RAG)
Remote MCP Tools
Deep Dive
Citations
Streaming & Sync
Tool Usage Details
Advanced Usage
Advanced API Usage
Overview
Batch API
new
Deferred Completions
Fingerprint
Async Requests
Use with Code Editors
Prompt Engineering for Grok Code
Migration Guides
Migrating to Responses API
Migrating to New Models
Community
Cookbook
Community Integrations
FAQ
Data & Privacy
General
Loading...

Welcome to the xAI Cookbook

Here you will find a collection of recipes that show you how to get the most out of Grok and its many capabilities.


Seeing the World Through Language: Object Detection with Grok

Seeing the World Through Language: Object Detection with Grok

Combine Grok's natural language processing with its image understanding to perform flexible object detection

Mar 03, 2025
•
Omar Diab
Extracting Structured Data from Fashion Images with Grok

Extracting Structured Data from Fashion Images with Grok

Leverage Grok's image understanding to extract structured/json data from fashion images

Mar 03, 2025
•
Omar Diab
Building a Unified Chat Experience with Grok

Building a Unified Chat Experience with Grok

Learn how to build a comprehensive chat experience with Grok inclusive of multi-turn conversations, streaming, function calling, and structured outputs

Apr 07, 2025
•
Omar Diab
Real Time Sentiment Analysis with Grok & 𝕏

Real Time Sentiment Analysis with Grok & 𝕏

Combine X's real-time data with Grok's reasoning to perform real-time sentiment analysis

Apr 10, 2025
•
Omar Diab
Hyper Personalized Marketing with Grok

Hyper Personalized Marketing with Grok

Use Grok to generate hyper personalized marketing materials complete with custom images and copy

Apr 10, 2025
•
Omar Diab
Function Calling 101

Function Calling 101

An introduction to function calling for beginners

Jan 17, 2025
•
Zhaohan Dong