Edison Scientific API
Edison Scientific provides AI-powered hypothesis generation by analyzing scientific literature and research context. The integration allows you to start research queries and receive suggested hypotheses with supporting rationale.
Generate Hypothesis
POST /cloud-labs/edisonGenerate a hypothesis directly from a research query. This is a synchronous endpoint for simple queries.
Request Body
{
"query": "Novel antimicrobial peptides targeting gram-negative bacteria",
"context": "Looking for compounds that disrupt outer membrane integrity"
}Response
{
"hypothesis": {
"statement": "Peptide X disrupts the outer membrane of gram-negative bacteria",
"null_hypothesis": "Peptide X has no effect on gram-negative bacterial membranes",
"rationale": "Based on structural similarity to known membrane-active peptides..."
},
"experiment_type": "MIC_MBC_ASSAY",
"intake_draft": {
"compliance": { "bsl": "BSL1" },
"mic_mbc_assay": {
"target_organisms": ["Escherichia coli", "Pseudomonas aeruginosa"]
}
},
"sources": [
{
"title": "Antimicrobial peptides: mechanisms of action",
"doi": "10.1000/example"
}
]
}Start Edison Run
POST /cloud-labs/edison/startStart an asynchronous Edison run for complex research queries. Returns immediately with a run ID for status polling.
Request Body
{
"query": "Novel mechanisms of antibiotic resistance in hospital-acquired infections",
"job_type": "hypothesis_generation",
"experiment_type": "MIC_MBC_ASSAY"
}Parameters
| Field | Type | Required | Description |
|---|---|---|---|
query | string | Yes | The research question or area of interest |
job_type | string | No | Type of analysis: hypothesis_generation (default), literature_review |
experiment_type | string | No | Preferred experiment type for the hypothesis |
Response
{
"run_id": "edison_run_abc123",
"status": "PENDING",
"query": "Novel mechanisms of antibiotic resistance in hospital-acquired infections",
"created_at": "2026-01-27T10:00:00Z"
}Get Active Run
GET /cloud-labs/edison/activeGet the currently active Edison run for the authenticated user. Returns null if no run is active.
Response
{
"run_id": "edison_run_abc123",
"status": "RUNNING",
"query": "Novel mechanisms of antibiotic resistance",
"progress": {
"stage": "analyzing_literature",
"percentage": 45
},
"created_at": "2026-01-27T10:00:00Z"
}List Edison Runs
GET /cloud-labs/edison/runsList all Edison runs for the authenticated user.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status: PENDING, RUNNING, COMPLETED, FAILED |
limit | integer | Results per page (1-100, default 20) |
offset | integer | Pagination offset |
Response
{
"runs": [
{
"run_id": "edison_run_abc123",
"query": "Novel mechanisms of antibiotic resistance",
"status": "COMPLETED",
"experiment_type": "MIC_MBC_ASSAY",
"created_at": "2026-01-27T10:00:00Z",
"completed_at": "2026-01-27T10:05:00Z"
}
],
"total": 15,
"limit": 20,
"offset": 0
}Get Edison Run Status
GET /cloud-labs/edison/runs/{run_id}Get detailed status and results of a specific Edison run.
Response (Completed)
{
"run_id": "edison_run_abc123",
"status": "COMPLETED",
"query": "Novel mechanisms of antibiotic resistance",
"experiment_type": "MIC_MBC_ASSAY",
"result": {
"hypothesis": {
"statement": "Efflux pump inhibitors restore antibiotic sensitivity",
"null_hypothesis": "Efflux pump inhibition has no effect on antibiotic sensitivity"
},
"reasoning_trace": [
{
"step": 1,
"action": "literature_search",
"summary": "Searched for recent papers on antibiotic resistance mechanisms"
},
{
"step": 2,
"action": "analyze_findings",
"summary": "Identified efflux pumps as key resistance mechanism"
}
],
"sources": [...]
},
"created_at": "2026-01-27T10:00:00Z",
"completed_at": "2026-01-27T10:05:00Z"
}Response (Failed)
{
"run_id": "edison_run_abc123",
"status": "FAILED",
"query": "...",
"error": "Unable to find sufficient literature for the query",
"created_at": "2026-01-27T10:00:00Z"
}Update Draft Hypothesis
PATCH /cloud-labs/edison/runs/{run_id}/draftUpdate the generated hypothesis before saving to your library.
Request Body
{
"edited_hypothesis": {
"statement": "Refined hypothesis statement",
"null_hypothesis": "Updated null hypothesis"
}
}Clear Run History
POST /cloud-labs/edison/runs/clear-historyClear all Edison runs for the authenticated user.
Response
{
"deleted_count": 15
}Edison Run Status
| Status | Description |
|---|---|
PENDING | Run queued, waiting to start |
RUNNING | Analysis in progress |
COMPLETED | Results ready |
FAILED | Run encountered an error |
Workflow
- Start a run with
POST /cloud-labs/edison/start - Poll for status with
GET /cloud-labs/edison/runs/{run_id}or checkGET /cloud-labs/edison/active - Review results when status is
COMPLETED - Edit if needed with
PATCH /cloud-labs/edison/runs/{run_id}/draft - Save to library by creating a hypothesis with the Edison response
Example: Full Workflow
import requests
import time
API_URL = "https://api.litmus.science"
headers = {"Authorization": "Bearer YOUR_TOKEN"}
# Start Edison run
response = requests.post(
f"{API_URL}/cloud-labs/edison/start",
json={"query": "Novel approaches to treating antibiotic-resistant infections"},
headers=headers
)
run_id = response.json()["run_id"]
# Poll for completion
while True:
status = requests.get(
f"{API_URL}/cloud-labs/edison/runs/{run_id}",
headers=headers
).json()
if status["status"] == "COMPLETED":
break
elif status["status"] == "FAILED":
raise Exception(status["error"])
time.sleep(5)
# Save to hypothesis library
hypothesis = requests.post(
f"{API_URL}/hypotheses",
json={
"title": "Edison-generated: Antibiotic resistance",
"statement": status["result"]["hypothesis"]["statement"],
"null_hypothesis": status["result"]["hypothesis"]["null_hypothesis"],
"experiment_type": status["experiment_type"],
"edison_response": status["result"]
},
headers=headers
)