# COWS (Clinical Opiate Withdrawal Scale) Calculator

> COWS (Clinical Opiate Withdrawal Scale) 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-14).

Computes the Wesson 2003 Clinical Opiate Withdrawal Scale (COWS) total score and severity category from 11 caller-assigned symptom subscores

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/cows
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cows-clinical-opiate-withdrawal-scale-calculator-b77668d8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6h-8-D0Cq1r3cfxGt5cZQ

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 cows-clinical-opiate-withdrawal-scale-calculator-b77668d8
```

Example prompt: Calculate the COWS score for a patient with resting pulse rate 2 points, GI upset 1 point, sweating 2 points, tremor 1 point, restlessness 3 points, yawning 1 point, pupil size 2 points, anxiety 1 point, bone/joint aches 2 points, gooseflesh 0 points, and runny nose/tearing 1 point — what's the total score and severity?

## When to prefer this

Use this endpoint when you need a standardized, reproducible COWS total score and severity band computed from caller-observed symptom subscores according to the Wesson 2003 scale. Prefer this over manual summation to avoid arithmetic errors and to obtain a validated severity classification. Not suitable as a replacement for clinical judgment, direct patient observation, or buprenorphine induction protocols.

## Known failure modes

- Missing any of the 11 required query parameters returns an error
- Submitting out-of-range values (e.g. tremor=3 which is not valid) may return a validation error or unexpected result
- Network or payment (x402) failure results in no score returned
- All-zero inputs return a score of 0 with no-withdrawal classification

## How this service works

Wesson 2003 Clinical Opiate Withdrawal Scale (COWS). Eleven caller-assigned appendix integers (pulse 0/1/2/4, GI 0/1/2/3/5, sweating 0-4, tremor 0/1/2/4, restlessness 0/1/3/5, yawning 0/1/2/4, pupils 0/1/2/5, anxiety 0/1/2/4, aches 0/1/2/4, gooseflesh 0/3/5, rhinorrhea/tearing 0/1/4). Max 48. Severity 5-12 mild, 13-24 moderate, 25-36 moderately severe, >36 severe; 0-4 below mild (none). magent does not observe the patient. Not a buprenorphine induction protocol.

## Output

Returns the COWS total score (sum of the 11 subscores, maximum 48) and a severity classification: 0–4 = none/below mild, 5–12 = mild, 13–24 = moderate, 25–36 = moderately severe, >36 = severe. Does not include clinical recommendations or buprenorphine induction guidance.

## 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": [
      "resting_pulse_rate",
      "gi_upset",
      "sweating",
      "tremor",
      "restlessness",
      "yawning",
      "pupil_size",
      "anxiety_or_irritability",
      "bone_or_joint_aches",
      "gooseflesh_skin",
      "runny_nose_or_tearing"
     ],
     "properties": {
      "tremor": {
       "type": "integer",
       "description": "Caller-assigned Wesson 2003 tremor points (integer 0, 1, 2, or 4). magent does not observe the patient."
      },
      "yawning": {
       "type": "integer",
       "description": "Caller-assigned Wesson 2003 yawning points (integer 0, 1, 2, or 4). magent does not observe the patient."
      },
      "gi_upset": {
       "type": "integer",
       "description": "Caller-assigned Wesson 2003 GI upset points (integer 0, 1, 2, 3, or 5). magent does not observe the patient."
      },
      "sweating": {
       "type": "integer",
       "description": "Caller-assigned Wesson 2003 sweating points (integer 0, 1, 2, 3, or 4). magent does not observe the patient."
      },
      "pupil_size": {
       "type": "integer",
       "description": "Caller-assigned Wesson 2003 pupil size points (integer 0, 1, 2, or 5). magent does not observe the patient."
      },
      "restlessness": {
       "type": "integer",
       "description": "Caller-assigned Wesson 2003 restlessness points (integer 0, 1, 3, or 5). magent does not observe the patient."
      },
      "gooseflesh_skin": {
       "type": "integer",
       "description": "Caller-assigned Wesson 2003 gooseflesh skin points (integer 0, 3, or 5). magent does not observe the patient."
      },
      "resting_pulse_rate": {
       "type": "integer",
       "description": "Caller-assigned Wesson 2003 resting pulse rate points (integer 0, 1, 2, or 4). magent does not observe the patient."
      },
      "bone_or_joint_aches": {
       "type": "integer",
       "description": "Caller-assigned Wesson 2003 bone or jo
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/cows",
  "count": 2,
  "items": [
   {
    "score": 0,
    "formula": "cows",
    "citation": {
     "id": "wesson-2003",
     "doi": "10.1080/02791072.2003.10400007",
     "pmid": "12924748",
     "title": "The Clinical Opiate Withdrawal Scale (COWS)",
     "source": "J Psychoactive Drugs. 2003;35(2):253-259",
     "authors": "Wesson DR, Ling W"
    },
    "severity": "none",
    "max_score": 48,
    "components": [
     {
      "value": 0,
      "factor": "resting_pulse_rate",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "gi_upset",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "sweating",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "tremor",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "restlessness",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "yawning",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "pupil_size",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "anxiety_or_irritability",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "bone_or_joint_aches",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "gooseflesh_skin",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "runny_nose_or_tearing",
      "points": 0,
      "present": true
     }
    ],
    "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
    "formula_expression": "COWS = resting_pulse_rate + gi_upset + sweating + tremor + restlessness + yawning + pupil_size + anxiety_or_irritability + bone_or_joint_aches + gooseflesh_skin + runny_nose_or_tearing; Wesson 2003 appendix integers only; max 48"
   },
   {
    "score": 0,
    "formula": "cows",
    "citation": {
     "id": "wesson-2003",
     "doi": "10.1080/02791072.2003.10400007",
     "pmid": "12924748",
     "title": "The Clinical Opiate Withdrawal Scale (COWS)",
     "source": "J Psychoactive Drugs. 2003;35(2):253-259",
     "authors": "Wesson DR, Ling W"
    },
    "severity": "none",
    "max_score": 48,
  
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cows-clinical-opiate-withdrawal-scale-calculator-b77668d8/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)
