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
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.
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 8 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 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.
Official Python and Node.js SDKs are under development. Stay tuned!