API Documentation

Arion BBB Prediction & Optimization API v1.0

Base URL: /api/v1
Authentication

Currently open access. API key authentication coming soon.

Rate limit: 100 requests/hour per IP.

Endpoints

POST /api/v1/predict

BBB Prediction — score 1-100 SMILES with 14 BBB signals.

Returns: ensemble probability, verdict, mechanistic breakdown, P-gp/BCRP risk, Kp,uu brain exposure, CNS MPO, BBBscore, structural alerts, nearest CNS drug.

Request:
curl -X POST /api/v1/predict \
  -H "Content-Type: application/json" \
  -d '{"smiles": ["O=C1CN=C(c2ccccc2)c2cc(Cl)ccc2N1C"]}'
Response:
{
  "results": [{
    "smiles": "CN1C(=O)CN=C(c2ccccc2)c2cc(Cl)ccc21",
    "prob_ensemble": 0.97, "verdict": "BBB+",
    "bbbscore": 5.0, "clark_penetration": "high",
    "pgp_prob": 0.62, "bcrp_prob": 0.54,
    "kpuu": {"kpuu": 0.40, "brain_class": "excellent"},
    "cns_mpo_v3": 5.17, ...
  }],
  "count": 1
}
POST /api/v1/optimize

BBB Rescue — generate BBB-penetrant analogs of any molecule using REINVENT 4 RL.

Launches a GPU job (~3-5 min). Poll status endpoint for results.

Request:
curl -X POST /api/v1/optimize \
  -H "Content-Type: application/json" \
  -d '{"smiles": "c1ccc(NC(=O)c2cccnc2)cc1"}'
Response:
{"job_id": "a1b2c3d4", "status": "running", "poll_url": "/api/v1/status/a1b2c3d4"}
GET /api/v1/status/<job_id>

Job Status — poll optimization progress and results.

curl /api/v1/status/a1b2c3d4
Response (complete):
{
  "status": "complete",
  "results": [
    {"smiles": "...", "bbb_prob": 0.82, "tanimoto": 0.45, "verdict": "BBB+", ...},
    ...
  ]
}
GET /api/v1/health

Health Check — verify API status and model versions.