DocsCatalogPricing
Sign inStart research

Start

Docs homeGetting started

Product

WorkspaceLibrary filesAbstractsPresentationsDashboards

Admin

OrganizationsSecurity & privacy

Developers

Developer APIMCP serverIntegrationsTool catalog

Documentation

Docs homeGetting startedWorkspaceLibrary filesAbstractsPresentationsDashboardsOrganizationsSecurity & privacyDeveloper APIMCP serverIntegrationsTool catalog
Developer documentation

Developer API

Use Cortexa through an OpenAI-compatible endpoint for quick adoption, or stream native agent events when you want tool traces and rich research cards.

Get an API key
zsh — cortexa-api
200 OK
$ 

Quickstart

If your app already uses an OpenAI SDK, point the base URL at Cortexa and use your Cortexa API key. The model name iscortexa.
curl https://api.cortexa.sh/v1/chat/completions \
  -H "Authorization: Bearer $CORTEXA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "cortexa",
    "messages": [
      {
        "role": "user",
        "content": "Summarize the evidence for GLP-1 agonists in neuroinflammation. Cite sources."
      }
    ]
  }'
from openai import OpenAI

client = OpenAI(
    api_key="sk-cortexa-live-...",
    base_url="https://api.cortexa.sh/v1",
)

response = client.chat.completions.create(
    model="cortexa",
    messages=[
        {
            "role": "user",
            "content": "Find recent clinical evidence for tau PET as an Alzheimer's endpoint.",
        }
    ],
)

print(response.choices[0].message.content)

Endpoint reference

Every endpoint on the v1 surface authenticates with the same bearer token and returns OpenAI-compatible error envelopes.
POST
/v1/chat/completions

OpenAI-compatible chat completion endpoint. Best for existing SDKs and server-side integrations.

POST
/v1/agents/cortexa/runs

Native streaming endpoint for text deltas, tool events, citations, and rich data cards. Attach a Library file with a `data-library-file-ref` part; a file id the key cannot reach returns 404 rather than an answer that ignores it.

GET
/v1/runs/{id}

Fetch the completed messages, tool invocations, and stream of an earlier run by ID.

GET
/v1/models

List available Cortexa models. Returns a single entry today; included for OpenAI client compatibility.

GET
/v1/tools

Inspect the verified tools the agent can route to per request.

GET
/v1/sources

Browse the curated data source catalog the agent can reach.

POST
/mcp

MCP endpoint for clients that support streamable HTTP. Desktop stdio clients use the npm adapter.

Native streaming

Native runs stream the agent surface directly: text deltas, tool invocations, source-backed citations, structures, formulas, charts, and usage summaries.
curl https://api.cortexa.sh/v1/agents/cortexa/runs \
  -H "Authorization: Bearer $CORTEXA_API_KEY" \
  -H "Content-Type: application/json" \
  -N \
  -d '{
    "input": "Compare evidence for two candidate targets and cite primary sources."
  }'

1.4K+ verified tools behind one model

Cortexa handles tool selection internally. Client applications can stay simple while still benefiting from live literature, biomedical, clinical, genomics, chemistry, structure, patent, and code-execution tools.

Authentication

Send API keys as bearer tokens:Authorization: Bearer sk-cortexa-live-.... Create and revoke keys from the API Keys dashboard.

Credit charging & HTTP 402

API calls use the same account credit pool and overage cap as work started in the Cortexa app.

Model work is charged by actual usage

Successful model-producing requests debit credits from the account that owns the API key. Token volume, agent steps, and cache reads determine the charge; endpoint request counts are analytics, not the billing unit. Tool-only requests with no model usage do not consume model credits.

402 Payment Required

Cortexa returns HTTP 402 before starting model work when included credits are exhausted with no overage, the monthly overage cap is reached, the account's email is unverified, or the account's budget cannot be safely verified. Upgrade, raise the cap, verify your email, or update payment in Billing, then retry the request with the same application-level idempotency behavior.

On this page

QuickstartEndpointsNative streamingAuthenticationCredits & HTTP 402
Cortexa.

The agent for research teams. 1.4K+ research tools across scientific and professional fields, with sources attached to the claims they support.

Product

  • Documentation
  • Integrations
  • Tool catalog
  • Security & privacy
  • Pricing

Get started

  • Start research
  • Sign in
  • Developer API
  • MCP server

Support

  • Help center
  • Contact us
  • Terms of Service
  • Privacy Policy

© 2026 Cortexa. All rights reserved.

TermsPrivacy·For research context only · Not medical, legal, or financial advice.