NeuroCortex API.
Drop-in OpenAI compatible.
REST API. Bearer auth. Same INR wallet as the Lab — every call debits credits at 2× Lab pricing (Hobby), 1.5× (Builder), 1.2× (Scale), 1.0× (Sovereign). Point your OpenAI SDK at our baseURL and ship.
One Bearer token. Three valid key formats.
Base URL: https://bharatneurotech.com/api/public/v1. Mint a key in /billing → API Keys. New tokens are issued as neurocortex_v3_live_…. Existing neurocortex_v2_live_… and nck_live_… keys continue to work. The full token is shown once; only its SHA-256 hash is stored.
Authorization: Bearer neurocortex_v3_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Content-Type: application/json
Swap the baseURL — keep your code.
// Node — OpenAI SDK
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.NEUROCORTEX_KEY,
baseURL: "https://bharatneurotech.com/api/public/v1",
});
const out = await client.chat.completions.create({
model: "neurocortex-v3",
messages: [{ role: "user", content: "Audit this AI policy clause: ..." }],
max_tokens: 16384, // see §5 — model-card maximum
});# Python — openai
from openai import OpenAI
client = OpenAI(
api_key=os.environ["NEUROCORTEX_KEY"],
base_url="https://bharatneurotech.com/api/public/v1",
)
out = client.chat.completions.create(
model="neurocortex-v3",
messages=[{"role": "user", "content": "..."}],
max_tokens=16384,
)# curl — non-stream
curl -sS https://bharatneurotech.com/api/public/v1/chat/completions \
-H "Authorization: Bearer $NEUROCORTEX_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "neurocortex-v3",
"messages": [{"role":"user","content":"One-line summary of ISO 42001."}],
"max_tokens": 1024
}'
# curl — streaming (SSE)
curl -N https://bharatneurotech.com/api/public/v1/chat/completions \
-H "Authorization: Bearer $NEUROCORTEX_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"neurocortex-v3","stream":true,"messages":[{"role":"user","content":"hi"}]}'
# curl — EQCortex (~580B, purpose-built for emotional intelligence)
# Accepts native `system` role. Upstream defaults: temperature=0.6, top_p=0.95, max_tokens up to 32768.
curl -sS https://bharatneurotech.com/api/public/v1/chat/completions \
-H "Authorization: Bearer $NEUROCORTEX_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "eqcortex",
"messages": [
{"role":"system","content":"You are a warm, empathetic writing partner."},
{"role":"user","content":"Draft a gentle nudge email to a lapsed customer."}
]
}'
# curl — health probe (no auth)
curl -sS https://bharatneurotech.com/api/public/v1/healthTwo model aliases. Same OpenAI-compatible endpoint.
| Model id | Best for | Context | Default max_tokens |
|---|---|---|---|
| neurocortex | Default. ~220B sparse Mixture-of-Experts (~15B active per token). Multimodal chat, decoding, vision, voice, docs. Best for real-time interaction and everyday audit chat. | Infinite Context Window · up to 100 billion tokens/request (NeuroMemory — proprietary; 100B on paid API sync path, higher via async) | 16384 |
| eqcortex | ~580B emotionally intelligent flagship. A model purpose-built for emotional intelligence — unprecedented emotional intelligence: empathy, tone, affect, human context. 800K-token native window. | 800K tokens (native) · Infinite via NeuroMemory (async, up to 100B tokens/request) | 32768 |
| neurocortex-codemaster | Code-tuned alias of NeuroCortex. Refactor, review, multi-file MVP scaffolds. India's rival to GPT Codex / Claude Code / Qwen Code / Jules. | Infinite Context Window · up to 100 billion tokens/request (NeuroMemory — proprietary; 100B on paid API sync path, higher via async) | 16384 |
| neurocortex-vision-physical | NeuroVision — physical-world reasoner for images and short mp4 clips. Space, time, causality, physics, next-step planning; returns 2D/3D points + bounding boxes. | 256K tokens (per request — frames must fit in-context) | 4096 |
| neurocortex-v3 | Legacy alias for `neurocortex`. Retained for backwards compatibility. | same as neurocortex | 16384 |
neurocortex-codemaster is the code-tuned alias of NeuroCortex — Bharat NeuroTech's rival to GPT Codex, Claude Code, Qwen Code and Google Jules. The server auto-injects a code-only system prompt (refactor / review / scaffold runnable multi-file MVPs), defaults max_tokens to the model-card maximum of 16384, and emits OpenAI-shape responses with model: "neurocortex-codemaster". Try it interactively at /codemaster.
// CodeMaster — scaffold a runnable MVP
const out = await client.chat.completions.create({
model: "neurocortex-codemaster",
messages: [{ role: "user", content: "Scaffold a Node + Express RAG chat that calls NeuroCortex." }],
max_tokens: 16384, // CodeMaster default — model-card maximum output
});All endpoints under /api/public/v1
| Method | Path | Description | Cost |
|---|---|---|---|
| GET | /v1/health | Unauthenticated liveness probe. Returns { ok, engine, version, ts }. Safe for uptime monitors. | free |
| POST | /v1/chat/completions | OpenAI-compatible Chat Completions. Streaming + non-streaming. Accepts model (neurocortex | eqcortex | neurocortex-codemaster | neurocortex-vision-physical | neurocortex-v3 [legacy]), messages, temperature, top_p, max_tokens, stream, stop, plus the NeuroCortex modes block. Vision-physical accepts image_url parts (https URL or data: base64). | ₹0.50 base (chat) · ₹2/image (vision-physical) · ×tier multiplier |
| GET | /v1/models | OpenAI-compatible model list. Returns neurocortex (default), eqcortex (~580B emotionally intelligent), neurocortex-codemaster, neurocortex-vision-physical, and the neurocortex-v3 legacy alias. | free |
| GET | /v1/neurocortex/models | Extended model list with capability tags and default_max_tokens. | free |
| POST | /v1/neurocortex/scan | Vision · image understanding (URL or base64). Non-OpenAI; multimodal extension. | ₹3 · ×multiplier |
| POST | /v1/neurocortex/listen | Audio/video transcription + analysis per minute. | ₹3–4/min · ×multiplier |
| GET | /v1/neurocortex/account | Wallet balance + daily usage on this key. | free |
| GET | /v1/neurocortex/plan | Tier + multiplier + daily cap on this key. | free |
| POST | /v1/neurocortex/chat | DEPRECATED — alias of /v1/chat/completions with the legacy { engine, message } envelope. Sends a Deprecation header. | same as /v1/chat/completions |
Three explicit toggles. Off by default.
Reasoning, agent tools and web search add latency. They are explicitly disabled on every API call unless you opt in. Set them via the OpenAI-safe extension field neurocortex on the chat body (OpenAI SDKs forward unknown JSON fields untouched):
{
"model": "neurocortex-v3",
"messages": [...],
"max_tokens": 16384,
"neurocortex": {
"deep_thinking": false, // engine called with thinking:false (≈ 1.5–4× faster)
"agent_mode": false, // tool_choice forced to "none"
"web_access": false // web tool stripped from tool list
}
}Default is the model-card maximum: 16384.
NeuroCortex is a reasoning-class engine. Setting max_tokens below 1024 is the number-one cause of empty responses — the engine spends its budget on internal reasoning and runs out before emitting the visible answer. The API now defaults to the engine's maximum supported output length so this is no longer a footgun.
- Default if omitted:
16384(model-card max). - Minimum accepted:
256(anything lower →400 invalid_request). - Maximum accepted:
16384(engine cap; requests above are clamped). - If the engine returns empty content with
finish_reason:"length"the API auto-refunds and returns502 empty_response_increase_max_tokens.
OpenAI-shape SSE with reasoning stripped.
Set stream: true. Response is text/event-stream with data: {…} chunks of object:"chat.completion.chunk" and a terminating data: [DONE]. Cost is debited up-front. If the stream ends with zero visible content deltas, the debit is auto-refunded (upstream failures, empty completions). Reasoning-only frames are suppressed; you never see reasoning_content or <think>…</think> blocks in the output.
Multi-file MVP scaffolds via the standard endpoint.
Send model: "neurocortex-codemaster" to /v1/chat/completions. The server auto-injects the CodeMaster system prompt (refactor / review / scaffold runnable multi-file MVPs) and defaults max_tokens to 16384. Every API response is a single OpenAI-shape chat completion — the interactive multi-file Artifact Build Loop (planner + per-file executor + workspace preview) is currently exposed at /codemaster only. Public-API build-loop support ships next; it will bill each planner and per-file call at ₹0.50 (before tier multiplier) alongside the base completion.
What terminates a response, and how to trace it.
stop— model reached a natural stop or astopsequence.length— hitmax_tokens. Increasemax_tokensand retry.tool_calls— model emitted a tool call (only whenagent_modeis on and tools are attached).content_filter— output was blocked by safety filters.
Every response carries an X-Request-Id header. Include it in support requests to trace a specific call. Legacy /v1/neurocortex/chat additionally returns a Deprecation header — migrate to /v1/chat/completions.
Same wallet as the Lab. Tier multipliers apply.
- Hobby — 2× Lab price, ₹5,000/day cap (default).
- Builder — 1.5×, ₹50,000/day cap.
- Scale — 1.2×, ₹2,50,000/day cap.
- Sovereign — 1.0× (no markup), ₹10,00,000/day cap.
Wallet balance is checked before the upstream call. Low balance returns 402 instantly — no time wasted on a doomed model round-trip. Failed handlers auto-refund. Hard daily caps are atomic at the database.
Standard JSON envelope.
{ "error": { "code": "insufficient_credits", "message": "Wallet has insufficient credits" },
"engine": "neurocortex" }max_tokens < 256Real-time usage + 402 events.
Set webhook_url on a key (Builder+ tier) to receive usage.debit and 402.insufficient_credits events. Payloads are HMAC-signed; verify the X-NeuroCortex-Signature header.
