
Short answer
Grok API multi-agent is a model you call from code, grok-4.20-multi-agent, that sends one question to a team of 4 or 16 AI agents. They research and discuss it together, and a leader agent returns a single answer. It’s a developer tool in beta, not something you set up in the Grok Bot app.
Who it’s for
- Developers who want deep, well-sourced research answers inside their own app or script.
- Not for people who want an assistant that does tasks for them. That’s Grok Bot.
How it differs from Grok Bot
| Grok API multi-agent | Grok Bot | |
|---|---|---|
| What you get | One answer per request | Named Bots that keep working on jobs |
| How you use it | An API call with an xAI API key | Messages in the Grok Bot app |
| Memory | None of its own. You chain turns with previous_response_id | Each Bot keeps memory, files and preferences |
| Can it act? | Only built-in tools (web search, X search, code execution, collections search) and remote MCP tools | Uses a cloud computer, a browser and connected apps, with approvals |
| How you pay | Per token, for every agent, plus tool calls | Included with plans that include Grok Bot |
How it works
From xAI’s docs:
- You send a request with the model name
grok-4.20-multi-agent. - Several agents start at once. Each brings its own reasoning and findings, and can use the tools you enabled.
- A leader agent combines the discussion and writes the final answer.
- You get back only the leader’s answer and tool calls. The other agents’ work is encrypted and included only if you turn on
use_encrypted_contentin the xAI SDK.
4 agents or 16?
| Setting | xAI SDK | OpenAI SDK, Vercel AI SDK, REST |
|---|---|---|
| 4 agents: quick, focused questions | agent_count=4 | reasoning effort low or medium |
| 16 agents: deep, many-sided research | agent_count=16 | reasoning effort high or xhigh |
xAI says 16 agents use “significantly more tokens” and take longer. Start with 4.
A minimal request
curl https://api.x.ai/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $XAI_API_KEY" \
-d '{
"model": "grok-4.20-multi-agent",
"reasoning": {"effort": "low"},
"input": [{"role": "user", "content": "Compare the top 3 EV makers by battery tech, range and charging."}],
"tools": [{"type": "web_search"}]
}'Limits to know (as of Oct 2026)
- Beta: the API and its behavior may change.
- No custom tools: your own function calling and client-side tools aren’t supported. Built-in tools and remote MCP tools are.
- Responses API or xAI SDK only: it doesn’t work with the Chat Completions API.
- No
max_tokensparameter. - Cost adds up: every agent’s input, output and reasoning tokens are billed, plus every tool call. xAI’s models page lists
grok-4.20-multi-agent-0309at $1.25 per million input tokens and $2.50 per million output tokens for prompts under 200k tokens. Check theusageandserver_side_tool_usagefields in each response.
Prompting tips from xAI
- Name the exact angles to cover (“compare by battery tech, range and charging”) instead of a broad topic.
- Ask for a table or other structure.
- Say which sources you trust.
- Break deep topics into a conversation of follow-up questions.
FAQ
Is Grok API multi-agent the same as Grok Bot?
No. Multi-agent is one API model that returns an answer. Grok Bot gives you lasting Bots that do work on a cloud computer. See Grok agents explained.
Is it the same as Grok Build subagents?
No. Subagents are child sessions inside xAI’s coding agent, Grok Build. See Grok Build subagents.
Can I choose how many agents run?
Yes: 4 or 16. In the xAI SDK set agent_count; elsewhere use reasoning effort (low/medium for 4, high/xhigh for 16).
Can I see what each agent said?
Not by default. Only the leader’s answer and tool calls come back. The other agents’ work is included, encrypted, when you set use_encrypted_content in the xAI SDK.
Swarm School is an independent site. We’re not affiliated with xAI.
Sources
- https://docs.x.ai/developers/model-capabilities/text/multi-agent
- https://docs.x.ai/developers/models
- https://docs.x.ai/grok-bot/overview
- https://x.ai/pricing
Swarm School is independent and not affiliated with Grok Bot’s makers. Features change; check the official docs for current details.