MISHALE
Docs

API Reference

Base URL: https://api.mishale.bio · All requests require X-API-Key: <key> except GET /v1/health.

Authentication

API keys are created via POST /v1/admin/partners or the mshale-api create-partner CLI. Keys are hashed (SHA-256) at rest. The raw key is shown exactly once at creation time.

Tier 0

Read-only corpus access

Tier 1

Corpus + AI agent

Tier 2

All above + results + active learning

Tier 3

Admin (partner management)

GET/v1/health · Tier

Full component health check. Returns status of database, model, and key services.

Response

{ "status": "healthy", "model_version": "v1.3", "n_protocols": 4218,
  "components": { "database": "healthy", "model": "healthy" } }
POST/v1/corpus/ingestPartner · Tier 1+

Ingest a ProtocolSpec into the corpus. Feature vector is computed and stored.

Request body

{ "title": "...", "domain": "crispr_ko", "steps": ["..."], ... }

Response

{ "protocol_id": "prot_abc123", "feature_dim": 200 }
GET/v1/corpus/searchPartner · Tier 0+

Vector + keyword search across the corpus.

Parameters

qquerystringSearch query string.
domainquerystringFilter by domain (optional).
limitqueryintegerMax results (default 20, max 100).

Response

{ "results": [{ "protocol_id": "...", "title": "...", "score": 0.82, ... }] }
GET/v1/corpus/protocol/{id}Partner · Tier 0+

Protocol detail: full record, SHAP attribution, similar protocols.

Response

{ "protocol": {...}, "shap": [{ "feature": "...", "value": 0.14 }], "similar": [...] }
GET/v1/corpus/comparePartner · Tier 0+

Pairwise feature comparison between two protocols.

Parameters

aquerystringProtocol ID A.
bquerystringProtocol ID B.
GET/v1/corpus/domainsPartner · Tier 0+

Domain summary: count, coverage, mean score per domain.

GET/v1/corpus/active-learningPartner · Tier 2+

Priority-ranked experiment queue. Priority = uncertainty × diversity.

Parameters

domainquerystringFilter by domain.
limitqueryintegerMax results (default 10).
POST/v1/agent/askPartner · Tier 1+

Synchronous AI agent. Returns full response after agentic tool loop (max 10 rounds).

Request body

{ "message": "Which protocols have highest KO efficiency for iPSC?", "agent_type": "protocol" }

Response

{ "response": "...", "tools_used": [...] }
POST/v1/agent/streamPartner · Tier 1+

SSE streaming agent. Response streamed as Server-Sent Events.

Request body

{ "message": "...", "agent_type": "research" }

Response

data: {"text": "Based on"}\ndata: {"text": " the corpus..."}\ndata: [DONE]
POST/v1/results/submitPartner · Tier 2+

Submit a wet-lab measurement. Triggers Welford update and optional retrain.

Request body

{ "protocol_id": "prot_abc", "measured_efficiency": 0.82, "notes": "..." }

Response

{ "retrain_triggered": true, "model_version": "v1.4", "c_index_after": 0.74 }
POST/v1/admin/partnersAdmin · Tier 3

Create a new partner account. Returns the raw API key (shown once, never stored).

Request body

{ "name": "acme-labs", "tier": 2 }

Response

{ "partner_id": "...", "api_key": "msk_..." }