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
| Method | Endpoint | Description | Cost |
|---|---|---|---|
| POST | /api/v1/search | Unified endpoint: supports output=search, answer, research, wide_research, contents | 0.25 – 5.0 cr |
| POST | /api/v1/ask | Dedicated single-pass fast Q&A with web grounding | 0.25 – 0.7 cr |
| POST | /api/v1/reason | Dedicated multi-step reasoning and deep analysis | 0.90 cr |
| POST | /api/v1/research | Dedicated exhaustive deep research report synthesis | 1.50 cr |
| POST | /api/v1/contents | Token-efficient page extraction: returns clean markdown from target URLs | Free / 0.05 cr |
| POST | /api/v1/chat/completions | OpenAI-compatible drop-in chat completions endpoint with web grounding | Per-mode rate |
| POST | /api/v1/monitors | Create scheduled search monitor with cron schedule & webhook delivery | Free tier |
| GET | /api/v1/usage | Retrieve current unified credit balance, usage metrics, and active plan details | Free |
| GET | /api/v1/pricing | Public catalog of credit rates, currency mappings, and cache-discount rules | Free |
Integration Examples
Deep Research (SSE Stream)
POST /api/v1/searchcurl -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/completionsimport 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 || "");
}