🌐
xAI
x.ai › api
API | xAI
Our API is compatible with OpenAI and Anthropic’s SDKs. Migrating is as easy as generating an API key and changing a URL.Start building · Installing Grok...
Grok
Meet Grok by xAI: your truth-seeking AI companion for honest answers and insightful analysis.
News
State-of-the-art RAG system built directly into our API. ... Bringing the power of Grok Voice to all developers.
Careers
We are a team of AI technologists and business leaders on a mission to build AI systems that can help humanity understand the world better.
Colossus
We’re running the biggest supercomputer in the world. From start to finish, Colossus was built in 122 days—outpacing every estimate. It’s the most powerful AI training system out there, and it’s expected to double in size in a matter of months.
🌐
Grok API
grok-api.apidog.io
Introduction - Grok API
Build with Grok 3To access the Grok 3 models via API, please create an xAI account and an API key.
People also ask

🌐
AI SDK
ai-sdk.dev › providers › ai-sdk-providers › xai
AI SDK Providers: xAI Grok
You can use the OpenAI provider with xAI's base URL to search vector stores: ... File search requires grok-4 family models. See the OpenAI provider documentation for additional file search options like filters and ranking. You can combine multiple server-side tools for comprehensive research: ... Control the reasoning effort for the model. Higher effort may produce more thorough results at the cost of increased latency and token usage. The Responses API only supports server-side tools.
🌐
xAI
docs.x.ai › docs › overview
Overview | xAI
Grok is our flagship AI model designed to deliver truthful, insightful answers. ... Create an API Key and make your first request.
🌐
Apideck
apideck.com › blog › how-to-get-your-grok-xai-api-key
How to Get Your Grok (XAI) API Key
September 10, 2025 - curl https://api.x.ai/v1/chat/completions \ -H "Authorization: Bearer YOUR_API_KEY_HERE" \ -H "Content-Type: application/json" \ -d '{ "model": "grok-1", "messages": [ { "role": "user", "content": "What is happening on X today?"
🌐
DataCamp
datacamp.com › tutorial › grok-3-api
Grok 3 API: A Step-by-Step Guide With Examples | DataCamp
May 1, 2025 - The next step is to initialize the client. We call the OpenAI function with our API key from the .env file and the URL of the Grok server, and assign it to the variable client.
🌐
Merge.dev
merge.dev › blog › grok-api-key
How to get your Grok API key (5 steps)
January 2, 2025 - Grok consists of a family of large language models (LLMs) developed by xAI. While the models are helpful within X (formerly Twitter), they can offer even more value when they’re integrated with your product or your internal applications. For either integration scenario, you’ll need to start by creating your API key on xAI.
Find elsewhere
🌐
Cloudflare
developers.cloudflare.com › directory › ai gateway › using ai gateway › provider native › xai
xAI · Cloudflare AI Gateway docs
When making requests to Grok ↗, replace https://api.x.ai/v1 in the URL you are currently using with https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/grok.
🌐
xAI
docs.x.ai › docs › tutorial
The Hitchhiker's Guide to Grok | xAI
Certain grok models can accept both text AND images as an input. For example: ... import os from xai_sdk import Client from xai_sdk.chat import user, image client = Client( api_key=os.getenv("XAI_API_KEY"), timeout=3600, # Override default timeout with longer timeout for reasoning models ) chat = client.chat.create(model="grok-4") chat.append( user( "What's in this image?", image("https://science.nasa.gov/wp-content/uploads/2023/09/web-first-images-release.png") ) ) response = chat.sample() print(response.content)
🌐
Grok AI
grokai.bot › home
Grok AI API - Grok AI
May 15, 2025 - With privacy-first infrastructure and scalable pricing, Grok AI is an ideal solution for startups, SaaS platforms, and enterprise products. This guide will walk you through everything from registering for the API to making advanced requests and implementing real-world applications.
🌐
OpenRouter
openrouter.ai › x-ai › grok-4.1-fast
Grok 4.1 Fast - API, Providers, Stats | OpenRouter
Grok 4.1 Fast is xAI's best agentic tool calling model that shines in real-world use cases like customer support and deep research. Run Grok 4.1 Fast with API
🌐
GitHub
github.com › mem0ai › grok3-api
GitHub - mem0ai/grok3-api: Unofficial Grok 3 API
Grok3 is cool, smart, and useful, but there is no official API available. This is an unofficial Python client for interacting with the Grok 3 API.
Starred by 526 users
Forked by 98 users
Languages   Python
🌐
Readthedocs
grok.readthedocs.io › en › latest › api.html
API reference — grok 5.0 documentation
By default, the name that must be appended to the URL should simply be the same as the name of the attribute; but by providing a name keyword argument, the programmer can designate another name to appear in the URL instead of the raw attribute name. ... A grokcore.catalog.Indexes index that matches against an entire field.
🌐
xAI
x.ai › news › api
API Public Beta | xAI
For example, if you’re currently using the OpenAI Python SDK, you can start using Grok by simply changing the base_url to https://api.x.ai/v1 and using your xAI API key that you created on console.x.ai.
🌐
xAI
docs.x.ai › docs › api-reference
REST API Reference | xAI
Reference of all available xAI REST API endpoints
🌐
Apidog
apidog.com › blog › xai-grok-api
Overview of xAI Grok & How to Use Its API
August 1, 2025 - This page will display the API key, and you can copy, delete, or edit it from here. Step 5: Once you have obtained the Grok API key, you can use the official Grok Python SDK to access the Grok API.