Drift API

Programmatic target identification

Submit compounds from a script or workflow, poll an asynchronous job, and retrieve FP2-ranked targets, predicted pK/Kd values, assay records, and pathway annotations.

Quick start

1. Submit. No API key is required. Send a JSON object with a required title and one to 50 SMILES compounds. The response is 202 Accepted and contains a public job ID plus polling URLs.

2. Poll. Poll the status URL every few seconds. Do not treat a transient running state as an error.

3. Retrieve. Read completed results. The public drift_score is the FP2 similarity score; target-screen predictions are returned for interpretation and do not affect ranking. Only SINGLE PROTEIN targets are returned by default; add ?target_types=all (or a comma-separated list such as SINGLE PROTEIN,ORGANISM) to include other target types.

4. Respect limits. Public calls are rate limited by client IP and active-job count. A 429 response includes Retry-After.

Submit with cURL

curl -X POST https://drift.dokhlab.org/api/v1/drift/jobs   -H 'Content-Type: application/json'   -H 'Idempotency-Key: aspirin-2026-08-19'   -d '{
    "title": "Aspirin target identification",
    "compounds": [{
      "name": "aspirin",
      "smiles": "CC(=O)Oc1ccccc1C(=O)O"
    }]
  }'

Submit and poll with Python

import time
import requests

BASE = "https://drift.dokhlab.org/api/v1"

job = requests.post(
    f"{BASE}/drift/jobs",
    headers={"Idempotency-Key": "aspirin-2026-08-19"},
    json={
        "title": "Aspirin target identification",
        "compounds": [{"smiles": "CC(=O)Oc1ccccc1C(=O)O"}],
    },
).json()

while True:
    status = requests.get(f"{BASE}{job['status_url']}").json()
    if status["status"] in {"succeeded", "failed", "cancelled"}:
        break
    time.sleep(5)

results = requests.get(f"{BASE}{job['results_url']}").json()

Results response shape

This is the response envelope verified against a completed public task. A real response may contain up to 100 targets, similar compounds, and assay records; optional values can be null.

{
  "job": {
    "job_id": "driftjob_…",
    "status": "succeeded",
    "total_compounds": 1,
    "completed_compounds": 1
  },
  "results": [
    {
      "compound_index": 0,
      "query": {
        "index": 0,
        "name": "ethanol",
        "smiles": "CCO"
      },
      "ranking": {
        "fingerprint": "FP2",
        "drift_score_semantics": "fp2_similarity",
        "target_screen_predictions_affect_ranking": false,
        "top_k": 100
      },
      "targets": [
        {
          "target_id": "CHEMBL…",
          "name": "Example target",
          "uniprot_ids": ["P00000"],
          "drift_score": 0.82,
          "similarity_score": 0.82,
          "predicted_pk": 7.4,
          "predicted_kd_nM": 40.0
        }
      ],
      "target_count": 100,
      "compound_count": 100
    }
  ],
  "result_count": 1,
  "total_compounds": 1
}

Interactive API reference

The reference below is generated from the same OpenAPI document served by the API. Try-it-out is disabled here because public calls do not require credentials.

Loading API reference…