🌐
xAI
docs.x.ai › docs › tutorial
The Hitchhiker's Guide to Grok | xAI
First, you'll need to create an xAI account to access xAI API. Sign up for an account here. Once you've created an account, you'll need to load it with credits to start using the API. Create an API key via the API Keys Page in the xAI API Console.
🌐
xAI
x.ai › api
API | xAI
Migrating is as easy as generating an API key and changing a URL.Start building · Installing Grok... We're proud to bring you Grok 4 access on the API, offering advanced reasoning, coding, and visual processing capabilities.View docs · [ For projects big and small ] grok-4-1-fast-reasoningNew · Bringing the next generation of tool-calling agents to the xAI API ·
🌐
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
docs.x.ai › docs › key-information › using-management-api
Using Management API | xAI
The management key can be obtained at xAI Console -> Settings -> Management Keys. The base URL is at https://management-api.x.ai, which is also different from the inference API. You can create, list, update, and delete API keys via the management ...
🌐
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 ...
🌐
Make
apps.make.com › xai
xAI - Apps Documentation
with the xai app in {{product name}} ... to communicate to create the connection, you need to /#obtain your api key in xai /#create the connection in obtain your api key in ......
🌐
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
Find elsewhere
🌐
Apidog
apidog.com › blog › xai-grok-api
Overview of xAI Grok & How to Use Its API
August 1, 2025 - python -c "import xai_sdk; xai_sdk.does_it_work()" Step 3: After installing the SDK and successfully setting up your API key, you can run a sample application like this: """A simple example demonstrating text completion.""" import asyncio import xai_sdk async def main(): """Runs the example.""" client = xai_sdk.Client() prompt = "The answer to live and the universe is" print(prompt, end="") async for token in client.sampler.sample(prompt, max_len=3): print(token.token_str, end="") print("") asyncio.run(main())
🌐
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.
🌐
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.
🌐
GitHub
github.com › xai-org › xai-sdk-python
GitHub - xai-org/xai-sdk-python: The official Python SDK for the xAI API
For a complete set of examples demonstrating the SDK's capabilities, including authentication, chat, image generation, function calling, and more, refer to the examples folder. To use the xAI SDK, you need to instantiate either a synchronous or asynchronous client. By default, the SDK looks for an environment variable named XAI_API_KEY for authentication.
Starred by 282 users
Forked by 43 users
Languages   Python
🌐
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
xai-docs.com › management-api.html
Management API Reference – xAI
Validate whether key changes are live across services. curl https://api.example.com/keys/key-id/validate \ -H "Authorization: Bearer $MANAGEMENT_KEY"
🌐
LangChain
python.langchain.com › providers › more › xai
xAI | 🦜️🔗 LangChain
# Querying chat models with xAI from langchain_xai import ChatXAI chat = ChatXAI( # xai_api_key="YOUR_API_KEY", model="grok-4", ) # stream the response back from the model for m in chat.stream("Tell me fun things to do in NYC"): print(m.content, end="", flush=True) # if you don't want to do streaming, you can use the invoke method # chat.invoke("Tell me fun things to do in NYC")
🌐
DeepWiki
deepwiki.com › xai-org › xai-sdk-python › 2.1-authentication-and-api-keys
Authentication and API Keys | xai-org/xai-sdk-python | DeepWiki
November 22, 2025 - The standard API key is required for all SDK operations. The management API key is only needed when using administrative functions in the Collections API that require elevated privileges. Sources: src/xai_sdk/client.py49-54 src/xai_sdk/sync/client.py37-41 src/xai_sdk/sync/client.py52-64