Grok MCP
Call Grok's dialogue and video generation capabilities in the AI Agent through MCP.
Artificial intelligence model developed by xAI company
Your API key is pre-filled in the snippet — copy and run it in your terminal or IDE.
This is only a basic call example. See the full docs for more parameters and advanced usage.
Access the Grok series models of xAI in OpenAI compatible format. Supports Grok 4 flagship reasoning and Grok 3 long context—billed by Token.
Fully access the entire series of xAI Grok models, covering reasoning, conversation, and visual understanding.
Grok 4 is xAI's most powerful reasoning model, excelling in mathematics, programming, and complex analysis tasks, supporting deep reasoning chains.
Grok 3 offers a maximum of 1M long context window, capable of processing entire financial reports, lengthy documents, and legal files in one go.
Fully compatible with /v1/chat/completions interface, use OpenAI SDK to call Grok without modifying code.
Use your familiar OpenAI SDK, just modify the base_url to seamlessly switch to Grok models.
from openai import OpenAI
client = OpenAI(
base_url="https://api.acedata.cloud/v1",
api_key="YOUR_API_KEY"
)
response = client.chat.completions.create(
model="grok-4",
messages=[
{"role": "user", "content": "Explain the basic principles of quantum computing"}
]
)
print(response.choices[0].message.content)
It only takes a few minutes from registration to completing your first Grok conversation.
Register and generate an API key from the console.
Choose a model such as Grok 4 or Grok 3 based on your needs.
Send requests via the OpenAI compatible /v1/chat/completions.
Covers a variety of application scenarios from daily conversations to professional research.
Grok 4 performs excellently in programming benchmarks, efficiently generating and debugging code.
Handles complex data analysis tasks, generating insight reports and visualization suggestions.
Build customer service systems using Grok 3, quickly responding to customer inquiries.
Writing articles, translation, summarization, advertising copy, and other text creation tasks.
Complex reasoning, literature analysis, mathematical proofs, and exploration of scientific questions.
From rapid reasoning to flagship reasoning, choose the model that suits you best
xAI's strongest flagship model, with top-tier reasoning capabilities, suitable for complex analysis and research tasks.
The previous generation flagship model, powerful and thoroughly validated, a cost-effective choice.
Charged by token usage, no subscription fees, no hidden costs.
Bulk packages enjoy more discounts
Charged based on actual token usage, with separate pricing for input and output
Exclusive plans for high-usage teams
Common questions about using the Grok API
Grok 4 is xAI's flagship reasoning model, performing best on complex tasks. Grok 3 is the previous generation flagship, with a maximum of 1M ultra-long context, suitable for long document analysis, and offers better cost performance. The choice depends on whether you value reasoning ability or context length and cost more.
Ace Data Cloud provides a unified interface compatible with OpenAI, eliminating the need to register for an xAI account or configure a separate API key. You can access models like Grok, Claude, GPT, Gemini, etc., using the same API Key.
Yes. The Grok API is fully compatible with OpenAI's /v1/chat/completions format; just modify the base_url and model parameters. It supports OpenAI SDKs in various languages like Python, Node.js, Go, etc.
Yes. Set stream: true to get token-by-token SSE streaming output, suitable for real-time conversations and front-end display scenarios.
Ace Data Cloud offers various large language model APIs
Access the full range of xAI Grok models through an OpenAI compatible interface to empower your AI applications.
Grok Chat Completion API, compatible with the official API format.
Grok video generation API — create a Grok Imagine video from a text prompt and an input image.
Grok task query API — retrieve the result of a Grok video generation task by its ID.
We offer various credit packages. The more you purchase, the higher the discount you receive.
up to46% OFFCall Grok's dialogue and video generation capabilities in the AI Agent through MCP.
Configuration Method
Connect to the current service in Claude Code:
/mcp to check the connection and tool list.export ACEDATACLOUD_API_TOKEN='YOUR_API_TOKEN'
claude mcp add --scope user --transport http 'grok-mcp' 'https://grok.mcp.acedata.cloud/mcp' --header 'Authorization: Bearer ${ACEDATACLOUD_API_TOKEN}'
Provide model selection, parameter rules, and calling considerations for Grok dialogue and video capabilities for AI Agents.
Install the current Skill to Claude Code. Project-level configurations are shared across the repository, while user-level configurations apply to all projects on this machine.
npx skills add acedatacloud/skills --skill 'ai-chat' -a 'claude-code' --yes