ChainLens ResearchChainLens ResearchDocs
Back to app
OverviewResearch ModesData SourcesFeaturesREST APIMCP ServerFAQRefund Policy

B2B Developer REST API

Base URL: https://research-api.chainlens.net. Authenticate requests by passing your key in the Authorization: Bearer clrs_... header.

API Endpoints

MethodEndpointDescriptionCost
POST/api/v1/searchUnified endpoint: supports output=search, answer, research, wide_research, contents0.25 – 5.0 cr
POST/api/v1/askDedicated single-pass fast Q&A with web grounding0.25 – 0.7 cr
POST/api/v1/reasonDedicated multi-step reasoning and deep analysis0.90 cr
POST/api/v1/researchDedicated exhaustive deep research report synthesis1.50 cr
POST/api/v1/contentsToken-efficient page extraction: returns clean markdown from target URLsFree / 0.05 cr
POST/api/v1/chat/completionsOpenAI-compatible drop-in chat completions endpoint with web groundingPer-mode rate
POST/api/v1/monitorsCreate scheduled search monitor with cron schedule & webhook deliveryFree tier
GET/api/v1/usageRetrieve current unified credit balance, usage metrics, and active plan detailsFree
GET/api/v1/pricingPublic catalog of credit rates, currency mappings, and cache-discount rulesFree

Integration Examples

Deep Research (SSE Stream)

POST /api/v1/search
curl -N -X POST https://research-api.chainlens.net/api/v1/search \
  -H "Authorization: Bearer clrs_<your-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "Deep dive into sovereign L2 rollups architecture in 2026",
    "output": "research",
    "mode": "quality",
    "sources": ["web", "academic", "discussions"]
  }'

OpenAI Drop-in SDK Client

POST /api/v1/chat/completions
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "clrs_<your-key>",
  baseURL: "https://research-api.chainlens.net/api/v1",
});

const completion = await client.chat.completions.create({
  model: "chainlens-reason",
  messages: [{ role: "user", content: "Compare NestJS vs FastAPI for high-throughput AI services" }],
  stream: true,
});

for await (const chunk of completion) {
  process.stdout.write(chunk.choices[0]?.delta?.content || "");
}