One call.
The whole swarm.
Send one question and get answers from GPT, Claude, Gemini, Grok, DeepSeek and more in a single JSON response. Add "mode": "consensus" and one model chairs the swarm: a merged verdict, an agreement score and every disagreement.
Authentication
Send your API key as a bearer token. Keys start with qr_live_, belong to your wallet and draw from its credit balance. Keep them secret – never put them in frontend code.
Authorization: Bearer qr_live_...
Credits & pricing
Every successful answer costs credits – 1 per standard answer, 5 per premium answer. Failed models are free. Credits never expire and are shared with the chat, where they kick in after your daily tier limit.
| Model | ID | Credits / answer | Images | Status |
|---|---|---|---|---|
GPT-6 Astra |
gpt |
5 | Live | |
Claude Opus 5 |
claude |
5 | Live | |
Gemini 3.1 Pro |
gemini |
5 | Live | |
Grok 4.6 |
grok |
5 | Live | |
DeepSeek V4 Pro |
deepseek |
1 | – | Live |
Mistral Medium 3.5 |
mistral |
1 | Live | |
Cohere Command A+ |
cohere |
1 | Live | |
Llama 4 Maverick |
llama |
1 | Live | |
qwen |
1 | – | Live | |
kimi |
1 | Live | ||
glm |
1 | – | Live | |
sonar |
1 | – | Soon | |
nova |
1 | – | Soon | |
minimax |
1 | – | Soon | |
nemotron |
1 | – | Soon | |
mimo |
1 | – | Soon |
POST /v1/ask
Ask up to 4 models at once. They are queried in parallel; the response arrives when all of them have answered.
Request body
question | string · required | Up to 8,000 characters. |
models | string[] · required | 1–4 model IDs, e.g. ["claude", "gpt", "deepseek"]. |
mode | string · optional | "consensus" – adds a merged answer, an agreement score and the disagreements (+1 credit). |
web | boolean · optional | true – search the web first and give every model the same sources (+1 credit when sources are found). Answers cite them as [1], [2]. |
attachments | object[] · optional | Up to 4 files: {"name", "type", "data": "<base64>"}. Images (max 5 MB) go to vision models, PDFs (max 10 MB) and text to every model. |
history | object · optional | Previous turns per model: {"claude": [{"role": "user", "content": "…"}]} |
{
"question": "Is ETH more likely to flip BTC by 2030?",
"models": ["deepseek", "mistral", "kimi"],
"mode": "consensus"
}
{
"results": {
"deepseek": { "ok": true, "text": "Unlikely…" },
"mistral": { "ok": true, "text": "Low probability…" },
"kimi": { "ok": false, "error": "…" }
},
"consensus": {
"agreement": 78, "verdict": "reached",
"consensus": "Most likely not by 2030…",
"disagreements": [{ "topic": "…", "positions": [ … ] }],
"judge": "Grok 4.6"
},
"usage": { "credits_charged": 3, "credits_remaining": 497 }
}
GET /v1/models
Lists every model with its ID, price in credits, whether it reads images and whether it is live. No authentication needed.
curl https://swarmind.fun/v1/modelsGET /v1/credits
Returns the credit balance of the wallet that owns the API key.
{ "credits": 498 }Consensus mode
With "mode": "consensus", one model chairs the swarm after the answers arrive. It doesn’t average them – it merges what they agree on and names each side of every split. Models that can’t see an attached image are left out of the verdict. For agents: branch on consensus.agreement – proceed above 70, escalate to a human below 40.
MCP server
Give any MCP-compatible agent (Claude, Cursor, Windsurf, your own) the swarm as a tool. Endpoint: https://swarmind.fun/mcp – Streamable HTTP, authenticated with an API key from your dashboard, paid with the same credits.
Tools
ask_swarm | Ask 1–4 models (default: three strong, affordable ones). Returns the verdict, agreement score, disagreements and every answer. Options: models, consensus (default on), web. |
list_models | Model IDs, credit price per answer and image support. |
get_credits | Credits left on the key’s wallet. |
claude mcp add --transport http swarm https://swarmind.fun/mcp \
--header "Authorization: Bearer $API_KEY"
{
"mcpServers": {
"swarm": {
"url": "https://swarmind.fun/mcp",
"headers": { "Authorization": "Bearer qr_live_…" }
}
}
}
Pay per call x402
Agents can pay for a single question without an account or an API key, using the HTTP 402 flow. Call /v1/ask without a key and you get 402 Payment Required with the price in USDC, the receiving address and the network.
Send the USDC on Solana, then repeat the same request with an X-PAYMENT header: base64 JSON with either the transaction signature or a fully signed transaction for us to broadcast. We verify the transfer on-chain – token, receiver, amount, age – and answer. Each payment works once.
Price: 0.01 USDC per credit. If a model fails or you overpay, the unused part is credited to the paying wallet as credits you can use later. Pay per call switches on at launch.
{
"x402Version": 1,
"accepts": [{
"scheme": "exact", "network": "solana",
"maxAmountRequired": "80000",
"asset": "EPjF…Dt1v", // USDC
"payTo": "<treasury>",
"extra": { "decimals": 6, "credits": 8 }
}]
}
X-PAYMENT: base64({
"x402Version": 1, "scheme": "exact", "network": "solana",
"payload": { "signature": "5xQv…" }
})
→ 200 OK + X-PAYMENT-RESPONSE
"payment": { "paid_usdc": 0.08, "credits_used": 7,
"credits_refunded_to_wallet": 1 }
Errors & limits
Errors return JSON with a type and a message. Each key allows 60 requests per minute.
| Status | Type | Meaning |
|---|---|---|
400 | invalid_request_error | Missing question, too many models or no available model. |
401 | authentication_error | Missing, invalid or revoked API key. |
402 | insufficient_credits | Not enough credits – burn tokens in your dashboard. |
429 | rate_limit_error | More than 60 requests per minute on one key. |
{ "error": { "type": "insufficient_credits", "message": "…" } }Code examples
Pick your language. Every example asks three models and reads the verdict.
curl https://swarmind.fun/v1/ask \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"question": "Fact-check: the Bitcoin halving happens every 4 years.", "models": ["deepseek", "mistral", "kimi"], "mode": "consensus"}'
import os, requests
r = requests.post(
"https://swarmind.fun/v1/ask",
headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
json={"question": "Review these tokenomics for red flags: ...", "models": ["deepseek", "qwen", "glm"], "mode": "consensus"},
timeout=180,
)
r.raise_for_status()
data = r.json()
print(data["consensus"]["agreement"], data["consensus"]["verdict"])
const res = await fetch("https://swarmind.fun/v1/ask", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ question: "BTC long 64k, SL 61.5k – what am I missing?", models: ["deepseek", "mistral"] }),
});
const { results, usage } = await res.json();
console.log(results, usage.credits_remaining);
GPT-6 Astra
Claude Opus 5
Gemini 3.1 Pro
Grok 4.6
DeepSeek V4 Pro
Mistral Medium 3.5
Cohere Command A+
Llama 4 Maverick