70trust / 100
Calc Midas
by magent in News & content
x402 APIPassing, checked 1 h ago
Stewart 1999 MIDAS from five caller-assigned 3-month day counts: missed paid work/school, work/school ≥50% reduced, missed household work, household ≥50% reduced, missed family/social/leisure. Each 0-90; total 0-450. magent does not include questions A or B and does not assign or de-duplicate days. Grades I 0-5 little/minimal, II 6-10 mild, III 11-20 moderate, IV ≥21 severe. Not a migraine diagnosis, not a triptan/prophylaxis order, not GAD-7 or PHQ-9.
POST https://api.magentlab.com/api/calc/midas
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 144 ms typical, 436 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/midas" \
-H "content-type: application/json" \
-d '{"items":[{"missed_household_days":0,"missed_social_days":0,"missed_work_days":0,"reduced_household_days":0,"reduced_work_days":0},{"missed_household_days":0,"missed_social_days":0,"missed_work_days":0,"reduced_household_days":0,"reduced_work_days":0}]}'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%2Fmidas
const res = await pay("https://api.magentlab.com/api/calc/midas", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"items":[{"missed_household_days":0,"missed_social_days":0,"missed_work_days":0,"reduced_household_days":0,"reduced_work_days":0},{"missed_household_days":0,"missed_social_days":0,"missed_work_days":0,"reduced_household_days":0,"reduced_work_days":0}]}),
});
console.log(await res.json());Example input
{
"items": [
{
"missed_household_days": 0,
"missed_social_days": 0,
"missed_work_days": 0,
"reduced_household_days": 0,
"reduced_work_days": 0
},
{
"missed_household_days": 0,
"missed_social_days": 0,
"missed_work_days": 0,
"reduced_household_days": 0,
"reduced_work_days": 0
}
]
}Example output
{
"count": 2,
"items": [
{
"citation": {
"authors": "Stewart WF, Lipton RB, Whyte J, Dowson A, Kolodner A, Liberman JN, Sawyer J",
"doi": "10.1212/wnl.53.5.988",
"id": "stewart-1999",
"pmid": "10496257",
"source": "Neurology. 1999;53(5):988-994",
"title": "An international study to assess reliability of the Migraine Disability Assessment (MIDAS) score"
},
"components": [
{
"factor": "missed_work_days",
"points": 0,
"present": true,
"value": 0
},
{
"factor": "reduced_work_days",
"points": 0,
"present": true,
"value": 0
},
{
"factor": "missed_household_days",
"points": 0,
"present": true,
"value": 0
},
{
"factor": "reduced_household_days",
"points": 0,
"present": true,
"value": 0
},
{
"factor": "missed_social_days",
"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": "midas",
"formula_expression": "MIDAS = missed_work_days + reduced_work_days + missed_household_days + reduced_household_days + missed_social_days; each caller-assigned integer 0-90 (last 3 months); max 450; magent does not include questions A or B; grades I 0-5 little/minimal, II 6-10 mild, III 11-20 moderate, IV ≥21 severe",
"max_score": 450,
"midas_grade": "I",
"score": 0
},
{
"citation": {
"authors": "Stewart WF, Lipton RB, Whyte J, Dowson A, Kolodner A, Liberman JN, Sawyer J",
"doi": "10.1212/wnl.53.5.988",
"id": "stewart-1999",
"pmid": "10496257",
"source": "Neurology. 1999;53(5):988-994",
"title": "An international study to assess reliability of the Migraine Disability Assessment (MIDAS) score"
},
"components": [
{
"factor": "missed_work_days",
"points": 0,
"present": true,
"value": 0
},
{
"factor": "reduced_work_days",
"points": 0,
"present": true,
"value": 0
},
{
"factor": "missed_household_days",
"points": 0,
"present": true,
"value": 0
},
{
"factor": "reduced_household_days",
"points": 0,
"present": true,
"value": 0
},
{
"factor": "missed_social_days",
"points": 0,
"present": true,
"value": 0
}
],
"disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed cSecurity 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 | 141 ms | $0.007 |
| 5 h ago | Passed | 402 | 148 ms | $0.007 |
| 8 h ago | Passed | 402 | 145 ms | $0.007 |
| 12 h ago | Passed | 402 | 144 ms | $0.007 |
| 15 h ago | Passed | 402 | 293 ms | $0.007 |
| 19 h ago | Passed | 402 | 134 ms | $0.007 |
| 23 h ago | Passed | 402 | 140 ms | $0.007 |
| 27 h ago | Passed | 402 | 140 ms | $0.007 |
| 30 h ago | Passed | 402 | 145 ms | $0.007 |
| 34 h ago | Passed | 402 | 142 ms | $0.007 |
| 37 h ago | Passed | 402 | 134 ms | $0.007 |
| 41 h ago | Passed | 402 | 436 ms | $0.007 |
| 46 h ago | Passed | 402 | 719 ms | $0.007 |
History
| 11 Oct 2026 | Price changed from $0.005 to $0.007 |