Loading
Loading
OpenAI-compatible at /v1/chat/completions so it drops straight into your existing LLM tooling — plus a native stream for the full agentic experience.
Change two lines — base_url and api_key — and any openai, LiteLLM, LangChain, or OpenRouter client works.
Cortexa auto-selects from 2.1K+ verified research tools per request.
Every claim ships with its source. The agent cross-references across independent databases and surfaces its ranked evidence alongside the synthesis.
Works with any OpenAI SDK — the base URL and key are the only integration points.
from openai import OpenAI
client = OpenAI(
base_url="https://api.cortexa.sh/v1",
api_key="sk-cortexa-...",
)
response = client.chat.completions.create(
model="cortexa",
messages=[
{"role": "user", "content": "Latest ASCO guidance on ICI-induced myocarditis?"}
],
)
print(response.choices[0].message.content)The native endpoint streams every agent event — text deltas, live tool invocations, and inline content cards (structures, charts, formulas, citations) — so you can build your own agentic UI on top. It's the same payload Cortexa's own interface renders.
import json
import os
import requests
resp = requests.post(
"https://api.cortexa.sh/v1/agents/cortexa/runs",
headers={"Authorization": f"Bearer {os.environ['CORTEXA_API_KEY']}"},
json={
"model": "cortexa",
"messages": [{"role": "user", "content": "Summarize GLP-1 cardiometabolic trials 2024-2026"}],
},
stream=True,
)
for line in resp.iter_lines():
if line.startswith(b"data: "):
evt = json.loads(line[6:])
# evt.type in ("text-delta", "tool-input-available",
# "tool-output-available", "data-card-structure",
# "data-card-chart", "data-usage-summary", ...)
print(evt)POST/v1/chat/completionsOpenAI-compatible chatDrop-in replacement for openai.chat.completions.create(). Runs the full Cortexa agent internally; returns text-only response in the standard OpenAI envelope.
POST/v1/agents/cortexa/runsNative agent runStreams the full UIMessage event stream: text deltas, tool invocations, step traces, scene events, and usage summary. Use when you want the agentic UX in your own app.
GET/v1/modelsList modelsOpenAI-compatible list with the single `cortexa` agent model.
GET/v1/toolsTool catalogOpenAI-style function-calling JSON schemas for the verified Cortexa research catalog. The `discover_tool` / `execute_tool` meta-tools route across 2.1K+ working tools.
GET/v1/sourcesData sourcesThe verified Cortexa research surfaces the agent can search, including literature, clinical research, genomics, chemistry, structures, code, and data workflows.
GET/v1/runs/{id}Replay a runReturns the completed messages, tool invocations, and scene stream for an earlier run. Idempotent — safe to call repeatedly.
POST/mcpMCP server (streamable-HTTP)Model Context Protocol endpoint. Point any MCP-capable client (Claude Desktop, Cursor, Codex, Claude Code, Windsurf, Zed, Claude.ai web) at this URL to use Cortexa as a tool. See /developers/mcp for client configs.
cortexaAutonomous cited research agent — any discipline
Input tokens | $3.00 / 1M tokens |
Output tokens | $15.00 / 1M tokens |
Tool call Each hit against an external DB or meta-tool. | $0.01 each |
Monthly commitment First $20/mo of usage is included; metered charges apply only above that floor. | $20 / month |
All /v1/* endpoints require a bearer token in the Authorization header:
Authorization: Bearer sk-cortexa-live-...Keys are minted from your API Keys dashboard. The plaintext is shown exactly once — we only retain a SHA-256 hash. Revoking a key takes effect immediately.