Evidara API v2

The Pharmaceutical
Evidence API

Query 16 biomedical databases and 30+ AI agents with one API call. Evidence synthesis, repurposing intelligence, and payer analytics — as infrastructure.

16 Live databases
30+ Specialized agents
<90s Full chain synthesis
REST Streaming + sync API
Quick start
# Evidence synthesis — streaming response
curl -X POST \
  https://evidence-os-production.up.railway.app/orchestrate/stream \
  -H "X-Evidara-Key: evd_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "semaglutide obesity evidence",
    "chain_override": "D"
  }'

# Stream events arrive as NDJSON
{"event":"run_start","run_id":"abc123"...}
{"event":"agent_start","agent_id":"AGENT_01_RWE"...}
{"event":"agent_done","residual_risk":"LOW"...}
{"event":"complete","status":"PROVISIONAL"...}
What you can build

Four things engineers build
with this API every week.

All outputs are associative — Evidara surfaces correlations and patterns from biomedical evidence. Never causal inference.

Repurposing Intelligence

Find repurposing opportunities for approved compounds

Query ChEMBL, OpenTargets, and clinical trial data to identify indication signals beyond the approved label. Returns ranked candidate indications with supporting evidence quality scores.

Chain chain_override: "R" · AGENT_18_REPURPOSING_STRATEGIST
Payer Value Dossier

Generate a payer value dossier in 20 minutes

Orchestrate the full payer intelligence chain — comparator landscape, HTA precedents, health economics — into a structured brief ready for market access submissions.

Chain chain_override: "P" · 5-phase deterministic scan → /export/dossier/pdf/{run_id}
Pharmacovigilance

Surface safety signals before your PV team does

AGENT_01_RWE synthesizes FDA FAERS, published literature, and trial safety data into a structured safety profile with residual risk level and human review flags — before the signal reaches the quarterly review.

Chain chain_override: "C" · safety_veto_events surfaced
Regulatory

Build a regulatory benefit-risk framework from evidence

Run Chain Reg to generate a structured benefit-risk assessment across genomics, literature, RWE, and regulatory precedent. AGENT_23 returns a 21 CFR Part 11-compatible audit artifact.

Chain chain_override: "Reg" · AGENT_22 + AGENT_23
Quick start

From zero to first call
in three steps.

01

Create an account and get your API key

Sign up at /login. A trial API key is provisioned automatically. Keys are prefixed evd_live_ and sent via email. Manage keys at /keys after login.

# Keys are scoped per organization and rotatable
GET https://evidence-os-production.up.railway.app/keys
Authorization: Bearer <your_jwt_token>

# Response
{
  "keys": [{"id": "key_abc", "name": "default",
            "prefix": "evd_live_••••••••", "tier": "free",
            "scopes": ["read", "write"],
            "monthly_limit": 5, "queries_used": 0}]
}

Trial: 5 Full Evidence Reviews over 7 days, unlimited Evidence Scans. No credit card required. (tier is the API's internal value — free maps to the Trial plan.)

02

Make your first evidence synthesis call

Pass your query and chain type. Use chain_override: "D" for full discovery, or omit for auto-routing based on query content.

curl -X POST \
  https://evidence-os-production.up.railway.app/orchestrate \
  -H "X-Evidara-Key: evd_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"query": "pembrolizumab NSCLC safety profile",
      "chain_override": "C"}'

# Response (synchronous, full synthesis)
{
  "run_id": "f47ac10b-...",
  "status": "PROVISIONAL",
  "residual_risk_summary": {"risk_level": "MODERATE"},
  "human_review_required": false,
  "chain_used": "C",
  "agents_invoked": ["AGENT_01_RWE", "AGENT_06_LITERATURE_SYNTHESISER"],
  "agent_count": 2,
  "conflict_events": [],
  "safety_veto_events": []
}
03

Stream results in real time

The /orchestrate/stream endpoint emits NDJSON events as each agent completes. Use this for UIs or pipelines that need per-agent output.

# Python — streaming with httpx
import httpx, json

with httpx.stream("POST",
    "https://evidence-os-production.up.railway.app/orchestrate/stream",
    headers={"X-Evidara-Key": "evd_live_your_key"},
    json={"query": "venetoclax CLL tumor lysis syndrome risk",
          "chain_override": "C"},
    timeout=120) as r:
  for line in r.iter_lines():
    if line:
      evt = json.loads(line)
      if evt["event"] == "safety_veto":
        print(f"⚠ Safety veto: {evt['risk_level']}")
      if evt["event"] == "complete":
        print(f"Done — run_id: {evt['run_id']}")

See the streaming event reference below for a full list of event types.

API Reference

Endpoints

Authentication

All API requests require an API key passed via the X-Evidara-Key header. Authenticated browser sessions may also use a Bearer JWT token in the Authorization header.

API key (server-to-server)
X-Evidara-Key: evd_live_••••••••••••••••
JWT (browser / user session)
Authorization: Bearer <supabase_access_token>

API keys are scoped per organization. Manage keys at POST /keys (create) and DELETE /keys/{id} (revoke). Keys include a scopes array — ensure your key includes "write" for synthesis endpoints.


POST /orchestrate/stream

Evidence synthesis — streaming

Runs an agent chain and streams NDJSON events as each agent completes. This is the primary endpoint for building UIs and real-time pipelines. Each event line is a self-contained JSON object.

ParameterTypeDescription
queryrequiredstringFree-text pharmaceutical query. The platform performs PHI scanning before processing — queries containing 18 HIPAA identifiers are rejected.
chain_overrideoptionalstringForce a specific chain. All fourteen: A (literature review + safety) B (trials) C (safety) D (full discovery) E (client intake) R (repurposing) P (payer) Reg (regulatory) SLR (systematic review) HEOR (health economics) CI (competitive intelligence) Scope (scoping review) Umbrella (umbrella review) MSL (medical affairs brief). Omit for auto-routing. Note SLR may resolve to the deterministic SLR-W scanner, in which case chain_used is returned as SLR-W.
epi_contextoptionalobjectPre-fetched EPI Engine context to inject. Omit to auto-fetch.
Streaming event types
run_start
Pipeline started. Contains run_id (UUID). The chain is announced separately — see chain_selected below.
plan_selected
Routing decision. Contains chain, chain_name, and agents.
chain_selected
Emitted alongside plan_selected, carrying the same agents array — the authoritative list of steps this run will actually execute. Render from this rather than from a hardcoded map: several chains run deterministic pipelines whose real phase ids bear no relation to their historical agent lists.
agent_start
An agent or phase began executing. Contains agent_id, step, total. Not emitted by every chain — deterministic scanners may report only chain_selected and complete.
agent_done
Agent completed. Contains agent_id, residual_risk, source_provenance (list).
safety_veto
AGENT_01_RWE flagged HIGH or UNRESOLVED risk. All downstream agents receive this in context. Contains risk_level, reason.
contradiction
A cross-agent or cross-run contradiction was detected. Contains count, severity.
agent_error
A single agent failed; the run may continue. Contains agent_id and error.
warning
Non-fatal notice. Contains message.
complete
Terminal event. Contains the full result object — run_id, status, residual_risk_summary, human_review_required, llm_used, api_cost. A failed run also arrives here, as complete with result.status == "ERROR" — there is no error event. Check result.error_message first and fall back to result.error, which may carry a machine code rather than readable text.
blocked
Request rejected (PHI detected or budget exceeded). Stream ends here. Contains reason and regulation citation.

POST /orchestrate

Evidence synthesis — synchronous

Synchronous variant. Waits for full chain completion and returns a single JSON result. Use for batch pipelines where streaming is inconvenient. Same parameters as the streaming endpoint.

Response schema
{
  "run_id":             "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "status":             "PROVISIONAL" | "NEEDS_HUMAN_REVIEW",
  "chain_used":         "D",
  "agents_invoked":     ["AGENT_03_GENOMICS_TARGET_VALIDATOR", ...],
  "agent_count":        6,
  "llm_used":           true,
  "api_cost":           "$0.0157",     // string, not a number. May be absent.
  "residual_risk_summary": {"risk_level": "MODERATE"},
  "human_review_required": false,
  "conflict_events":    [],
  "safety_veto_events": [],
  "WALL_BREACH_LOG":    "NONE",
  "raw_inbox_ids":      ["uuid-a", "uuid-b", ...],
  "started_at":         "2026-04-27T12:00:00Z",
  "completed_at":       "2026-04-27T12:01:23Z"
}

Cost fields. api_cost is a string such as "$0.0157", not a number, and it may be absent — treat a missing value as unknown rather than zero. llm_used tells you whether the run actually invoked a model: several chains run deterministic pipelines that still make a small model call, so do not infer cost from the chain name.

This endpoint substitutes SLR-W for Chain SLR. Sending chain_override: "SLR" here runs the deterministic SLR-W scanner instead of the full systematic review, and the response says so: chain_used comes back as "SLR-W", never "SLR". Request the LLM-synthesized Chain SLR via /orchestrate/stream. Note SLR-W still makes a small model call — check llm_used rather than assuming a deterministic path is free.

Repeated SLR-W queries may be served from cache. An identical drug + indication query within 7 days can reuse the earlier run's result rather than re-querying the sources. This is disclosed, never hidden: the response carries from_cache: true and cache_age_h (age in hours) so you can tell a reused result from a fresh retrieval. The cache is in-memory and resets on deploy, so reuse is best-effort — do not depend on it for idempotency, and do not assume a repeated query was necessarily re-retrieved.

Detailed agent outputs (full reasoning text, evidence quality labels, source citations) are written to the audit trail (raw.inbox) and accessible via the Research Console. The raw_inbox_ids array links this run to its audit records.


POST /orchestrate via chain_override: "R"

Repurposing intelligence

Chain R runs AGENT_18_REPURPOSING_STRATEGIST against ChEMBL, OpenTargets, and ClinicalTrials.gov to identify candidate indications beyond the approved label. Returns associative signals — not clinical recommendations.

Example — compound-to-indications
curl -X POST \
  https://evidence-os-production.up.railway.app/orchestrate \
  -H "X-Evidara-Key: evd_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "repurposing opportunities: metformin beyond type 2 diabetes",
    "chain_override": "R"
  }'

The repurposing engine pre-fetches compound profiles from ChEMBL and indication-association scores from OpenTargets before invoking AGENT_18. All findings are labeled with evidence quality and include residual risk assessment.

Dedicated routes also exist and are separate from the chain above: POST /repurposing/compound, POST /repurposing/indication, GET /repurposing/gaps and GET /repurposing/opportunities. All four require authentication.


GET /health

Platform status

Returns platform operational status, compliance posture, and PHI scanner state. No authentication required. Use for health checks in your integration.

curl https://evidence-os-production.up.railway.app/health

{
  "status":  "ok",
  "system":  "EvidenceOS",
  "compliance": {
    "hipaa":       true,
    "gdpr":        true,
    "eu_ai_act":   "high_risk_mitigated",
    "phi_scanner": "active",
    "audit_trail": "append_only"
  }
}

POST /export/dossier/{format}/{run_id}

Export — PDF / PowerPoint dossier

Generates a formatted PDF or PowerPoint dossier from a completed run. The format and the run id are both path segments — there is no request body. Three routes exist:

RouteReturns
POST /export/dossier/pdf/{run_id}application/pdf
POST /export/dossier/pptx/{run_id}application/vnd.openxmlformats-officedocument.presentationml.presentation
GET /export/dossier/{run_id}Dossier payload as JSON
curl -X POST \
  https://evidence-os-production.up.railway.app/export/dossier/pdf/f47ac10b-... \
  -H "X-Evidara-Key: evd_live_your_key" \
  --output evidence_dossier.pdf

The two POST routes return a binary body; the GET route returns JSON. Pass the run_id from a prior /orchestrate response. Export is tier-gated — see Rate limits below.


Rate limits

Rate limits are applied per API key. Query quotas use a rolling 30-day window measured from each request backwards — they do not reset on a calendar boundary, so there is no monthly reset date to plan around. The per-minute limit uses a sliding window (resets on process restart for in-memory enforcement).

PlanFull Evidence ReviewsEvidence ScansRequests / minute
Trial 5 (7 days) unlimited 60
Starter 25 / mo unlimited 60
Professional 100 / mo unlimited 60
Team 500 / mo unlimited 60
Enterprise unlimited unlimited Custom

When a metered limit is reached, the API returns HTTP 429 with queries_used, monthly_limit, current_tier and an upgrade_url in the body. Upgrade at /login → Billing.

Platform Pricing

Simple monthly plans.

Every plan includes all 16 databases, 30+ agents, unlimited Evidence Scans and full API access. Plans differ by monthly Full Evidence Reviews and users. Billed monthly.

Trial
$0/ 7 days
1 user · no credit card
  • 5 Full Evidence Reviews
  • Unlimited Evidence Scans
  • Every workflow included
  • Full audit trail
Start 7-day trial →
Starter
$99/ mo
1 user
  • 25 Full Evidence Reviews / mo
  • Unlimited Evidence Scans
  • Every workflow included
  • Full audit trail
Start 7-day trial →
Team
$999/ mo
10 users
  • 500 Full Evidence Reviews / mo
  • Unlimited Evidence Scans
  • Every workflow included
  • Full audit trail
Start 7-day trial →
Enterprise
Custom
Custom number of users
  • Unlimited Full Evidence Reviews
  • Unlimited Evidence Scans
  • SSO & BAA available
  • Dedicated onboarding & support
Talk to sales →

API access is included in every plan — the same metered Full Evidence Reviews and unlimited Evidence Scans apply whether a run starts in the console or over the API. Building a product on Evidara? Contact celldna1@gmail.com

Start building today.
7-day trial, no credit card.

No sales call required. A trial API key provisions automatically when you create an account.