Calc Ciwa B
by magent in Other
Busto 1989 CIWA-B: twenty caller-assigned 0-4 items summed (max 80). Optional hours of sleep and minutes to fall asleep are recorded only and are not in the total. magent does not observe the patient and does not apply later mild-to-very-severe manuals. Not a benzodiazepine prescription and not a medical device.
https://api.magentlab.com/api/calc/ciwa_b- Price
- $0.007
- per call in USDC
- Uptime
- 89.2%
- last 30 days
- Response time
- 245 ms
- 837 ms slowest 5%
- Last check
- Failed
- 2 h ago, next any minute now
Reliability
Latest check failed 2 h ago: Timed out
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://api.magentlab.com/api/calc/ciwa_b
Each call costs $0.007 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
POST https://api.magentlab.com/api/calc/ciwa_b
content-type: application/json
{
"items": [
{
"anxiety": 0,
"appetite": 0,
"concentration": 0,
"enough_sleep": 0,
"fatigue": 0,
"fear": 0,
"headache": 0,
"hours_of_sleep": 8,
"irritability": 0,
"minutes_to_fall_asleep": 15,
"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,
"hours_of_sleep": 8,
"irritability": 0,
"minutes_to_fall_asleep": 15,
"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
}
]
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
items | array of object | Yes |
Example response
The provider's example. We can't check it without paying.
Example response, 280 lines
{
"count": 2,
"items": [
{
"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"
},
"components": [
{
"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,
"value": 0
}
],
"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": "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
},
{
"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"
},
"components": [
{
"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,
"value": 0
}
],
"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": "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
}
],
"path": "/api/calc/ciwa_b"
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.007.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://api.magentlab.com/api/calc/ciwa_b' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"anxiety":0,"appetite":0,"concentration":0,"enough_sleep":0,"fatigue":0,"fear":0,"headache":0,"hours_of_sleep":8,"irritability":0,"minutes_to_fall_asleep":15,"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,"hours_of_sleep":8,"irritability":0,"minutes_to_fall_asleep":15,"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}]}'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://api.magentlab.com/api/calc/ciwa_b' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"anxiety":0,"appetite":0,"concentration":0,"enough_sleep":0,"fatigue":0,"fear":0,"headache":0,"hours_of_sleep":8,"irritability":0,"minutes_to_fall_asleep":15,"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,"hours_of_sleep":8,"irritability":0,"minutes_to_fall_asleep":15,"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}]}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.007 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.007" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.007 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.magentlab.com%2Fapi%2Fcalc%2Fciwa_b&method=POST
const res = await pay("https://api.magentlab.com/api/calc/ciwa_b", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"items": [
{
"anxiety": 0,
"appetite": 0,
"concentration": 0,
"enough_sleep": 0,
"fatigue": 0,
"fear": 0,
"headache": 0,
"hours_of_sleep": 8,
"irritability": 0,
"minutes_to_fall_asleep": 15,
"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,
"hours_of_sleep": 8,
"irritability": 0,
"minutes_to_fall_asleep": 15,
"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
}
]
}),
});
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.007 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.007"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://api.magentlab.com/api/calc/ciwa_b",
json={
"items": [
{
"anxiety": 0,
"appetite": 0,
"concentration": 0,
"enough_sleep": 0,
"fatigue": 0,
"fear": 0,
"headache": 0,
"hours_of_sleep": 8,
"irritability": 0,
"minutes_to_fall_asleep": 15,
"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,
"hours_of_sleep": 8,
"irritability": 0,
"minutes_to_fall_asleep": 15,
"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,
},
],
},
)
print(res.status_code, res.text)Security scan
1 finding
- Charges more than its listed price in payment
Listed at $0.005, charges $0.007
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 2 h ago | Timed out | - | - | - |
| 7 h ago | Timed out | - | - | - |
| 11 h ago | Timed out | - | - | - |
| 16 h ago | Passed | 402 | 332 ms | $0.007 |
| 21 h ago | Passed | 402 | 325 ms | $0.007 |
Show 10 older checks
| 26 h ago | Timed out | - | - | - |
| 30 h ago | Passed | 402 | 339 ms | $0.007 |
| 35 h ago | Passed | 402 | 470 ms | $0.007 |
| 40 h ago | Passed | 402 | 167 ms | $0.007 |
| 44 h ago | Passed | 402 | 170 ms | $0.007 |
| 2 days ago | Passed | 402 | 159 ms | $0.007 |
| 2 days ago | Passed | 402 | 421 ms | $0.007 |
| 2 days ago | Passed | 402 | 2.8 s | $0.007 |
| 3 days ago | Passed | 402 | 373 ms | $0.007 |
| 3 days ago | Passed | 402 | 355 ms | $0.007 |
History
| 11 Oct 2026 | Price changed from $0.005 to $0.007 |