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.

EndpointWhat it does
POST /v2/debateThe 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/quoteEstimate a debate’s cost before running it. Free.
GET /v2/modelsLive model catalogue with current credit rates. No API key required.
GET /v2/openapi.jsonFull OpenAPI 3.1 specification. No API key required.
v1 — flat-priced per call. Still supported; will be retired later, on notice.
POST /v1/councilThe 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-searchThe 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/chatA single completion from one model of your choosing. The straightforward building block.
GET /v1/modelsThe models currently available to your key, with the ids to pass to the endpoints above.
GET /v1/search/webWeb results for a query — the same grounding layer the debate engine cites from.
GET /v1/search/imagesImage results for a query.
GET /v1/search/videosVideo results for a query.
GET /v1/personasA library of pre-written expert personas you can pass to /v1/chat as system context.
GET /v1/usageYour credit balance and consumption.
On naming: 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.

Search and personas are API capabilities

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

1

Create an account

Sign up at portal.moltsearch.ai to get started.

2

Get your API key

Navigate to API Keys in the dashboard and create a new key. Your key starts with ms_live_.

3

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_HERE
⚠ Keep your keys secret

Never expose API keys in client-side code, public repos, or logs. If compromised, revoke the key immediately from your dashboard.

Base URLs

Production
https://api.moltsearch.ai
UAT (Testing)
https://api-uat.moltsearch.ai

Rate Limits

The default rate limit is 60 requests per minute per API key. If you exceed this, you'll receive a 429 response.

✓ Need higher limits?

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: true the panel is given live web results and the verdict carries [n] citations.
When to reach for this. Use /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

POST/v2/debatePer token

Requires an API key. Billed on the tokens actually used — see Billing.

Request body

FieldTypeRequiredNotes
querystringYesThe question. Max 8,000 characters.
modelsstring[]NoRegistry 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.
chairmanstringNoRegistry 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.
groundedbooleanNoDefault true. Fetches live web results and cites them.
max_tokensintegerNoPer-model output budget. Default 1024. No upper cap — your spend limit and the model's own context window are the real bounds.
max_spend_creditsnumberNoHard ceiling. Checked before any provider is called: if the estimate exceeds it you get a 402 and nothing runs.
system_promptstringNoApplied to the debaters. Omit for raw model behaviour — unlike the consumer app, the API imposes no brevity instruction.
include_experimentalbooleanNoOpt 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

FieldWhat it tells you
agreement_score0–1. Mean pairwise cosine similarity of answer embeddings. null if it could not be measured — we return null rather than invent a number.
provider_modelThe model that actually served the answer. Normally identical to what you asked for.
models_substitutedNon-empty only if a provider fell back to a different model. You are billed for what really ran, and told about it.
models_unavailableDebaters that failed. The debate still returns if at least two answered.
billing.unpriced_modelsModels billed at the conservative fallback rate because we do not hold a confirmed price.

Price a debate first

GET/v2/pricing/quoteFree

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

GET/v2/modelsFree · no key

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/models

Models are addressed as provider/model-id. Rates are credits per 1M tokens.

ProviderModelsCredits / 1M outIds
Open Models1610–750together/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
OpenAI1120–1500openai/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
Anthropic10250–2500anthropic/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
Google720–450google/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
xAI6100–300xai/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 AI65–375mistral/ministral-3b, mistral/ministral-8b, mistral/ministral-14b, mistral/mistral-small, mistral/mistral-large, mistral/mistral-medium
Moonshot AI5100–250moonshot/moonshot-v1-8k, moonshot/moonshot-v1-32k, moonshot/kimi-k2.5, moonshot/kimi-k2.6, moonshot/moonshot-v1-128k
MiniMax455–110minimax/minimax-text-01, minimax/minimax-m2.1, minimax/minimax-m3, minimax/minimax-m1
DeepSeek266–198deepseek/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_value

One 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.

PanelTypical cost
Three small models, small chairman~0.07 credits
Default panel, Haiku chairman~0.3–0.4 credits
Three flagships, Opus chairman~4 credits
Cap it. Set 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.json

A plain-text summary intended for LLMs is at portal.moltsearch.ai/llms.txt.

List Models

GET/v1/modelsFree

Returns a list of all available AI models. No authentication required.

Available Models

chatgpt
GPT-4o · OpenAI
claude
Sonnet · Anthropic
gemini
Gemini Pro · Google
llama
Llama 3.3 · Meta
grok
Grok · xAI
deepseek
DeepSeek R1
mistral
Mistral Large
qwen
Qwen 3 · Alibaba
kimi
Kimi K2 · Moonshot
minimax
MiniMax M1

Chat Completion

POST/v1/chat

Send a message to a single AI model and receive a response.

Request Body

ParameterTypeRequiredDescription
modelstringRequiredThe model to use (e.g., claude, chatgpt)
messagestringRequiredThe message to send
max_tokensintegerOptionalMaximum response tokens (default: 300)
personastringOptionalAI 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
  }
}

LLM Council

POST/v1/council

Start a structured debate between AI models. Each model gives its opinion, then a chairman (Claude) synthesizes a verdict.

Request Body

ParameterTypeRequiredDescription
querystringRequiredThe question for the council
modelsstring[]OptionalModels 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

GET/v1/search/web?query=...

Search the web and get structured results.

ParameterTypeRequiredDescription
querystringRequiredSearch query (URL parameter)

Image Search

GET/v1/search/images?query=...

Search for images and get structured results with URLs and metadata.

Video Search

GET/v1/search/videos?query=...

Search for videos and get structured results with URLs and metadata.

List Personas

GET/v1/personasFree

Browse available AI personas from the MoltSearch marketplace.

ParameterTypeRequiredDescription
categorystringOptionalFilter by category
limitintegerOptionalMax results (default: 50)

Usage Stats

GET/v1/usage?days=30Free

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

StatusTypeDescription
400validation_errorInvalid request parameters
401authentication_errorMissing or invalid API key
402insufficient_creditsNot enough credits to make this call
403authorization_errorAccount is inactive
404not_foundUnknown endpoint
429rate_limit_exceededToo many requests
500internal_errorServer error
502model_errorAI 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
1
credit
/v1/multi-search
3
credits
/v1/council
5
credits
/v1/search/*
1
credit
/v1/models
0
free
/v1/personas
0
free
/v1/usage
0
free

New 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.

🛠 Coming Soon

Official Python and Node.js SDKs are under development. Stay tuned!