Developer Portal
Python Examples
A single-endpoint prediction and a full integrated assessment, matching the current deployed API contract exactly (field names verified against the backend source, not guessed).
import requests
BASE_URL = "https://api.bionexusdiscovery.com"
# Single-endpoint prediction
resp = requests.post(f"{BASE_URL}/predict", json={
"smiles": "CC(=O)Nc1ccc(O)cc1",
"endpoint": "hepatotox",
})
print(resp.json())
# Full integrated assessment
resp = requests.post(f"{BASE_URL}/predict/integrated", json={
"smiles": "CC(=O)Nc1ccc(O)cc1",
"include_interpretation": True,
"top_k": 8,
})
result = resp.json()
print(result["integrated_assessment"]["overall_risk_level"])
print(result["integrated_assessment"]["overall_risk_score"])
# NOTE: the key is "integrated_assessment", not "integrated_risk" — and
# "interpretations" (plural) is a sibling of "predictions", not nested
# inside each prediction. Easy to get wrong by guessing at the shape.