Calc Parc
by magent in Security & trust
Kharbanda 2018 Table 3 pediatric appendicitis risk calculator (pARC): logistic probability from sex, age (5-18 years), pain duration, pain with walking, migration of pain to RLQ, maximal RLQ tenderness, abdominal guarding, and ANC (x10^3/uL; 1.77*sqrt(ANC) if <14, else constant 6.62). Returns logit and estimated_probability_percent. Not a medical device, not a diagnosis, not PAS, and not Alvarado. magent does not examine the child.
https://api.magentlab.com/api/calc/parc- Price
- $0.007
- per call in USDC
- Uptime
- 97.1%
- last 30 days
- Response time
- 214 ms
- 556 ms slowest 5%
- Last check
- Failed
- 5 h ago, next any minute now
Reliability
Latest check failed 5 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/parc
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/parc
content-type: application/json
{
"items": [
{
"abdominal_guarding": false,
"age": 15,
"anc_10e3_ul": 2,
"maximal_tenderness_rlq": false,
"pain_duration": "lt_24",
"pain_migration_rlq": false,
"pain_with_walking": false,
"sex": "female"
},
{
"abdominal_guarding": false,
"age": 15,
"anc_10e3_ul": 2,
"maximal_tenderness_rlq": false,
"pain_duration": "lt_24",
"pain_migration_rlq": false,
"pain_with_walking": false,
"sex": "female"
}
]
}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, 54 lines
{
"count": 2,
"items": [
{
"abdominal_guarding": false,
"age_years": 15,
"anc_10e3_ul": 2,
"citation": {
"authors": "Kharbanda AB, Vazquez-Benitez G, Ballard DW, et al.",
"doi": "10.1542/peds.2017-2699",
"id": "kharbanda-2018",
"pmid": "29535251",
"source": "Pediatrics. 2018;141(4):e20172699",
"title": "Development and Validation of a Novel Pediatric Appendicitis Risk Calculator (pARC)"
},
"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.",
"estimated_probability": 0.002032,
"estimated_probability_percent": 0.2,
"formula": "parc",
"formula_expression": "L = -8.7 + 1.28*male + age_sex + pain_duration + 1.05*pain_with_walking + 0.46*pain_migration_rlq + 1.14*maximal_tenderness_rlq + 0.67*abdominal_guarding + anc (Kharbanda 2018 Table 3); age 5-7.9 y 0.38; male 5-7.9 y -1.05; age 8-13.9 y -0.72 (male 8-13.9 y and female 8-11.9 y); reference = male 14-18 y and female 12-18 y; duration lt_24 0, 24_lt_48 0.47, 48_96 0.10; ANC <14 x10^3/uL: 1.77*sqrt(ANC); ANC >=14: 6.62 instead of the sqrt term; estimated_probability = 1 / (1 + exp(-L)); estimated_probability_percent = 100 * estimated_probability",
"logit": -6.1968,
"maximal_tenderness_rlq": false,
"pain_duration": "lt_24",
"pain_migration_rlq": false,
"pain_with_walking": false,
"sex": "female"
},
{
"abdominal_guarding": false,
"age_years": 15,
"anc_10e3_ul": 2,
"citation": {
"authors": "Kharbanda AB, Vazquez-Benitez G, Ballard DW, et al.",
"doi": "10.1542/peds.2017-2699",
"id": "kharbanda-2018",
"pmid": "29535251",
"source": "Pediatrics. 2018;141(4):e20172699",
"title": "Development and Validation of a Novel Pediatric Appendicitis Risk Calculator (pARC)"
},
"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.",
"estimated_probability": 0.002032,
"estimated_probability_percent": 0.2,
"formula": "parc",
"formula_expression": "L = -8.7 + 1.28*male + age_sex + pain_duration + 1.05*pain_with_walking + 0.46*pain_migration_rlq + 1.14*maximal_tenderness_rlq + 0.67*abdominal_guarding + anc (Kharbanda 2018 Table 3); age 5-7.9 y 0.38; male 5-7.9 y -1.05; age 8-13.9 y -0.72 (male 8-13.9 y and female 8-11.9 y); reference = male 14-18 y and female 12-18 y; duration lt_24 0, 24_lt_48 0.47, 48_96 0.10; ANC <14 x10^3/uL: 1.77*sqrt(ANC); ANC >=14: 6.62 instead of the sqrt term; estimated_probability = 1 / (1 + exp(-L)); estimated_probability_percent = 100 * estimated_probability",
"logit": -6.1968,
"maximal_tenderness_rlq": false,
"pain_duration": "lt_24",
"pain_migration_rlq": false,
"pain_with_walking": false,
"sex": "female"
}
],
"path": "/api/calc/parc"
}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/parc' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"abdominal_guarding":false,"age":15,"anc_10e3_ul":2,"maximal_tenderness_rlq":false,"pain_duration":"lt_24","pain_migration_rlq":false,"pain_with_walking":false,"sex":"female"},{"abdominal_guarding":false,"age":15,"anc_10e3_ul":2,"maximal_tenderness_rlq":false,"pain_duration":"lt_24","pain_migration_rlq":false,"pain_with_walking":false,"sex":"female"}]}'
# 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/parc' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"abdominal_guarding":false,"age":15,"anc_10e3_ul":2,"maximal_tenderness_rlq":false,"pain_duration":"lt_24","pain_migration_rlq":false,"pain_with_walking":false,"sex":"female"},{"abdominal_guarding":false,"age":15,"anc_10e3_ul":2,"maximal_tenderness_rlq":false,"pain_duration":"lt_24","pain_migration_rlq":false,"pain_with_walking":false,"sex":"female"}]}' \
| 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%2Fparc&method=POST
const res = await pay("https://api.magentlab.com/api/calc/parc", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"items": [
{
"abdominal_guarding": false,
"age": 15,
"anc_10e3_ul": 2,
"maximal_tenderness_rlq": false,
"pain_duration": "lt_24",
"pain_migration_rlq": false,
"pain_with_walking": false,
"sex": "female"
},
{
"abdominal_guarding": false,
"age": 15,
"anc_10e3_ul": 2,
"maximal_tenderness_rlq": false,
"pain_duration": "lt_24",
"pain_migration_rlq": false,
"pain_with_walking": false,
"sex": "female"
}
]
}),
});
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/parc",
json={
"items": [
{
"abdominal_guarding": False,
"age": 15,
"anc_10e3_ul": 2,
"maximal_tenderness_rlq": False,
"pain_duration": "lt_24",
"pain_migration_rlq": False,
"pain_with_walking": False,
"sex": "female",
},
{
"abdominal_guarding": False,
"age": 15,
"anc_10e3_ul": 2,
"maximal_tenderness_rlq": False,
"pain_duration": "lt_24",
"pain_migration_rlq": False,
"pain_with_walking": False,
"sex": "female",
},
],
},
)
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 |
|---|---|---|---|---|
| 5 h ago | Timed out | - | - | - |
| 9 h ago | Passed | 402 | 160 ms | $0.007 |
| 14 h ago | Passed | 402 | 317 ms | $0.007 |
| 19 h ago | Passed | 402 | 163 ms | $0.007 |
| 23 h ago | Passed | 402 | 380 ms | $0.007 |
Show 10 older checks
| 28 h ago | Passed | 402 | 150 ms | $0.007 |
| 32 h ago | Passed | 402 | 195 ms | $0.007 |
| 37 h ago | Passed | 402 | 160 ms | $0.007 |
| 41 h ago | Passed | 402 | 326 ms | $0.007 |
| 45 h ago | Passed | 402 | 323 ms | $0.007 |
| 2 days ago | Passed | 402 | 556 ms | $0.007 |
| 2 days ago | Passed | 402 | 341 ms | $0.007 |
| 2 days ago | Passed | 402 | 225 ms | $0.007 |
| 3 days ago | Passed | 402 | 589 ms | $0.007 |
| 3 days ago | Passed | 402 | 165 ms | $0.007 |
History
| 11 Oct 2026 | Price changed from $0.005 to $0.007 |