Developer Documentation
API reference, integration examples, and data formats for the msq ontology and mosaeQ computation engine.
Contents
Quick Start API Endpoints Response Format Theta Extraction Ontology (RDF/Turtle) Free Tier SPARQL Queries (Planned)Quick Start
Compute a full ICH M3(R2) preclinical package from a SMILES string. One API call, approximately 100ms.
curl -X POST https://api.mosaeq.com/full-package \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"compound_smiles": "CC(=O)OC1=CC=CC=C1C(=O)O",
"computation_mode": "quantum",
"categories": ["all"]
}'API Endpoints
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
compound_smiles | string | Yes | SMILES notation |
computation_mode | string | Yes | "quantum" or "classical" |
categories | array | Yes | ["all"] or subset |
Only these three fields accepted. Extra fields cause 422 errors.
Response Format
{
"request_id": "fa4ad170-187c-...",
"compound": "CC(=O)OC1=CC=CC=C1C(=O)O",
"computation_mode": "quantum",
"total_time_ms": 106,
"total_qubits_used": 8,
"quantum_circuit": {
"num_qubits": 8,
"total_gates": 46,
"circuit_depth": 12,
"gates": [
{"gate":"Phi-RX","qubit":0,"theta":1.948},
{"gate":"Phi-RY","qubit":0,"theta":4.296},
{"gate":"Phi-RZ","qubit":0,"theta":1.607}
]
},
"category_results": [
{"category":"pharmacology","status":"completed","results":{...}},
{"category":"safety_pharm","status":"completed","results":{...}},
{"category":"adme","status":"completed","results":{...}},
{"category":"general_tox","status":"completed","results":{...}},
{"category":"genotoxicity","status":"completed","results":{...}},
{"category":"repro_tox","status":"completed","results":{...}}
]
}Theta Extraction
The theta triplet comes from the first Phi-RX, Phi-RY, Phi-RZ gates. Deterministic: same SMILES always gives same theta.
Python
import requests
resp = requests.post("https://api.mosaeq.com/full-package", json={
"compound_smiles": "CC(=O)OC1=CC=CC=C1C(=O)O",
"computation_mode": "quantum",
"categories": ["all"]
}, headers={"Authorization": "Bearer YOUR_KEY"})
data = resp.json()
gates = data["quantum_circuit"]["gates"]
rx = next(g["theta"] for g in gates if g["gate"] == "Phi-RX")
ry = next(g["theta"] for g in gates if g["gate"] == "Phi-RY")
rz = next(g["theta"] for g in gates if g["gate"] == "Phi-RZ")
print(f"Theta: ({rx}, {ry}, {rz})")Ontology (RDF/Turtle)
Available at /ontology/msq.ttl with text/turtle Content-Type and CORS enabled.
@prefix msq: <https://msq.mosaeq.com/ontology/> . @prefix msqc: <https://msq.mosaeq.com/compound/> . @prefix msqv: <https://msq.mosaeq.com/virus/> . @prefix msqp: <https://msq.mosaeq.com/protein/> . @prefix msqg4: <https://msq.mosaeq.com/g4/> .
VoID descriptor at /.well-known/void.ttl
Free Tier
Generic Drugs Always Free
WHO Essential Medicines and expired-patent generics. Standard report, full theta registration.
Emergency Pathogen Access Free During PHEIC
During WHO PHEIC or ECDC alerts, compounds targeting declared pathogens free for 90 days. Status: outbreak.mosaeq.com
SPARQL Queries (Planned)
Endpoint at msq.mosaeq.com/sparql planned.
Find theta neighbors of an orphan drug
PREFIX msq: <https://msq.mosaeq.com/ontology/>
SELECT ?neighbor ?name ?theta_rx ?theta_ry ?theta_rz
WHERE {
msqc:blarcamesine msq:theta_RX ?orx ;
msq:theta_RY ?ory ;
msq:theta_RZ ?orz .
?neighbor a msq:DrugApproved ;
rdfs:label ?name ;
msq:theta_RX ?theta_rx ;
msq:theta_RY ?theta_ry ;
msq:theta_RZ ?theta_rz .
FILTER(SQRT(
(?theta_rx-?orx)*(?theta_rx-?orx)+
(?theta_ry-?ory)*(?theta_ry-?ory)+
(?theta_rz-?orz)*(?theta_rz-?orz)
) < 0.5)
} LIMIT 10Integration Paths
| Use Case | Approach | Endpoint |
|---|---|---|
| Run computation | REST API | POST /full-package |
| Download ontology | HTTP GET | GET /ontology/msq.ttl |
| Query graph | SPARQL | msq.mosaeq.com/sparql |
| Import to triplestore | Turtle | Load msq.ttl into Jena/Oxigraph |