MAGENT

Emergency · LIVE

CIWA-B

Sum the twenty Busto 1989 CIWA-B items (each caller-assigned integer 0-4) and return the published total (max 80). Hours of sleep and minutes to fall asleep are recorded only.

LIVE $0.005 USDC GET /api/calc/ciwa_b

Markdown: /docs/ciwa-b.md · Canonical: https://magentlab.com/docs/ciwa-b

Not a medical device. Not a diagnosis, dose, or listing recommendation.

What it computes

Sum the twenty Busto 1989 CIWA-B items (each caller-assigned integer 0-4) and return the published total (max 80). Hours of sleep and minutes to fall asleep are recorded only.

When to use

When an agent has already assigned Busto 1989 0-4 integers and needs the published CIWA-B total, not a later mild-to-very-severe band or a benzodiazepine prescription.

When not to use

  • Not a medical device and not a benzodiazepine prescription, taper, or treatment order.
  • The twenty scored items are caller-assigned Busto 1989 integers 0-4. magent does not observe the patient.
  • hours_of_sleep and minutes_to_fall_asleep are optional recorded values from that paper and are not added to the total.
  • Busto 1989 published the twenty-item 0-80 instrument. magent does not apply later 1-20 / 21-40 / 41-60 / 61-80 mild-to-very-severe manuals.
  • Not CIWA-Ar (alcohol). Not COWS (opiate).

Formula

CIWA-B = restlessness + tremor + sweating + irritability + fatigue + tension + concentration + appetite + numbness + palpitations + headache + muscle_aches + anxiety + upset + sleep_restfulness + weakness + enough_sleep + visual_disturbances + fear + worry; each caller-assigned 0-4; max 80; Busto 1989; hours_of_sleep and minutes_to_fall_asleep recorded only, not in the total; no published total-score severity bands

Citation

Title
A clinical scale to assess benzodiazepine withdrawal
Authors
Busto UE, Sykora K, Sellers EM
Source
J Clin Psychopharmacol. 1989;9(6):412-416
DOI
10.1097/00004714-198912000-00005

Worked example

All scored items 0

Given: anxiety=0appetite=0concentration=0enough_sleep=0fatigue=0fear=0headache=0irritability=0muscle_aches=0numbness=0palpitations=0restlessness=0sleep_restfulness=0sweating=0tension=0tremor=0upset=0visual_disturbances=0weakness=0worry=0

  1. restlessness, tremor, sweating, irritability, fatigue, tension, concentration, appetite, numbness, palpitations, headache, muscle_aches, anxiety, upset, sleep_restfulness, weakness, enough_sleep, visual_disturbances, fear, and worry are 0 as assigned by the caller
  2. Score = 0 (max 80). hours_of_sleep and minutes_to_fall_asleep are omitted and are not in the total.

All scored items 4

Given: anxiety=4appetite=4concentration=4enough_sleep=4fatigue=4fear=4headache=4irritability=4muscle_aches=4numbness=4palpitations=4restlessness=4sleep_restfulness=4sweating=4tension=4tremor=4upset=4visual_disturbances=4weakness=4worry=4

  1. each of the twenty Busto 1989 scored items is 4 as assigned by the caller
  2. Score = 80 (max 80). No total-score severity band.

Also searched as

  • CIWA-B
  • CIWA B
  • Clinical Institute Withdrawal Assessment Benzodiazepines
  • benzodiazepine withdrawal scale
  • Busto CIWA-B
  • CIWA-B score
  • Busto 1989

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/ciwa_b?restlessness=0&tremor=0&sweating=0&irritability=0&fatigue=0&tension=0&concentration=0&appetite=0&numbness=0&palpitations=0&headache=0&muscle_aches=0&anxiety=0&upset=0&sleep_restfulness=0&weakness=0&enough_sleep=0&visual_disturbances=0&fear=0&worry=0

Full URL: https://api.magentlab.com/api/calc/ciwa_b?restlessness=0&tremor=0&sweating=0&irritability=0&fatigue=0&tension=0&concentration=0&appetite=0&numbness=0&palpitations=0&headache=0&muscle_aches=0&anxiety=0&upset=0&sleep_restfulness=0&weakness=0&enough_sleep=0&visual_disturbances=0&fear=0&worry=0

Call

Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP 400 before any quote or charge.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/ciwa_b?restlessness=0&tremor=0&sweating=0&irritability=0&fatigue=0&tension=0&concentration=0&appetite=0&numbness=0&palpitations=0&headache=0&muscle_aches=0&anxiety=0&upset=0&sleep_restfulness=0&weakness=0&enough_sleep=0&visual_disturbances=0&fear=0&worry=0"

Parameters

Name Type Required Description
restlessness integer required Caller-assigned Busto 1989 observation of restlessness and agitation (integer 0-4). magent does not observe the patient.
tremor integer required Caller-assigned Busto 1989 tremor with arms extended and fingers apart (integer 0-4). magent does not observe the patient.
sweating integer required Caller-assigned Busto 1989 sweating, including palms (integer 0-4). magent does not observe the patient.
irritability integer required Caller-assigned Busto 1989 irritability (Do you feel irritable?; integer 0-4). magent does not observe the patient.
fatigue integer required Caller-assigned Busto 1989 fatigue (Do you feel fatigued / tired?; integer 0-4). magent does not observe the patient.
tension integer required Caller-assigned Busto 1989 tension (Do you feel tense?; integer 0-4). magent does not observe the patient.
concentration integer required Caller-assigned Busto 1989 difficulty concentrating (integer 0-4). magent does not observe the patient.
appetite integer required Caller-assigned Busto 1989 loss of appetite (integer 0-4). magent does not observe the patient.
numbness integer required Caller-assigned Busto 1989 numbness or burning in the face, hands, or feet (integer 0-4). magent does not observe the patient.
palpitations integer required Caller-assigned Busto 1989 heart racing / palpitations (integer 0-4). magent does not observe the patient.
headache integer required Caller-assigned Busto 1989 head full or achy (integer 0-4). magent does not observe the patient.
muscle_aches integer required Caller-assigned Busto 1989 muscle aches or stiffness (integer 0-4). magent does not observe the patient.
anxiety integer required Caller-assigned Busto 1989 anxious, nervous, or jittery (integer 0-4). magent does not observe the patient.
upset integer required Caller-assigned Busto 1989 upset (Do you feel upset?; integer 0-4). magent does not observe the patient.
sleep_restfulness integer required Caller-assigned Busto 1989 how restful was your sleep last night (integer 0-4). magent does not observe the patient.
weakness integer required Caller-assigned Busto 1989 weakness (Do you feel weak?; integer 0-4). magent does not observe the patient.
enough_sleep integer required Caller-assigned Busto 1989 whether you had enough sleep last night (integer 0-4). magent does not observe the patient.
visual_disturbances integer required Caller-assigned Busto 1989 visual disturbances (sensitivity to light, blurred vision; integer 0-4). magent does not observe the patient.
fear integer required Caller-assigned Busto 1989 fear (Are you fearful?; integer 0-4). magent does not observe the patient.
worry integer required Caller-assigned Busto 1989 worrying about possible misfortunes lately (integer 0-4). magent does not observe the patient.
hours_of_sleep integer optional Optional Busto 1989 recorded hours of sleep last night (integer 0-24). Not added to the CIWA-B total. magent does not observe the patient.
minutes_to_fall_asleep integer optional Optional Busto 1989 recorded minutes to fall asleep last night (integer 0-1440). Not added to the CIWA-B total. magent does not observe the patient.

Bulk (POST)

POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement.

POST /api/calc/ciwa_b Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 PREVIEW

  • 1 to 25 items. Each item uses the same keys as the GET query parameters.
  • POST of 1 item costs the same as GET. Lists longer than 25: chunk into multiple POSTs. Extra items still execute; do not pad dummy rows.
  • The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
  • HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
  • Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
  • x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.

Example request (fixture)

{
  "items": [
    {
      "anxiety": "0",
      "appetite": "0",
      "concentration": "0",
      "enough_sleep": "0",
      "fatigue": "0",
      "fear": "0",
      "headache": "0",
      "irritability": "0",
      "muscle_aches": "0",
      "numbness": "0",
      "palpitations": "0",
      "restlessness": "0",
      "sleep_restfulness": "0",
      "sweating": "0",
      "tension": "0",
      "tremor": "0",
      "upset": "0",
      "visual_disturbances": "0",
      "weakness": "0",
      "worry": "0"
    },
    {
      "anxiety": "0",
      "appetite": "0",
      "concentration": "0",
      "enough_sleep": "0",
      "fatigue": "0",
      "fear": "0",
      "headache": "0",
      "irritability": "0",
      "muscle_aches": "0",
      "numbness": "0",
      "palpitations": "0",
      "restlessness": "0",
      "sleep_restfulness": "0",
      "sweating": "0",
      "tension": "0",
      "tremor": "0",
      "upset": "0",
      "visual_disturbances": "0",
      "weakness": "0",
      "worry": "0"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "count": 2,
  "path": "/api/calc/ciwa_b",
  "items": [
    {
      "components": [
        {
          "value": 0,
          "factor": "restlessness",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "tremor",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "sweating",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "irritability",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "fatigue",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "tension",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "concentration",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "appetite",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "numbness",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "palpitations",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "headache",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "muscle_aches",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "anxiety",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "upset",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "sleep_restfulness",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "weakness",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "enough_sleep",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "visual_disturbances",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "fear",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "worry",
          "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.",
      "citation": {
        "authors": "Busto UE, Sykora K, Sellers EM",
        "doi": "10.1097/00004714-198912000-00005",
        "id": "busto-1989",
        "pmid": "2574193",
        "source": "J Clin Psychopharmacol. 1989;9(6):412-416",
        "title": "A clinical scale to assess benzodiazepine withdrawal"
      },
      "formula": "ciwa_b",
      "formula_expression": "CIWA-B = restlessness + tremor + sweating + irritability + fatigue + tension + concentration + appetite + numbness + palpitations + headache + muscle_aches + anxiety + upset + sleep_restfulness + weakness + enough_sleep + visual_disturbances + fear + worry; each caller-assigned 0-4; max 80; Busto 1989; hours_of_sleep and minutes_to_fall_asleep recorded only, not in the total; no published total-score severity bands",
      "max_score": 80,
      "score": 0
    },
    {
      "components": [
        {
          "value": 0,
          "factor": "restlessness",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "tremor",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "sweating",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "irritability",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "fatigue",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "tension",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "concentration",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "appetite",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "numbness",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "palpitations",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "headache",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "muscle_aches",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "anxiety",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "upset",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "sleep_restfulness",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "weakness",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "enough_sleep",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "visual_disturbances",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "fear",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "worry",
          "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.",
      "citation": {
        "authors": "Busto UE, Sykora K, Sellers EM",
        "doi": "10.1097/00004714-198912000-00005",
        "id": "busto-1989",
        "pmid": "2574193",
        "source": "J Clin Psychopharmacol. 1989;9(6):412-416",
        "title": "A clinical scale to assess benzodiazepine withdrawal"
      },
      "formula": "ciwa_b",
      "formula_expression": "CIWA-B = restlessness + tremor + sweating + irritability + fatigue + tension + concentration + appetite + numbness + palpitations + headache + muscle_aches + anxiety + upset + sleep_restfulness + weakness + enough_sleep + visual_disturbances + fear + worry; each caller-assigned 0-4; max 80; Busto 1989; hours_of_sleep and minutes_to_fall_asleep recorded only, not in the total; no published total-score severity bands",
      "max_score": 80,
      "score": 0
    }
  ]
}

Response

Field Type Description
formula string ciwa_b
formula_expression string Exact expression used
score integer Busto 1989 CIWA-B sum of twenty caller-assigned 0-4 items (0-80)
max_score integer Always 80
components array Per-item caller-assigned points
hours_of_sleep integer Optional recorded hours of sleep last night; not in the total
minutes_to_fall_asleep integer Optional recorded minutes to fall asleep last night; not in the total
citation object Busto et al. J Clin Psychopharmacol 1989 citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "components": [
    {
      "value": 0,
      "factor": "restlessness",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "tremor",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "sweating",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "irritability",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "fatigue",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "tension",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "concentration",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "appetite",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "numbness",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "palpitations",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "headache",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "muscle_aches",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "anxiety",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "upset",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "sleep_restfulness",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "weakness",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "enough_sleep",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "visual_disturbances",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "fear",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "worry",
      "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.",
  "citation": {
    "authors": "Busto UE, Sykora K, Sellers EM",
    "doi": "10.1097/00004714-198912000-00005",
    "id": "busto-1989",
    "pmid": "2574193",
    "source": "J Clin Psychopharmacol. 1989;9(6):412-416",
    "title": "A clinical scale to assess benzodiazepine withdrawal"
  },
  "formula": "ciwa_b",
  "formula_expression": "CIWA-B = restlessness + tremor + sweating + irritability + fatigue + tension + concentration + appetite + numbness + palpitations + headache + muscle_aches + anxiety + upset + sleep_restfulness + weakness + enough_sleep + visual_disturbances + fear + worry; each caller-assigned 0-4; max 80; Busto 1989; hours_of_sleep and minutes_to_fall_asleep recorded only, not in the total; no published total-score severity bands",
  "max_score": 80,
  "score": 0
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_ciwa_b CIWA-B needs the twenty Busto 1989 0-4 items (not a benzodiazepine prescription). Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.

Related tools

  • CIWA-Ar — Sum the ten Sullivan 1989 CIWA-Ar items (nine caller-assigned 0-7 plus orientation 0-4) and return the published total (max 67).
  • COWS — Sum the eleven Wesson 2003 Clinical Opiate Withdrawal Scale (COWS) items from caller-assigned appendix integers and return the published total (max 48) with the published severity cutoffs.

Payment

Unpaid requests return HTTP 402 even if query parameters or POST items are missing or invalid, so CDP and agents can index the path. After a PAYMENT-SIGNATURE, invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments. Stdio MCP: /docs/mcp.

Guarantees

  • HTTP 402 is unpaid, including a missing query. After PAYMENT-SIGNATURE, invalid parameters return HTTP 400 before settlement. You are not charged. HTTP 402 never includes the tool JSON.
  • exact: settlement finishes before the tool (paymentFlow upfront). batch-settlement: verify/deposit before the tool; chargedCumulativeAmount commits after HTTP 2xx. Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
  • HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
  • Execution is timeout-bounded and concurrency-capped.
  • Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query.