🌐
xAI
x.ai › api
API | xAI
1 month ago - 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
Grok
Meet Grok by xAI: your truth-seeking AI companion for honest answers and insightful analysis.
News
Learn more about our latest releases and company updates.
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.
🌐
xAI
docs.x.ai › docs › overview
xAI API
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. ... Create an API Key and make your first request.
Discussions

Free xAI Grok API Key/Credits in 2024
I haven’t used the grok models, but is it true that they are a lot less restrictive than the open AI and the antropic ones ? because to me that would be important thing I’m sick of being curtailed by the random guardrails. More on reddit.com
🌐 r/LLMDevs
11
8
November 6, 2024
I have got my free API key, now what are the best ways to use it
Go to chat-preview.lobehub.com then go to settings by clicking on logo on left corner of website In OpenAI section, add the API key and the base url (api proxy address) api key: you already got it start with xai- api proxy address: " https://api.x.ai/v1 " update the model-list to have grok-beta, you can also add grok-vision-beta there the image shows the settings details: https://i.imgur.com/9OZz9Mt.png More on reddit.com
🌐 r/grok
8
7
November 27, 2024
🌐
Merge.dev
merge.dev › blog › grok-api-key
How to get your Grok API key (5 steps)
January 2, 2025 - You can sign in in one of three ... your Twitter or Google account. ... Below the welcome message, you should see a small text block that reads, “Manage API keys.” Click on this....
🌐
xAI
docs.x.ai › docs › tutorial
The Hitchhiker's Guide to Grok | xAI
With your xAI API key exported as an environment variable, you're ready to make your first API request. Let's test out the API using curl. Paste the following directly into your terminal. ... curl https://api.x.ai/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $XAI_API_KEY" \ -m 3600 \ -d '{ "messages": [ { "role": "system", "content": "You are Grok, a highly intelligent, helpful AI assistant."
🌐
Apideck
apideck.com › blog › how-to-get-your-grok-xai-api-key
How to Get Your Grok (XAI) API Key
September 10, 2025 - Grok API keys typically start with "xai-". Store your key securely: ... 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": [ { ...
🌐
Grok API
grok-api.apidog.io › introduction-933934m0
Introduction - Grok API
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 3To access the Grok 3 models via API, please create an xAI account and an API key.
🌐
xAI
console.x.ai › home
Welcome | xAI Cloud Console
The xAI Cloud Console is your gateway to access the xAI API and other developer tools.
🌐
Krebs on Security
krebsonsecurity.com › 2025 › 05 › xai-dev-leaks-api-key-for-private-spacex-tesla-llms
xAI Dev Leaks API Key for Private SpaceX, Tesla LLMs – Krebs on Security
In total, GitGuardian found the key had access to at least 60 fine-tuned and private LLMs. “The credentials can be used to access the X.ai API with the identity of the user,” GitGuardian wrote in an email explaining their findings to xAI.
Find elsewhere
🌐
xAI
accounts.x.ai › sign-in
Sign In to Your xAI API Account | xAI Single-Sign On
Don't have an account? Sign up · By continuing, you agree to xAI's Terms of Service and Privacy Policy
🌐
GitGuardian
docs.gitguardian.com › x ai api key
X AI API Key | GitGuardian documentation
November 27, 2025 - Summary: X's AI API allow integrating Grok in an application. The API Key is used to authenticate requests to the API.
🌐
Reddit
reddit.com › r/llmdevs › free xai grok api key/credits in 2024
r/LLMDevs on Reddit: Free xAI Grok API Key/Credits in 2024
November 6, 2024 -

November 4, 2024

https://x.ai/blog/api?_bhlid=9f5ec12bce9af5dbd44b53e85ec66e15161e6773

API Public Beta

Starting today, developers can build on our Grok foundation models using our newly released API. We will run a public beta program until the end of 2024 during which everyone will get $25 of free API credits per month.

We are happy to announce the immediate availability of our API, which gives developers programmatic access to our Grok series of foundation models. To get started, head to console.x.ai and sign up to create an account. We are excited to see what developers build using Grok.

Models

We are kicking off our public beta with a preview of a new Grok model that is currently in the final stages of development. The model – released under the provisional name grok-beta – has a context length of 128,000 tokens and also supports function calling and system prompts. We will release more information about the model shortly.

In addition to the text-only version of the model grok-beta, we will also release a multi-modal version that can ingest images. The vision model will be available next week.

Free credits

We will run a public beta program throughout the end of the year. Everyone will get $25 of free API credits per month to test the API and get started using Grok.

Anyone who has purchased prepaid credits so far will get the equivalent amount of free monthly credits for every month until the end of the year. For example, if you purchased $50 of prepaid credits already, you will now have $25 + $50 of additional free credits in November and December.

API

To learn more about our API, check out our documentation at docs.x.ai. Our REST API is fully compatible with the ones offered by OpenAI and Anthropic. This simplifies migration. 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 › key-information › using-management-api
Using Management API | xAI
An example to create an API key with all models and endpoints enabled, limiting requests to 5 queries per second and 100 queries per minute, without token number restrictions. ... curl https://management-api.x.ai/auth/teams/{teamId}/api-keys \ -X POST \ -H "Authorization: Bearer <Your Management API Key>" \ -d '{ "name": "My API key", "acls": ["api-key:model:*", "api-key:endpoint:*"], "qps": 5, "qpm": 100, "tpm": null }'
🌐
TypingMind
typingmind.com › guide › use-grok-api-key-to-chat-with-ai
How to use xAI API Key for AI chat | TypingMind
September 29, 2025 - Save your API key in a secure password manager or encrypted noteSometimes, this provider will require you to add a payment method to your account before you can use your API key to chat with AI. So, to avoid any hiccups, make sure you’ve got a payment method set up and ready to go! Important: Keep your API key secure and never share it publicly. Store it safely as you'll need it to connect with TypingMind. Once you have your xAI API key, connecting it to TypingMind to chat with AI is straightforward:
🌐
xAI
x.ai › news › grok-4-1-fast
Grok 4.1 Fast and Agent Tools API | xAI
November 19, 2025 - These tools run entirely on xAI’s infrastructure, so developers no longer need to manage API keys, rate limits, sandboxes, or retrieval pipelines.
🌐
Make
apps.make.com › xai
xAI - Apps Documentation
with the xai app in {{product name}} ... the two services to communicate to create the connection, you need to /#obtain your api key in xai /#create ......
🌐
Cline
docs.cline.bot › provider-config › xai-grok
xAI (Grok) - Cline
Sign Up/Sign In: Go to the xAI Console. Create an account or sign in. Navigate to API Keys: Go to the API keys section in your dashboard.
🌐
xAI
docs.x.ai › docs › api-reference
REST API Reference | xAI
The base for all routes is at https://api.x.ai. For all routes, you have to authenticate with the header Authorization: Bearer <your xAI API key>.
🌐
Medium
medium.com › @piyushkashyap045 › how-to-leverage-xai-api-for-your-projects-a-step-by-step-guide-2f2ae6bf4f9f
How to Leverage xAI API for Your Projects: A Step-by-Step Guide | by Piyush Kashyap | Medium
November 12, 2024 - The xAI API is structured around making HTTP requests to access different endpoints. Each API request must be authenticated using your API key. Base URL: https://api.x.ai/v1 (this is the endpoint you’ll interact with).
🌐
OpenRouter
openrouter.ai › x-ai › grok-4.1-fast:free
Grok 4.1 Fast - API, Providers, Stats | OpenRouter
November 19, 2025 - 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