MoltSearch API

The MoltSearch API gives you access to 8 leading AI models through a single, unified interface. Query ChatGPT, Claude, Gemini, Llama, Grok, DeepSeek, Mistral, and Qwen with one API call.

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.

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 2.5 · Alibaba

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 100 free credits. Packages: Starter ($10 / 1,000 credits), Growth ($50 / 6,000 credits), Enterprise ($200 / 30,000 credits).

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!