Calc Duke
by magent in Other
Durack 1994 original Duke criteria for infective endocarditis. Definite if pathologic_definite or clinical_definite (2 major, or 1 major plus 3 minor, or 5 minor); else rejected if any rejected flag; else possible. Suggestive echo and suggestive micro are not double-counted with the matching major. Caller assigns flags. magent does not examine the patient, read an echocardiogram, or interpret cultures. Not Li 2000 modified Duke. Not ISCVID 2023. Not a diagnosis.
https://api.magentlab.com/api/calc/duke- Price
- $0.007
- per call in USDC
- Uptime
- 91.4%
- last 30 days
- Response time
- 238 ms
- 469 ms slowest 5%
- Last check
- Failed
- 3 h ago, next any minute now
Reliability
Latest check failed 3 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/duke
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/duke
content-type: application/json
{
"items": [
{
"major_positive_echo": true,
"major_typical_blood_culture": true,
"minor_fever": false,
"minor_immunologic_phenomena": false,
"minor_predisposition": false,
"minor_suggestive_echo": false,
"minor_suggestive_micro": false,
"minor_vascular_phenomena": false,
"pathologic_definite": false,
"rejected_firm_alternate_diagnosis": false,
"rejected_no_pathology_le_4_days_antibiotics": false,
"rejected_resolved_le_4_days_antibiotics": false
},
{
"major_positive_echo": true,
"major_typical_blood_culture": true,
"minor_fever": false,
"minor_immunologic_phenomena": false,
"minor_predisposition": false,
"minor_suggestive_echo": false,
"minor_suggestive_micro": false,
"minor_vascular_phenomena": false,
"pathologic_definite": false,
"rejected_firm_alternate_diagnosis": false,
"rejected_no_pathology_le_4_days_antibiotics": false,
"rejected_resolved_le_4_days_antibiotics": false
}
]
}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, 154 lines
{
"count": 2,
"items": [
{
"citation": {
"authors": "Durack DT, Lukes AS, Bright DK",
"doi": "10.1016/0002-9343(94)90143-0",
"id": "durack-1994",
"pmid": "8154507",
"source": "Am J Med. 1994;96(3):200-209",
"title": "New criteria for diagnosis of infective endocarditis: utilization of specific echocardiographic findings. Duke Endocarditis Service"
},
"classification": "definite",
"criteria": [
{
"factor": "pathologic_definite",
"met": false
},
{
"factor": "major_typical_blood_culture",
"met": true
},
{
"factor": "major_positive_echo",
"met": true
},
{
"factor": "minor_predisposition",
"met": false
},
{
"factor": "minor_fever",
"met": false
},
{
"factor": "minor_vascular_phenomena",
"met": false
},
{
"factor": "minor_immunologic_phenomena",
"met": false
},
{
"factor": "minor_suggestive_echo",
"met": false
},
{
"factor": "minor_suggestive_micro",
"met": false
},
{
"factor": "rejected_firm_alternate_diagnosis",
"met": false
},
{
"factor": "rejected_resolved_le_4_days_antibiotics",
"met": false
},
{
"factor": "rejected_no_pathology_le_4_days_antibiotics",
"met": false
},
{
"factor": "clinical_definite",
"met": true
},
{
"factor": "rejected",
"met": false
}
],
"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": "duke",
"formula_expression": "definite iff pathologic_definite or clinical_definite; clinical_definite iff major_count >= 2 or (major_count >= 1 and minor_count >= 3) or minor_count >= 5; else rejected if any rejected flag; else possible (Durack 1994 original Duke). minor_suggestive_echo is not counted when major_positive_echo is true; minor_suggestive_micro is not counted when major_typical_blood_culture is true. Not Li 2000. Not ISCVID 2023",
"major_count": 2,
"minor_count": 0
},
{
"citation": {
"authors": "Durack DT, Lukes AS, Bright DK",
"doi": "10.1016/0002-9343(94)90143-0",
"id": "durack-1994",
"pmid": "8154507",
"source": "Am J Med. 1994;96(3):200-209",
"title": "New criteria for diagnosis of infective endocarditis: utilization of specific echocardiographic findings. Duke Endocarditis Service"
},
"classification": "definite",
"criteria": [
{
"factor": "pathologic_definite",
"met": false
},
{
"factor": "major_typical_blood_culture",
"met": true
},
{
"factor": "major_positive_echo",
"met": true
},
{
"factor": "minor_predisposition",
"met": false
},
{
"factor": "minor_fever",
"met": false
},
{
"factor": "minor_vascular_phenomena",
"met": false
},
{
"factor": "minor_immunologic_phenomena",
"met": false
},
{
"factor": "minor_suggestive_echo",
"met": false
},
{
"factor": "minor_suggestive_micro",
"met": false
},
{
"factor": "rejected_firm_alternate_diagnosis",
"met": false
},
{
"factor": "rejected_resolved_le_4_days_antibiotics",
"met": false
},
{
"factor": "rejected_no_pathology_le_4_days_antibiotics",
"met": false
},
{
"factor": "clinical_definite",
"met": true
},
{
"factor": "rejected",
"met": false
}
],
"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": "duke",
"formula_expression": "definite iff pathologic_definite or clinical_definite; clinical_definite iff major_count >= 2 or (major_count >= 1 and minor_count >= 3) or minor_count >= 5; else rejected if any rejected flag; else possible (Durack 1994 original Duke). minor_suggestive_echo is not counted when major_positive_echo is true; minor_suggestive_micro is not counted when major_typical_blood_culture is true. Not Li 2000. Not ISCVID 2023",
"major_count": 2,
"minor_count": 0
}
],
"path": "/api/calc/duke"
}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/duke' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"major_positive_echo":true,"major_typical_blood_culture":true,"minor_fever":false,"minor_immunologic_phenomena":false,"minor_predisposition":false,"minor_suggestive_echo":false,"minor_suggestive_micro":false,"minor_vascular_phenomena":false,"pathologic_definite":false,"rejected_firm_alternate_diagnosis":false,"rejected_no_pathology_le_4_days_antibiotics":false,"rejected_resolved_le_4_days_antibiotics":false},{"major_positive_echo":true,"major_typical_blood_culture":true,"minor_fever":false,"minor_immunologic_phenomena":false,"minor_predisposition":false,"minor_suggestive_echo":false,"minor_suggestive_micro":false,"minor_vascular_phenomena":false,"pathologic_definite":false,"rejected_firm_alternate_diagnosis":false,"rejected_no_pathology_le_4_days_antibiotics":false,"rejected_resolved_le_4_days_antibiotics":false}]}'
# 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/duke' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"major_positive_echo":true,"major_typical_blood_culture":true,"minor_fever":false,"minor_immunologic_phenomena":false,"minor_predisposition":false,"minor_suggestive_echo":false,"minor_suggestive_micro":false,"minor_vascular_phenomena":false,"pathologic_definite":false,"rejected_firm_alternate_diagnosis":false,"rejected_no_pathology_le_4_days_antibiotics":false,"rejected_resolved_le_4_days_antibiotics":false},{"major_positive_echo":true,"major_typical_blood_culture":true,"minor_fever":false,"minor_immunologic_phenomena":false,"minor_predisposition":false,"minor_suggestive_echo":false,"minor_suggestive_micro":false,"minor_vascular_phenomena":false,"pathologic_definite":false,"rejected_firm_alternate_diagnosis":false,"rejected_no_pathology_le_4_days_antibiotics":false,"rejected_resolved_le_4_days_antibiotics":false}]}' \
| 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%2Fduke&method=POST
const res = await pay("https://api.magentlab.com/api/calc/duke", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"items": [
{
"major_positive_echo": true,
"major_typical_blood_culture": true,
"minor_fever": false,
"minor_immunologic_phenomena": false,
"minor_predisposition": false,
"minor_suggestive_echo": false,
"minor_suggestive_micro": false,
"minor_vascular_phenomena": false,
"pathologic_definite": false,
"rejected_firm_alternate_diagnosis": false,
"rejected_no_pathology_le_4_days_antibiotics": false,
"rejected_resolved_le_4_days_antibiotics": false
},
{
"major_positive_echo": true,
"major_typical_blood_culture": true,
"minor_fever": false,
"minor_immunologic_phenomena": false,
"minor_predisposition": false,
"minor_suggestive_echo": false,
"minor_suggestive_micro": false,
"minor_vascular_phenomena": false,
"pathologic_definite": false,
"rejected_firm_alternate_diagnosis": false,
"rejected_no_pathology_le_4_days_antibiotics": false,
"rejected_resolved_le_4_days_antibiotics": false
}
]
}),
});
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/duke",
json={
"items": [
{
"major_positive_echo": True,
"major_typical_blood_culture": True,
"minor_fever": False,
"minor_immunologic_phenomena": False,
"minor_predisposition": False,
"minor_suggestive_echo": False,
"minor_suggestive_micro": False,
"minor_vascular_phenomena": False,
"pathologic_definite": False,
"rejected_firm_alternate_diagnosis": False,
"rejected_no_pathology_le_4_days_antibiotics": False,
"rejected_resolved_le_4_days_antibiotics": False,
},
{
"major_positive_echo": True,
"major_typical_blood_culture": True,
"minor_fever": False,
"minor_immunologic_phenomena": False,
"minor_predisposition": False,
"minor_suggestive_echo": False,
"minor_suggestive_micro": False,
"minor_vascular_phenomena": False,
"pathologic_definite": False,
"rejected_firm_alternate_diagnosis": False,
"rejected_no_pathology_le_4_days_antibiotics": False,
"rejected_resolved_le_4_days_antibiotics": False,
},
],
},
)
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 |
|---|---|---|---|---|
| 3 h ago | Timed out | - | - | - |
| 8 h ago | Timed out | - | - | - |
| 13 h ago | Timed out | - | - | - |
| 18 h ago | Passed | 402 | 146 ms | $0.007 |
| 22 h ago | Passed | 402 | 410 ms | $0.007 |
Show 10 older checks
| 27 h ago | Passed | 402 | 167 ms | $0.007 |
| 32 h ago | Passed | 402 | 296 ms | $0.007 |
| 36 h ago | Passed | 402 | 288 ms | $0.007 |
| 41 h ago | Passed | 402 | 318 ms | $0.007 |
| 45 h ago | Passed | 402 | 469 ms | $0.007 |
| 2 days ago | Passed | 402 | 144 ms | $0.007 |
| 2 days ago | Passed | 402 | 448 ms | $0.007 |
| 2 days ago | Passed | 402 | 315 ms | $0.007 |
| 3 days ago | Passed | 402 | 435 ms | $0.007 |
| 3 days ago | Passed | 402 | 323 ms | $0.007 |
History
| 11 Oct 2026 | Price changed from $0.005 to $0.007 |