Calc Tokyo Cholecystitis
by magent in Other
Yokoe 2018 TG18 (=TG13) acute cholecystitis. Definite if local signs (Murphy or RUQ mass/pain/tenderness), systemic signs (fever, elevated CRP or WBC), and imaging; suspected if local and systemic without imaging; else none. Suspected/definite: Grade III if any organ dysfunction, else Grade II if any Grade II flag, else Grade I. Severity none when diagnosis is none. Not cholangitis or Alvarado/RIPASA. magent does not examine, assay, or read imaging. Not a medical device.
https://api.magentlab.com/api/calc/tokyo_cholecystitis- Price
- $0.007
- per call in USDC
- Uptime
- 100%
- last 30 days
- Response time
- 190 ms
- 494 ms slowest 5%
- Last check
- Passed
- 2 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://api.magentlab.com/api/calc/tokyo_cholecystitis
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/tokyo_cholecystitis
content-type: application/json
{
"items": [
{
"decreased_consciousness": false,
"duration_gt_72h": false,
"elevated_crp": false,
"elevated_wbc": false,
"fever": false,
"hypotension_vasopressors": false,
"imaging_findings": false,
"marked_local_inflammation": false,
"murphy": false,
"oliguria_or_creatinine_gt_2": false,
"palpable_tender_ruq_mass": false,
"pfr_lt_300": false,
"platelets_lt_100k": false,
"pt_inr_gt_1_5": false,
"ruq_mass_pain_tenderness": false,
"wbc_gt_18000": false
},
{
"decreased_consciousness": false,
"duration_gt_72h": false,
"elevated_crp": false,
"elevated_wbc": false,
"fever": false,
"hypotension_vasopressors": false,
"imaging_findings": false,
"marked_local_inflammation": false,
"murphy": false,
"oliguria_or_creatinine_gt_2": false,
"palpable_tender_ruq_mass": false,
"pfr_lt_300": false,
"platelets_lt_100k": false,
"pt_inr_gt_1_5": false,
"ruq_mass_pain_tenderness": false,
"wbc_gt_18000": 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, 200 lines
{
"count": 2,
"items": [
{
"citation": {
"authors": "Yokoe M, Hata J, Takada T, et al.",
"doi": "10.1002/jhbp.515",
"id": "yokoe-2018",
"pmid": "29032636",
"source": "J Hepatobiliary Pancreat Sci. 2018;25(1):41-54",
"title": "Tokyo Guidelines 2018: diagnostic criteria and severity grading of acute cholecystitis (with videos)."
},
"criteria": [
{
"factor": "local_signs",
"met": false
},
{
"factor": "systemic_signs",
"met": false
},
{
"factor": "imaging_findings",
"met": false
},
{
"factor": "grade_iii_any",
"met": false
},
{
"factor": "grade_ii_any",
"met": false
},
{
"factor": "murphy",
"met": false
},
{
"factor": "ruq_mass_pain_tenderness",
"met": false
},
{
"factor": "fever",
"met": false
},
{
"factor": "elevated_crp",
"met": false
},
{
"factor": "elevated_wbc",
"met": false
},
{
"factor": "hypotension_vasopressors",
"met": false
},
{
"factor": "decreased_consciousness",
"met": false
},
{
"factor": "pfr_lt_300",
"met": false
},
{
"factor": "oliguria_or_creatinine_gt_2",
"met": false
},
{
"factor": "pt_inr_gt_1_5",
"met": false
},
{
"factor": "platelets_lt_100k",
"met": false
},
{
"factor": "wbc_gt_18000",
"met": false
},
{
"factor": "palpable_tender_ruq_mass",
"met": false
},
{
"factor": "duration_gt_72h",
"met": false
},
{
"factor": "marked_local_inflammation",
"met": false
}
],
"diagnosis": "none",
"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": "tokyo_cholecystitis",
"formula_expression": "definite iff local_signs and systemic_signs and imaging_findings; suspected iff local_signs and systemic_signs without imaging_findings; else none. local_signs iff murphy or ruq_mass_pain_tenderness; systemic_signs iff fever or elevated_crp or elevated_wbc. When diagnosis is suspected or definite: grade_iii if any organ-dysfunction flag (hypotension_vasopressors, decreased_consciousness, pfr_lt_300, oliguria_or_creatinine_gt_2, pt_inr_gt_1_5, platelets_lt_100k), else grade_ii if any Grade II flag (wbc_gt_18000, palpable_tender_ruq_mass, duration_gt_72h, marked_local_inflammation), else grade_i. When diagnosis is none, severity is none (Yokoe 2018 TG18 = TG13 unmodified)",
"severity": "none"
},
{
"citation": {
"authors": "Yokoe M, Hata J, Takada T, et al.",
"doi": "10.1002/jhbp.515",
"id": "yokoe-2018",
"pmid": "29032636",
"source": "J Hepatobiliary Pancreat Sci. 2018;25(1):41-54",
"title": "Tokyo Guidelines 2018: diagnostic criteria and severity grading of acute cholecystitis (with videos)."
},
"criteria": [
{
"factor": "local_signs",
"met": false
},
{
"factor": "systemic_signs",
"met": false
},
{
"factor": "imaging_findings",
"met": false
},
{
"factor": "grade_iii_any",
"met": false
},
{
"factor": "grade_ii_any",
"met": false
},
{
"factor": "murphy",
"met": false
},
{
"factor": "ruq_mass_pain_tenderness",
"met": false
},
{
"factor": "fever",
"met": false
},
{
"factor": "elevated_crp",
"met": false
},
{
"factor": "elevated_wbc",
"met": false
},
{
"factor": "hypotension_vasopressors",
"met": false
},
{
"factor": "decreased_consciousness",
"met": false
},
{
"factor": "pfr_lt_300",
"met": false
},
{
"factor": "oliguria_or_creatinine_gt_2",
"met": false
},
{
"factor": "pt_inr_gt_1_5",
"met": false
},
{
"factor": "platelets_lt_100k",
"met": false
},
{
"factor": "wbc_gt_18000",
"met": false
},
{
"factor": "palpable_tender_ruq_mass",
"met": false
},
{
"factor": "duration_gt_72h",
"met": false
},
{
"factor": "marked_local_inflammation",
"met": false
}
],
"diagnosis": "none",
"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": "tokyo_cholecystitis",
"formula_expression": "definite iff local_signs and systemic_signs and imaging_findings; suspected iff local_signs and systemic_signs without imaging_findings; else none. local_signs iff murphy or ruq_mass_pain_tenderness; systemic_signs iff fever or elevated_crp or elevated_wbc. When diagnosis is suspected or definite: grade_iii if any organ-dysfunction flag (hypotension_vasopressors, decreased_consciousness, pfr_lt_300, oliguria_or_creatinine_gt_2, pt_inr_gt_1_5, platelets_lt_100k), else grade_ii if any Grade II flag (wbc_gt_18000, palpable_tender_ruq_mass, duration_gt_72h, marked_local_inflammation), else grade_i. When diagnosis is none, severity is none (Yokoe 2018 TG18 = TG13 unmodified)",
"severity": "none"
}
],
"path": "/api/calc/tokyo_cholecystitis"
}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/tokyo_cholecystitis' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"decreased_consciousness":false,"duration_gt_72h":false,"elevated_crp":false,"elevated_wbc":false,"fever":false,"hypotension_vasopressors":false,"imaging_findings":false,"marked_local_inflammation":false,"murphy":false,"oliguria_or_creatinine_gt_2":false,"palpable_tender_ruq_mass":false,"pfr_lt_300":false,"platelets_lt_100k":false,"pt_inr_gt_1_5":false,"ruq_mass_pain_tenderness":false,"wbc_gt_18000":false},{"decreased_consciousness":false,"duration_gt_72h":false,"elevated_crp":false,"elevated_wbc":false,"fever":false,"hypotension_vasopressors":false,"imaging_findings":false,"marked_local_inflammation":false,"murphy":false,"oliguria_or_creatinine_gt_2":false,"palpable_tender_ruq_mass":false,"pfr_lt_300":false,"platelets_lt_100k":false,"pt_inr_gt_1_5":false,"ruq_mass_pain_tenderness":false,"wbc_gt_18000":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/tokyo_cholecystitis' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"decreased_consciousness":false,"duration_gt_72h":false,"elevated_crp":false,"elevated_wbc":false,"fever":false,"hypotension_vasopressors":false,"imaging_findings":false,"marked_local_inflammation":false,"murphy":false,"oliguria_or_creatinine_gt_2":false,"palpable_tender_ruq_mass":false,"pfr_lt_300":false,"platelets_lt_100k":false,"pt_inr_gt_1_5":false,"ruq_mass_pain_tenderness":false,"wbc_gt_18000":false},{"decreased_consciousness":false,"duration_gt_72h":false,"elevated_crp":false,"elevated_wbc":false,"fever":false,"hypotension_vasopressors":false,"imaging_findings":false,"marked_local_inflammation":false,"murphy":false,"oliguria_or_creatinine_gt_2":false,"palpable_tender_ruq_mass":false,"pfr_lt_300":false,"platelets_lt_100k":false,"pt_inr_gt_1_5":false,"ruq_mass_pain_tenderness":false,"wbc_gt_18000":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%2Ftokyo_cholecystitis&method=POST
const res = await pay("https://api.magentlab.com/api/calc/tokyo_cholecystitis", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"items": [
{
"decreased_consciousness": false,
"duration_gt_72h": false,
"elevated_crp": false,
"elevated_wbc": false,
"fever": false,
"hypotension_vasopressors": false,
"imaging_findings": false,
"marked_local_inflammation": false,
"murphy": false,
"oliguria_or_creatinine_gt_2": false,
"palpable_tender_ruq_mass": false,
"pfr_lt_300": false,
"platelets_lt_100k": false,
"pt_inr_gt_1_5": false,
"ruq_mass_pain_tenderness": false,
"wbc_gt_18000": false
},
{
"decreased_consciousness": false,
"duration_gt_72h": false,
"elevated_crp": false,
"elevated_wbc": false,
"fever": false,
"hypotension_vasopressors": false,
"imaging_findings": false,
"marked_local_inflammation": false,
"murphy": false,
"oliguria_or_creatinine_gt_2": false,
"palpable_tender_ruq_mass": false,
"pfr_lt_300": false,
"platelets_lt_100k": false,
"pt_inr_gt_1_5": false,
"ruq_mass_pain_tenderness": false,
"wbc_gt_18000": 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/tokyo_cholecystitis",
json={
"items": [
{
"decreased_consciousness": False,
"duration_gt_72h": False,
"elevated_crp": False,
"elevated_wbc": False,
"fever": False,
"hypotension_vasopressors": False,
"imaging_findings": False,
"marked_local_inflammation": False,
"murphy": False,
"oliguria_or_creatinine_gt_2": False,
"palpable_tender_ruq_mass": False,
"pfr_lt_300": False,
"platelets_lt_100k": False,
"pt_inr_gt_1_5": False,
"ruq_mass_pain_tenderness": False,
"wbc_gt_18000": False,
},
{
"decreased_consciousness": False,
"duration_gt_72h": False,
"elevated_crp": False,
"elevated_wbc": False,
"fever": False,
"hypotension_vasopressors": False,
"imaging_findings": False,
"marked_local_inflammation": False,
"murphy": False,
"oliguria_or_creatinine_gt_2": False,
"palpable_tender_ruq_mass": False,
"pfr_lt_300": False,
"platelets_lt_100k": False,
"pt_inr_gt_1_5": False,
"ruq_mass_pain_tenderness": False,
"wbc_gt_18000": 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 |
|---|---|---|---|---|
| 2 h ago | Passed | 402 | 356 ms | $0.007 |
| 7 h ago | Passed | 402 | 494 ms | $0.007 |
| 12 h ago | Passed | 402 | 157 ms | $0.007 |
| 16 h ago | Passed | 402 | 152 ms | $0.007 |
| 21 h ago | Passed | 402 | 164 ms | $0.007 |
Show 10 older checks
| 25 h ago | Passed | 402 | 450 ms | $0.007 |
| 30 h ago | Passed | 402 | 464 ms | $0.007 |
| 34 h ago | Passed | 402 | 230 ms | $0.007 |
| 38 h ago | Passed | 402 | 156 ms | $0.007 |
| 42 h ago | Passed | 402 | 287 ms | $0.007 |
| 46 h ago | Passed | 402 | 216 ms | $0.007 |
| 2 days ago | Passed | 402 | 333 ms | $0.007 |
| 2 days ago | Passed | 402 | 785 ms | $0.007 |
| 2 days ago | Passed | 402 | 223 ms | $0.007 |
| 3 days ago | Passed | 402 | 165 ms | $0.007 |
History
| 11 Oct 2026 | Price changed from $0.005 to $0.007 |