🌐
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 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.
🌐
CometAPI
cometapi.com › grok-code-fast-1-api-what-is-and-how-to-access
Grok Code Fast 1 API: What is and How to Access - CometAPI - All AI Models in One API
September 18, 2025 - The xAI docs show the REST base as https://api.x.ai and specify standard Bearer token authentication. The docs and guides provide curl and SDK examples and emphasize compatibility with OpenAI-style requests for many tooling layers. IDE/service partners (preview integrations) — GitHub Copilot (opt-in public preview) and other partners (Cursor, Cline, etc.) have been announced as launch collaborators, enabling Grok Code Fast 1 inside VS Code and similar tools, sometimes via “bring your own key” flows.
🌐
OpenRouter
openrouter.ai › x-ai › grok-code-fast-1
Grok Code Fast 1 - API, Providers, Stats | OpenRouter
Grok Code Fast 1 is a speedy and economical reasoning model that excels at agentic coding. With reasoning traces visible in the response, developers can steer Grok Code for high-quality work flows.
🌐
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...
🌐
CometAPI
cometapi.com › grok-code-fast-1-api
Grok-code-fast-1 API - CometAPI - All AI Models in One API
September 22, 2025 - Click “Add Token” at the API token in the personal center, get the token key: sk-xxxxx and submit. Select the “grok-code-fast-1” endpoint to send the API request and set the request body. The request method and request body are obtained from our website API doc.
🌐
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)
🌐
Apidog
apidog.com › blog › grok-code-fast-1-api
How to Access Grok Code Fast 1 API ?
August 28, 2025 - Discover step-by-step instructions on accessing the Grok Code Fast 1 API from xAI. This guide explores API key setup, SDK integration, REST alternatives via OpenRouter, and advanced features. Developers gain insights into agentic coding capabilities, pricing, and optimization strategies.
Find elsewhere
🌐
Merge.dev
merge.dev › blog › grok-api-key
How to get your Grok API key (5 steps)
January 2, 2025 - Learn about each step you'll need to take to generate your API key for any of xAI's Grok models.
🌐
xAI
docs.x.ai › docs › models
X
The advanced agentic search capabilities powering grok.com are generally available in the new agentic tool calling API, and the Live Search API but will be deprecated by January 12, 2026. Live Search costs $25 per 1,000 sources requested, each source used (Web, X, News, RSS) in a request counts ...
🌐
xAI
x.ai
Welcome | xAI
We've just launched SuperGrok Heavy, providing access to Grok Heavy and much higher rate limits.Sign up now ... The best assistant in the world is now Enterprise ready. ... State-of-the-art RAG system built directly into our API.
🌐
AI Engineer Guide
aiengineerguide.com › blog › free-xai-grok-code-fast-1-api
How to use xAI's Grok Code Fast 1 API for free
August 31, 2025 - import os from openai import OpenAI client = OpenAI( api_key=os.getenv('AI_GATEWAY_API_KEY'), base_url='https://ai-gateway.vercel.sh/v1' ) response = client.chat.completions.create( model='xai/grok-code-fast-1', messages=[ { 'role': 'user', 'content': 'Why is the sky blue?' } ] )
🌐
Puter
developer.puter.com › tutorials › free-unlimited-grok-api
Free, Unlimited Grok API
December 14, 2025 - You can control Grok's response characteristics using the temperature and max_tokens parameters: <html> <body> <script src="https://js.puter.com/v2/"></script> <script> (async () => { // Low temperature (more focused, deterministic) puter.print("<h3>Low Temperature (0.1):</h3>"); const focusedResponse = await puter.ai.chat("Tell me about cats.", { model: 'x-ai/grok-4.1-fast', temperature: 0.1, max_tokens: 50 }); puter.print(focusedResponse.message.content + "<br><br>"); // High temperature (more creative, random) puter.print("<h3>High Temperature (1.8):</h3>"); const creativeResponse = await p
🌐
Medium
medium.com › @okanyenigun › grok-api-f180e5a7fa67
Grok API. Running Grok on local consumer… | by Okan Yenigün | Medium
October 28, 2024 - import os from openai import OpenAI os.environ["XAI_API_KEY"] = "your-key" XAI_API_KEY = os.getenv("XAI_API_KEY") client = OpenAI( api_key=XAI_API_KEY, base_url="https://api.x.ai/v1", ) completion = client.chat.completions.create( model="grok-beta", messages=[ {"role": "system", "content": "You are Grok, a chatbot inspired by the Hitchhikers Guide to the Galaxy."}, {"role": "user", "content": "Explain the risks of improper AI usage and its contribution to autocratic regimes."}, ], ) print(completion.choices[0].message) """ ChatCompletionMessage(content='Here is a humorous take on the risks of improper AI usage and its potential contribution to autocratic regimes:\n\n---\n\n**The Perils of Improper AI Usage: A Hitchhiker\'s Guide**\n\n**1.
🌐
Grok AI
grokai.bot › home
Grok AI API - Grok AI
May 15, 2025 - The Grok AI API is a powerful language model interface that allows developers to integrate advanced AI capabilities such as natural language understanding, text generation, and intelligent automation into their own applications.
🌐
Apideck
apideck.com › blog › how-to-get-your-grok-xai-api-key
How to Get Your Grok (XAI) API Key
September 10, 2025 - Read/Write: For full API capabilities · Model access: Choose which Grok models to enable: grok-1: Standard model · grok-1.5: Enhanced capabilities · grok-2: Latest model (if available) Rate limits: Configure custom limits if needed · Critical Security Notice: Your API key will only be shown once.
🌐
xAI
x.ai › news › api
API Public Beta | xAI
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
x.ai › news › grok-code-fast-1
Grok Code Fast 1 | xAI
Our team has crafted a Prompt Engineering Guide with tips on how to get the best from grok-code-fast-1. The model is generally available via the xAI API, priced at $0.20 / 1M input tokens, $1.50 / 1M output tokens, and $0.02 / 1M cached input tokens.