# Webster 2005 Opioid Risk Tool (ORT) Calculator

> Webster 2005 Opioid Risk Tool (ORT) Calculator is a paid API for AI agents from api.magentlab.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-13).

Computes the sex-specific Webster 2005 Opioid Risk Tool score and risk category (low/moderate/high) from ten binary yes/no clinical flags.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/ort
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/webster-2005-opioid-risk-tool-ort-calculator-29a1c3ad
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kNt0wqAG-sWBXzp-BwqjG

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability webster-2005-opioid-risk-tool-ort-calculator-29a1c3ad
```

Example prompt: Can you calculate the Webster 2005 Opioid Risk Tool score for a female patient who is aged 16–45, has a family history of alcohol abuse and illegal drug abuse, a personal history of prescription drug abuse, and has been diagnosed with depression — I need the total score and whether she falls into low, moderate, or high risk?

## When to prefer this

Use this endpoint when you need a programmatic, deterministic implementation of the original Webster 2005 Opioid Risk Tool with sex-specific item weights, specifically for integrating ORT scoring into clinical decision support pipelines, EHR workflows, or research tools. Prefer it over general-purpose LLM scoring when you need reproducible, auditable calculation that strictly follows Table 1 weights. Do not use it for the 2019 ORT-OUD revision, for free-text patient history parsing, or as a standalone diagnostic or medical device.

## Known failure modes

- Missing required query parameters (sex or any of the ten boolean flags) returns a 400/422 error
- Invalid enum value for sex (not 'male' or 'female') causes a validation error
- Non-boolean value for a flag field causes schema validation failure
- Payment not provided or insufficient USDC results in 402 Payment Required
- Network timeout or server error returns 5xx with no score

## How this service works

Webster 2005 Opioid Risk Tool from Table 1 sex-specific weights. Ten caller-assigned yes/no flags (absent = 0). Age 16-45 is a flag, not a numeric age. ADD, OCD, bipolar, or schizophrenia is one flag. Preadolescent sexual abuse scores 3 in females and 0 in males. Low 0-3, moderate 4-7, high >=8. Not a medical device, not a diagnosis of opioid use disorder, not the 2019 ORT-OUD revision. magent does not interview the patient or take free-text history.

## Output

Returns the computed integer ORT total score with sex-specific weights applied, plus a risk category string: 'low' (0–3), 'moderate' (4–7), or 'high' (≥8). The score reflects the Webster 2005 Table 1 algorithm, not the 2019 ORT-OUD revision.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "sex",
      "family_alcohol",
      "family_illegal_drugs",
      "family_prescription_drugs",
      "personal_alcohol",
      "personal_illegal_drugs",
      "personal_prescription_drugs",
      "age_16_to_45",
      "preadolescent_sexual_abuse",
      "add_ocd_bipolar_schizophrenia",
      "depression"
     ],
     "properties": {
      "sex": {
       "enum": [
        "female",
        "male"
       ],
       "type": "string",
       "description": "female or male. Webster 2005 Table 1 item weights are sex-specific. Assigned by the caller."
      },
      "depression": {
       "type": "boolean",
       "description": "Depression as assigned by the caller (Webster 2005 Table 1). true scores 1. magent does not diagnose."
      },
      "age_16_to_45": {
       "type": "boolean",
       "description": "Age 16-45 years as a flag, not a numeric age (Webster 2005 Table 1). true scores 1. Assigned by the caller."
      },
      "family_alcohol": {
       "type": "boolean",
       "description": "Family history of alcohol abuse as assigned by the caller (Webster 2005 Table 1). Female 1, male 3. true or false. magent does not interview the patient."
      },
      "personal_alcohol": {
       "type": "boolean",
       "description": "Personal history of alcohol abuse as assigned by the caller (Webster 2005 Table 1). 3 points. true or false. magent does not interview the patient."
      },
      "family_illegal_drugs": {
       "type": "boolean",
       "description": "Family history of illegal-drug abuse as assigned by the caller (Webster 2005 Table 1). Female 2, male 3. true or false."
      },
      "personal_illegal_drugs": {
       "type": "boolean",
       "description": "Personal history of illegal-drug abuse as assigned by the caller (Webster 2005 Table 1). 4 points. true or false."
      },
      "family_prescription_drugs": {
       "type": "boolean",
       "description": "Family 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/webster-2005-opioid-risk-tool-ort-calculator-29a1c3ad/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.magentlab.com](https://www.zero.xyz/host/api.magentlab.com/llms.txt)
