70trust / 100
Calc Dire
by magent in News & content
x402 APIPassing, checked 1 h ago
Belgrade 2006 DIRE score: Diagnosis, Intractability, and Efficacy each caller-assigned 1-3; Risk is the sum of Psychological, Chemical, Reliability, and Social support (each 1-3, so Risk 4-12). Total 7-21. Scores 14-21 are more suitable for long-term opioid maintenance; 7-13 less suitable. Caller assigns the integers. magent does not take a pain history or write an opioid prescription or taper. Not a medical device.
POST https://api.magentlab.com/api/calc/dire
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 212 ms typical, 371 ms slowest 5%
- Last check
- 1 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.magentlab.com/api/calc/dire" \
-H "content-type: application/json" \
-d '{"items":[{"chemical":1,"diagnosis":1,"efficacy":1,"intractability":1,"psychological":1,"reliability":1,"social_support":1},{"chemical":1,"diagnosis":1,"efficacy":1,"intractability":1,"psychological":1,"reliability":1,"social_support":1}]}'import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.magentlab.com%2Fapi%2Fcalc%2Fdire
const res = await pay("https://api.magentlab.com/api/calc/dire", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"items":[{"chemical":1,"diagnosis":1,"efficacy":1,"intractability":1,"psychological":1,"reliability":1,"social_support":1},{"chemical":1,"diagnosis":1,"efficacy":1,"intractability":1,"psychological":1,"reliability":1,"social_support":1}]}),
});
console.log(await res.json());Example input
{
"items": [
{
"chemical": 1,
"diagnosis": 1,
"efficacy": 1,
"intractability": 1,
"psychological": 1,
"reliability": 1,
"social_support": 1
},
{
"chemical": 1,
"diagnosis": 1,
"efficacy": 1,
"intractability": 1,
"psychological": 1,
"reliability": 1,
"social_support": 1
}
]
}Example output
{
"count": 2,
"items": [
{
"chemical": 1,
"citation": {
"authors": "Belgrade MJ, Schamber CD, Lindgren BR",
"doi": "10.1016/j.jpain.2006.03.001",
"id": "belgrade-2006",
"pmid": "16942953",
"source": "J Pain. 2006;7(9):671-681",
"title": "The DIRE score: predicting outcomes of opioid prescribing for chronic pain"
},
"components": [
{
"factor": "diagnosis",
"points": 1,
"present": true,
"value": 1
},
{
"factor": "intractability",
"points": 1,
"present": true,
"value": 1
},
{
"factor": "psychological",
"points": 1,
"present": true,
"value": 1
},
{
"factor": "chemical",
"points": 1,
"present": true,
"value": 1
},
{
"factor": "reliability",
"points": 1,
"present": true,
"value": 1
},
{
"factor": "social_support",
"points": 1,
"present": true,
"value": 1
},
{
"factor": "efficacy",
"points": 1,
"present": true,
"value": 1
}
],
"diagnosis": 1,
"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.",
"efficacy": 1,
"formula": "dire",
"formula_expression": "DIRE = diagnosis + intractability + risk + efficacy; diagnosis, intractability, and efficacy each caller-assigned 1-3; risk = psychological + chemical + reliability + social_support (each 1-3, so risk 4-12); total 7-21; Belgrade 2006; score 14-21 more suitable for long-term opioid maintenance, 7-13 less suitable",
"intractability": 1,
"max_score": 21,
"psychological": 1,
"reliability": 1,
"risk": 4,
"score": 7,
"social_support": 1,
"suitable_candidate": false
},
{
"chemical": 1,
"citation": {
"authors": "Belgrade MJ, Schamber CD, Lindgren BR",
"doi": "10.1016/j.jpain.2006.03.001",
"id": "belgrade-2006",
"pmid": "16942953",
"source": "J Pain. 2006;7(9):671-681",
"title": "The DIRE score: predicting outcomes of opioid prescribing for chronic pain"
},
"components": [
{
"factor": "diagnosis",
"points": 1,
"present": true,
"value": 1
},
{
"factor": "intractability",
"points": 1,
"present": true,
"value": 1
},
{
"factor": "psychological",
"points": 1,
"present": true,
"value": 1
},
{
"factor": "chemical",
"points": 1,
"present": true,
Security scan
- Charges more than its listed price in payment
Listed at $0.005, charges $0.007
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 1 h ago | Passed | 402 | 267 ms | $0.007 |
| 4 h ago | Passed | 402 | 151 ms | $0.007 |
| 8 h ago | Passed | 402 | 212 ms | $0.007 |
| 11 h ago | Passed | 402 | 158 ms | $0.007 |
| 15 h ago | Passed | 402 | 286 ms | $0.007 |
| 19 h ago | Passed | 402 | 143 ms | $0.007 |
| 22 h ago | Passed | 402 | 144 ms | $0.007 |
| 27 h ago | Passed | 402 | 236 ms | $0.007 |
| 30 h ago | Passed | 402 | 153 ms | $0.007 |
| 34 h ago | Passed | 402 | 290 ms | $0.007 |
| 37 h ago | Passed | 402 | 139 ms | $0.007 |
| 40 h ago | Passed | 402 | 371 ms | $0.007 |
| 46 h ago | Passed | 402 | 391 ms | $0.007 |
History
| 11 Oct 2026 | Price changed from $0.005 to $0.007 |