MoltSearch API
The MoltSearch API gives you access to 67 models from 9 providers through a single, unified interface — and, uniquely, to the debate engine that powers MoltSearch itself: ask once, have several models answer independently, and get one adjudicated verdict back.
The API surface
These are the endpoints we support today and intend to keep supporting. Anything not listed here is not part of the public API. Start with POST /v2/debate — the v1 endpoints below still work and are flat-priced, but they will be retired later, on notice. GET /v2/models and GET /v2/openapi.json need no key.
| Endpoint | What it does |
|---|---|
POST /v2/debate | The debate engine. Several models answer independently, a chairman returns one verdict plus a ranking, a measured agreement score, and cited sources. Billed per token. |
GET /v2/pricing/quote | Estimate a debate’s cost before running it. Free. |
GET /v2/models | Live model catalogue with current credit rates. No API key required. |
GET /v2/openapi.json | Full OpenAPI 3.1 specification. No API key required. |
| v1 — flat-priced per call. Still supported; will be retired later, on notice. | |
POST /v1/council | The debate engine. Several models answer your question independently, then a chairman model reads every answer and returns a single synthesised verdict. See the endpoint reference below for exactly what this endpoint returns today. |
POST /v1/multi-search | The same question to several models at once, returned side by side. No adjudication — use this when you want the raw spread rather than a verdict. |
POST /v1/chat | A single completion from one model of your choosing. The straightforward building block. |
GET /v1/models | The models currently available to your key, with the ids to pass to the endpoints above. |
GET /v1/search/web | Web results for a query — the same grounding layer the debate engine cites from. |
GET /v1/search/images | Image results for a query. |
GET /v1/search/videos | Video results for a query. |
GET /v1/personas | A library of pre-written expert personas you can pass to /v1/chat as system context. |
GET /v1/usage | Your credit balance and consumption. |
council and “debate”The MoltSearch product calls this a debate. The API endpoint is /v1/council, the name it launched under. They are the same thing, and /v1/council is not deprecated — it will keep working. We would rather leave a working endpoint alone than break your integration for the sake of a word.
The /v1/search/* and /v1/personas endpoints are fully supported parts of this API. Note that the MoltSearch consumer apps no longer surface them as user-facing features — the apps are built entirely around the debate experience. If you build on these endpoints you are building on the API, not mirroring the app.
Quick Start
Create an account
Sign up at portal.moltsearch.ai to get started.
Get your API key
Navigate to API Keys in the dashboard and create a new key. Your key starts with ms_live_.
Make your first request
Use the x-api-key header to authenticate:
curl -X POST https://api.moltsearch.ai/v1/chat \
-H "Content-Type: application/json" \
-H "x-api-key: ms_live_YOUR_KEY_HERE" \
-d '{
"model": "claude",
"message": "What is quantum computing?"
}'import requests
response = requests.post(
"https://api.moltsearch.ai/v1/chat",
headers={
"Content-Type": "application/json",
"x-api-key": "ms_live_YOUR_KEY_HERE"
},
json={
"model": "claude",
"message": "What is quantum computing?"
}
)
data = response.json()
print(data["data"]["message"])const response = await fetch("https://api.moltsearch.ai/v1/chat", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": "ms_live_YOUR_KEY_HERE"
},
body: JSON.stringify({
model: "claude",
message: "What is quantum computing?"
})
});
const data = await response.json();
console.log(data.data.message);payload := map[string]string{
"model": "claude",
"message": "What is quantum computing?",
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://api.moltsearch.ai/v1/chat", bytes.NewBuffer(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("x-api-key", "ms_live_YOUR_KEY_HERE")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()Authentication
All API requests (except /v1/models and /v1/health) require an API key. Include your key in the x-api-key header:
x-api-key: ms_live_YOUR_KEY_HERENever expose API keys in client-side code, public repos, or logs. If compromised, revoke the key immediately from your dashboard.
Base URLs
Rate Limits
The default rate limit is 60 requests per minute per API key. If you exceed this, you'll receive a 429 response.
Contact us for enterprise rate limit increases.
The Debate API (v2)
POST /v2/debate is the MoltSearch product. It is not a router and not a
fan-out: it adjudicates. One question goes to several models
independently, then a chairman model reads every answer and returns a single
synthesised verdict — along with a ranking of the debaters, an agreement score
that is measured rather than self-reported, and cited web sources.
Concretely, one call gives you:
- Independent answers. Each model answers without seeing the others, so you get genuine spread rather than an echo.
- A chairman verdict. One model reads every answer and writes the synthesis, citing sources when grounding is on.
- A ranking. The chairman orders the debaters best-first, in the same call as the verdict.
- An agreement score. Mean pairwise cosine similarity between embeddings of the answers. A number we computed, not one a model asserted. High agreement means the models converged; low agreement is your signal that the question is genuinely contested.
- Grounding. With
grounded: truethe panel is given live web results and the verdict carries[n]citations.
/v2/debate when being wrong is
expensive and you would otherwise call three providers yourself and reconcile the
answers by hand. Use /v1/chat when one model's answer is enough.
Run a debate
Requires an API key. Billed on the tokens actually used — see Billing.
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
query | string | Yes | The question. Max 8,000 characters. |
models | string[] | No | Registry ids, e.g. anthropic/claude-opus-5. 2–10 of them. Omit for the default panel. Naming a model we cannot serve is an error, never a silent substitution. |
chairman | string | No | Registry id of the adjudicator. Must not also be a debater — the judge cannot sit on its own jury. If it collides we reassign and tell you via verdict.chairman_reassigned. |
grounded | boolean | No | Default true. Fetches live web results and cites them. |
max_tokens | integer | No | Per-model output budget. Default 1024. No upper cap — your spend limit and the model's own context window are the real bounds. |
max_spend_credits | number | No | Hard ceiling. Checked before any provider is called: if the estimate exceeds it you get a 402 and nothing runs. |
system_prompt | string | No | Applied to the debaters. Omit for raw model behaviour — unlike the consumer app, the API imposes no brevity instruction. |
include_experimental | boolean | No | Opt in to models that are priced but not yet smoke-tested. |
Example request
curl -X POST https://api.moltsearch.ai/v2/debate \
-H "Content-Type: application/json" \
-H "x-api-key: ms_live_YOUR_KEY" \
-d '{
"query": "Is nuclear power essential to decarbonising the grid?",
"models": [
"openai/gpt-5-nano",
"anthropic/claude-haiku-4-5",
"google/gemini-2.5-flash-lite"
],
"chairman": "anthropic/claude-sonnet-5",
"grounded": true,
"max_spend_credits": 2
}'Response
{
"success": true,
"data": {
"query": "Is nuclear power essential to decarbonising the grid?",
"verdict": {
"text": "The models converge on nuclear being valuable but not strictly essential [1][3]...",
"chairman": "anthropic/claude-sonnet-5",
"chairman_model": "claude-sonnet-5"
},
"answers": [
{ "model": "openai/gpt-5-nano", "provider_model": "gpt-5-nano", "answer": "..." },
{ "model": "anthropic/claude-haiku-4-5", "provider_model": "claude-haiku-4-5-20251001", "answer": "..." },
{ "model": "google/gemini-2.5-flash-lite", "provider_model": "gemini-2.5-flash-lite", "answer": "..." }
],
"rankings": [
{ "model": "anthropic/claude-haiku-4-5", "avgRank": 1 },
{ "model": "openai/gpt-5-nano", "avgRank": 2 },
{ "model": "google/gemini-2.5-flash-lite", "avgRank": 3 }
],
"agreement_score": 0.8353,
"sources": [ { "n": 1, "title": "...", "url": "https://..." } ],
"models_unavailable": [],
"models_substituted": [],
"grounded": true
},
"usage": { "credits_used": 0.3133, "credits_remaining": 41.33 },
"meta": {
"debaters": ["openai/gpt-5-nano", "anthropic/claude-haiku-4-5", "google/gemini-2.5-flash-lite"],
"chairman": "anthropic/claude-sonnet-5",
"billing": {
"credits_charged": 0.3133,
"credits_remaining": 41.33,
"capped_by_max_spend": false,
"usage_reported": true,
"unpriced_models": []
}
}
}Fields worth knowing
| Field | What it tells you |
|---|---|
agreement_score | 0–1. Mean pairwise cosine similarity of answer embeddings. null if it could not be measured — we return null rather than invent a number. |
provider_model | The model that actually served the answer. Normally identical to what you asked for. |
models_substituted | Non-empty only if a provider fell back to a different model. You are billed for what really ran, and told about it. |
models_unavailable | Debaters that failed. The debate still returns if at least two answered. |
billing.unpriced_models | Models billed at the conservative fallback rate because we do not hold a confirmed price. |
Price a debate first
A pre-flight estimate, deliberately pessimistic: it assumes every model emits its full output budget, so a debate you can afford on the quote you can always afford in practice. Requires a key. Parameters go in the query string.
curl -G https://api.moltsearch.ai/v2/pricing/quote \
-H "x-api-key: ms_live_YOUR_KEY" \
--data-urlencode "models=openai/gpt-5-nano,anthropic/claude-haiku-4-5" \
--data-urlencode "chairman=anthropic/claude-sonnet-5" \
--data-urlencode "max_tokens=1024" \
--data-urlencode "grounded=true"The model catalogue
67 models across 9 providers. Public and unauthenticated — fetch it rather than hardcoding this table, which is a snapshot. Prices move, providers retire models, and anything we cannot actually serve is removed from this endpoint automatically.
curl https://api.moltsearch.ai/v2/modelsModels are addressed as provider/model-id. Rates are credits per 1M tokens.
| Provider | Models | Credits / 1M out | Ids |
|---|---|---|---|
| Open Models | 16 | 10–750 | together/gpt-oss-20b, together/qwen-3.5-9b, together/deepseek-v4-flash, together/gpt-oss-120b, together/gemma-4-31b, together/llama-3.3-70b, together/minimax-m3, together/qwen-3.7-plus, together/qwen-3.6-plus, together/nemotron-3-ultra, together/qwen-3.7-max, together/deepseek-v4-pro, together/inkling, together/glm-5.2, together/qwen-3.8-2.4t, together/kimi-k3 |
| OpenAI | 11 | 20–1500 | openai/gpt-5-nano, openai/gpt-5.6-luna, openai/gpt-5.4-nano, openai/gpt-5-mini, openai/gpt-5.4-mini, openai/gpt-5.1, openai/gpt-5.6-terra, openai/gpt-5.2, openai/gpt-5.4, openai/gpt-5.6-sol, openai/gpt-5.5 |
| Anthropic | 10 | 250–2500 | anthropic/claude-haiku-4-5, anthropic/claude-sonnet-5, anthropic/claude-sonnet-4-5, anthropic/claude-sonnet-4-6, anthropic/claude-opus-4-5, anthropic/claude-opus-4-6, anthropic/claude-opus-4-7, anthropic/claude-opus-4-8, anthropic/claude-opus-5, anthropic/claude-fable-5 |
| 7 | 20–450 | google/gemini-2.5-flash-lite, google/gemini-3.1-flash-lite, google/gemini-2.5-flash, google/gemini-3.5-flash-lite, google/gemini-3-flash-preview, google/gemini-3.7-flash, google/gemini-3.5-flash | |
| xAI | 6 | 100–300 | xai/grok-build-0.1, xai/grok-4.3, xai/grok-4.20-reasoning, xai/grok-4.20, xai/grok-4.5, xai/grok-4.6 |
| Mistral AI | 6 | 5–375 | mistral/ministral-3b, mistral/ministral-8b, mistral/ministral-14b, mistral/mistral-small, mistral/mistral-large, mistral/mistral-medium |
| Moonshot AI | 5 | 100–250 | moonshot/moonshot-v1-8k, moonshot/moonshot-v1-32k, moonshot/kimi-k2.5, moonshot/kimi-k2.6, moonshot/moonshot-v1-128k |
| MiniMax | 4 | 55–110 | minimax/minimax-text-01, minimax/minimax-m2.1, minimax/minimax-m3, minimax/minimax-m1 |
| DeepSeek | 2 | 66–198 | deepseek/deepseek-v4-flash, deepseek/deepseek-v4-pro |
How a debate is billed
Per token, on what the call actually used — not a flat fee per request. Each model in the panel is priced individually, so a debate between three small models costs a fraction of one between three flagships.
credits = ( sum(tokens x rate_per_1M) + platform_fee ) / credit_valueOne credit is $0.100. The chairman is normally the largest single line on the bill: it reads every debater's answer, so its input is several times any one debater's.
| Panel | Typical cost |
|---|---|
| Three small models, small chairman | ~0.07 credits |
| Default panel, Haiku chairman | ~0.3–0.4 credits |
| Three flagships, Opus chairman | ~4 credits |
max_spend_credits on every debate. It is checked
against the estimate before any provider is called, so an expensive panel fails
fast and free rather than surprising you on the invoice.
Signup grants 10 free credits ($1.00 of inference), no card required.
Machine-readable spec
The full OpenAPI 3.1 description of /v2 is public. Point your client
generator — or your coding agent — straight at it.
curl https://api.moltsearch.ai/v2/openapi.jsonA plain-text summary intended for LLMs is at portal.moltsearch.ai/llms.txt.
List Models
Returns a list of all available AI models. No authentication required.
Available Models
Chat Completion
Send a message to a single AI model and receive a response.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Required | The model to use (e.g., claude, chatgpt) |
message | string | Required | The message to send |
max_tokens | integer | Optional | Maximum response tokens (default: 300) |
persona | string | Optional | AI persona context (e.g., "a helpful coding assistant") |
Example
curl -X POST https://api.moltsearch.ai/v1/chat \
-H "Content-Type: application/json" \
-H "x-api-key: ms_live_YOUR_KEY" \
-d '{"model": "chatgpt", "message": "Explain recursion"}'import requests
resp = requests.post("https://api.moltsearch.ai/v1/chat",
headers={"x-api-key": "ms_live_YOUR_KEY", "Content-Type": "application/json"},
json={"model": "chatgpt", "message": "Explain recursion"}
)
print(resp.json()["data"]["message"])const resp = await fetch("https://api.moltsearch.ai/v1/chat", {
method: "POST",
headers: {"x-api-key": "ms_live_YOUR_KEY", "Content-Type": "application/json"},
body: JSON.stringify({model: "chatgpt", message: "Explain recursion"})
});
const {data} = await resp.json();
console.log(data.message);body, _ := json.Marshal(map[string]string{"model": "chatgpt", "message": "Explain recursion"})
req, _ := http.NewRequest("POST", "https://api.moltsearch.ai/v1/chat", bytes.NewBuffer(body))
req.Header.Set("x-api-key", "ms_live_YOUR_KEY")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)Response
{
"success": true,
"data": {
"model": "chatgpt",
"message": "Recursion is a programming technique where a function calls itself...",
"finish_reason": "stop"
},
"usage": {
"credits_used": 1,
"credits_remaining": 99
},
"meta": {
"request_id": "req_a1b2c3d4e5f6g7h8i9j0k1l2",
"processing_time_ms": 1842
}
}Multi-Search
Query multiple AI models simultaneously and compare their responses side-by-side.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
message | string | Required | The message to send to all models |
models | string[] | Optional | Models to query. Default: all 10 models |
max_tokens | integer | Optional | Max tokens per model (default: 300) |
curl -X POST https://api.moltsearch.ai/v1/multi-search \
-H "x-api-key: ms_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "Best practices for API design", "models": ["chatgpt", "claude", "gemini"]}'resp = requests.post("https://api.moltsearch.ai/v1/multi-search",
headers={"x-api-key": "ms_live_YOUR_KEY", "Content-Type": "application/json"},
json={"message": "Best practices for API design", "models": ["chatgpt", "claude", "gemini"]}
)
for r in resp.json()["data"]["responses"]:
print(f"{r['model']}: {r['message'][:100]}...")LLM Council
Start a structured debate between AI models. Each model gives its opinion, then a chairman (Claude) synthesizes a verdict.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Required | The question for the council |
models | string[] | Optional | Models to participate (min 3, default: 5 models) |
curl -X POST https://api.moltsearch.ai/v1/council \
-H "x-api-key: ms_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "Is TypeScript better than JavaScript for large projects?"}'Web Search
Search the web and get structured results.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Required | Search query (URL parameter) |
Image Search
Search for images and get structured results with URLs and metadata.
Video Search
Search for videos and get structured results with URLs and metadata.
List Personas
Browse available AI personas from the MoltSearch marketplace.
| Parameter | Type | Required | Description |
|---|---|---|---|
category | string | Optional | Filter by category |
limit | integer | Optional | Max results (default: 50) |
Usage Stats
Get your API usage statistics for a given time period.
Error Handling
All errors follow a consistent format:
{
"success": false,
"error": {
"message": "Invalid or revoked API key.",
"type": "authentication_error",
"request_id": "req_a1b2c3d4e5f6g7h8i9j0k1l2"
}
}Error Types
| Status | Type | Description |
|---|---|---|
400 | validation_error | Invalid request parameters |
401 | authentication_error | Missing or invalid API key |
402 | insufficient_credits | Not enough credits to make this call |
403 | authorization_error | Account is inactive |
404 | not_found | Unknown endpoint |
429 | rate_limit_exceeded | Too many requests |
500 | internal_error | Server error |
502 | model_error | AI model failed to respond |
Credits & Billing
Each API call costs credits based on the endpoint. Free endpoints cost 0 credits. Purchase credits at portal.moltsearch.ai.
/v1/chat/v1/multi-search/v1/council/v1/search/*/v1/models/v1/personas/v1/usageNew accounts start with 10 free credits ($1.00 of inference). Packages: Starter ($10 / 100 credits), Growth ($50 / 600 credits), Enterprise ($200 / 3,000 credits). One credit is $0.100.
SDKs
Official SDKs are coming soon. In the meantime, you can use any HTTP client to interact with the API.
Official Python and Node.js SDKs are under development. Stay tuned!