🌐
xAI
docs.x.ai › docs › tutorial
The Hitchhiker's Guide to Grok | xAI
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." }, { "role": "user", "content": "What is the meaning of life, the universe, and everything?" } ], "model": "grok-4", "stream": false }' As well as a native xAI Python SDK, the majority our APIs are fully compatible with the OpenAI and Anthropic SDKs. For example, we can make the same request from Python or Javascript like so: Python JavascriptOther ·
🌐
Merge.dev
merge.dev › blog › grok-api-key
How to get your Grok API key (5 steps)
January 2, 2025 - Above the fold, you should see a button that says, “Start building now.” Once you select that, you’ll be directed to xAI’s sign in page. You can sign in in one of three ways: enter your email address and password manually or go through an OAuth flow to authenticate either via 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
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
🌐
xAI
docs.x.ai › docs › key-information › using-management-api
Using Management API | xAI
If validation succeeds, the endpoint returns meta information about the management key. This endpoint does not require any Access Control List (ACL) permissions. ... curl https://management-api.x.ai/auth/management-keys/validation \ -H "Authorization: Bearer <Your Management API Key>"
🌐
xAI
docs.x.ai › docs › overview
Overview | xAI
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.
🌐
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 ... ... 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?"...
🌐
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).
🌐
GitGuardian
docs.gitguardian.com › x ai api key
X AI API Key | GitGuardian documentation
Summary: X's AI API allow integrating Grok in an application. The API Key is used to authenticate requests to the API.
🌐
Griptapenodes
docs.griptapenodes.com › en › stable › how_to › keys › grok
How to get and use an xAI Grok API key - Griptape Nodes
Grok is a family of Large Language Models (LLMs) developed by xAI. You can access these models via the GrokPrompt config node. To make use of these, however, you'll need to have an XAI account, and generate an API key.
Find elsewhere
🌐
YouTube
youtube.com › watch
How to Generate the xAI Grok API Key - YouTube
👉 Generate your Grok API key here: https://console.x.ai/In this video, I’ll show you how to generate your xAI Grok API key step by step.🧠 What You'll Learn...
Published   May 8, 2025
🌐
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 ......
🌐
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 - The xAI API provides developers with access to powerful models including Grok-4 and Grok-2-1212 (with a 131K token context window), supporting multimodal capabilities like vision processing and image generation via Flux.1. Key features include ...
🌐
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>.
🌐
AI Content Labs
docs.aicontentlabs.com › articles › x-ai-api-key
How to Set Up the X.ai API Key
January 7, 2025 - Go to the X.ai login page: https://x.ai/. If you don’t have an account yet, you can create one using the same link. Go to the API keys section: https://console.x.ai/.
🌐
Google AI
ai.google.dev › gemini api › using gemini api keys
Using Gemini API keys | Google AI for Developers
You can create and manage all your Gemini API Keys from the Google AI Studio API Keys page. Once you have an API key, you have the following options to connect to the Gemini API: ... For initial testing, you can hard code an API key, but this should only be temporary since it's not secure. You can find examples for hard coding the API key in Providing API key explicitly section.
🌐
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.

🌐
Portkey
portkey.ai › docs › integrations › llms › x-ai
xAI (Grok) - Portkey Docs
... import Portkey from 'portkey-ai'; const client = new Portkey({ apiKey: 'PORTKEY_API_KEY', provider:'@PROVIDER' }); async function main() { const response = await client.chat.completions.create({ messages: [{ role: "user", content: "Bob the ...
🌐
Grok API
grok-api.apidog.io › introduction-933934m0
Introduction - Grok API
Inspired by the Hitchhiker's Guide ... 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...