Calc Chip
by magent in Other
Smits 2007 CHIP rule (adults ≥16, GCS 13-15). CT if ≥1 major (pedestrian/cyclist vs vehicle, ejected, vomiting, PTA ≥4 h, skull-fracture signs, GCS <15, GCS drop ≥2 at 1 h, anticoagulants, posttraumatic seizure, age ≥60) or ≥2 minor (fall from elevation, persistent anterograde amnesia, PTA 2 to <4 h, skull contusion, neurologic deficit, LOC, GCS drop of 1 at 1 h, age 40-60). Not a diagnosis; not Canadian CT Head, NEXUS, PECARN, or 2022 CHIP. magent does not examine the patient.
https://api.magentlab.com/api/calc/chip- Price
- $0.007
- per call in USDC
- Uptime
- 91.3%
- last 30 days
- Response time
- 299 ms
- 506 ms slowest 5%
- Last check
- Failed
- 7 h ago, next any minute now
Reliability
Latest check failed 7 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/chip
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/chip
content-type: application/json
{
"items": [
{
"age": 30,
"anticoagulant_therapy": false,
"clinical_signs_skull_fracture": false,
"ejected_from_vehicle": false,
"fall_from_any_elevation": false,
"gcs": 15,
"gcs_deterioration_1": false,
"gcs_deterioration_ge_2": false,
"loss_of_consciousness": false,
"neurologic_deficit": false,
"pedestrian_or_cyclist_vs_vehicle": false,
"persistent_anterograde_amnesia": false,
"posttraumatic_seizure": false,
"pta_2_to_lt_4h": false,
"pta_ge_4h": false,
"skull_contusion": false,
"vomiting": false
},
{
"age": 30,
"anticoagulant_therapy": false,
"clinical_signs_skull_fracture": false,
"ejected_from_vehicle": false,
"fall_from_any_elevation": false,
"gcs": 15,
"gcs_deterioration_1": false,
"gcs_deterioration_ge_2": false,
"loss_of_consciousness": false,
"neurologic_deficit": false,
"pedestrian_or_cyclist_vs_vehicle": false,
"persistent_anterograde_amnesia": false,
"posttraumatic_seizure": false,
"pta_2_to_lt_4h": false,
"pta_ge_4h": false,
"skull_contusion": false,
"vomiting": 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, 196 lines
{
"count": 2,
"items": [
{
"age_years": 30,
"citation": {
"authors": "Smits M, Dippel DW, Steyerberg EW, et al.",
"doi": "10.7326/0003-4819-146-6-200703200-00004",
"id": "smits-2007",
"pmid": "17371884",
"source": "Ann Intern Med. 2007;146(6):397-405",
"title": "Predicting intracranial traumatic findings on computed tomography in patients with minor head injury: the CHIP prediction rule"
},
"criteria": [
{
"factor": "pedestrian_or_cyclist_vs_vehicle",
"met": false
},
{
"factor": "ejected_from_vehicle",
"met": false
},
{
"factor": "vomiting",
"met": false
},
{
"factor": "pta_ge_4h",
"met": false
},
{
"factor": "clinical_signs_skull_fracture",
"met": false
},
{
"factor": "gcs_lt_15",
"met": false,
"value": 15
},
{
"factor": "gcs_deterioration_ge_2",
"met": false
},
{
"factor": "anticoagulant_therapy",
"met": false
},
{
"factor": "posttraumatic_seizure",
"met": false
},
{
"factor": "age_ge_60",
"met": false,
"value": 30
},
{
"factor": "fall_from_any_elevation",
"met": false
},
{
"factor": "persistent_anterograde_amnesia",
"met": false
},
{
"factor": "pta_2_to_lt_4h",
"met": false
},
{
"factor": "skull_contusion",
"met": false
},
{
"factor": "neurologic_deficit",
"met": false
},
{
"factor": "loss_of_consciousness",
"met": false
},
{
"factor": "gcs_deterioration_1",
"met": false
},
{
"factor": "age_40_to_60",
"met": false,
"value": 30
}
],
"ct_indicated": 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": "chip",
"formula_expression": "ct indicated if ≥1 major (pedestrian_or_cyclist_vs_vehicle, ejected_from_vehicle, vomiting, pta_ge_4h, clinical_signs_skull_fracture, gcs < 15, gcs_deterioration_ge_2, anticoagulant_therapy, posttraumatic_seizure, age ≥ 60) or ≥2 minor (fall_from_any_elevation, persistent_anterograde_amnesia, pta_2_to_lt_4h, skull_contusion, neurologic_deficit, loss_of_consciousness, gcs_deterioration_1, age 40-60)",
"gcs": 15,
"major_count": 0,
"minor_count": 0
},
{
"age_years": 30,
"citation": {
"authors": "Smits M, Dippel DW, Steyerberg EW, et al.",
"doi": "10.7326/0003-4819-146-6-200703200-00004",
"id": "smits-2007",
"pmid": "17371884",
"source": "Ann Intern Med. 2007;146(6):397-405",
"title": "Predicting intracranial traumatic findings on computed tomography in patients with minor head injury: the CHIP prediction rule"
},
"criteria": [
{
"factor": "pedestrian_or_cyclist_vs_vehicle",
"met": false
},
{
"factor": "ejected_from_vehicle",
"met": false
},
{
"factor": "vomiting",
"met": false
},
{
"factor": "pta_ge_4h",
"met": false
},
{
"factor": "clinical_signs_skull_fracture",
"met": false
},
{
"factor": "gcs_lt_15",
"met": false,
"value": 15
},
{
"factor": "gcs_deterioration_ge_2",
"met": false
},
{
"factor": "anticoagulant_therapy",
"met": false
},
{
"factor": "posttraumatic_seizure",
"met": false
},
{
"factor": "age_ge_60",
"met": false,
"value": 30
},
{
"factor": "fall_from_any_elevation",
"met": false
},
{
"factor": "persistent_anterograde_amnesia",
"met": false
},
{
"factor": "pta_2_to_lt_4h",
"met": false
},
{
"factor": "skull_contusion",
"met": false
},
{
"factor": "neurologic_deficit",
"met": false
},
{
"factor": "loss_of_consciousness",
"met": false
},
{
"factor": "gcs_deterioration_1",
"met": false
},
{
"factor": "age_40_to_60",
"met": false,
"value": 30
}
],
"ct_indicated": 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": "chip",
"formula_expression": "ct indicated if ≥1 major (pedestrian_or_cyclist_vs_vehicle, ejected_from_vehicle, vomiting, pta_ge_4h, clinical_signs_skull_fracture, gcs < 15, gcs_deterioration_ge_2, anticoagulant_therapy, posttraumatic_seizure, age ≥ 60) or ≥2 minor (fall_from_any_elevation, persistent_anterograde_amnesia, pta_2_to_lt_4h, skull_contusion, neurologic_deficit, loss_of_consciousness, gcs_deterioration_1, age 40-60)",
"gcs": 15,
"major_count": 0,
"minor_count": 0
}
],
"path": "/api/calc/chip"
}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/chip' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"age":30,"anticoagulant_therapy":false,"clinical_signs_skull_fracture":false,"ejected_from_vehicle":false,"fall_from_any_elevation":false,"gcs":15,"gcs_deterioration_1":false,"gcs_deterioration_ge_2":false,"loss_of_consciousness":false,"neurologic_deficit":false,"pedestrian_or_cyclist_vs_vehicle":false,"persistent_anterograde_amnesia":false,"posttraumatic_seizure":false,"pta_2_to_lt_4h":false,"pta_ge_4h":false,"skull_contusion":false,"vomiting":false},{"age":30,"anticoagulant_therapy":false,"clinical_signs_skull_fracture":false,"ejected_from_vehicle":false,"fall_from_any_elevation":false,"gcs":15,"gcs_deterioration_1":false,"gcs_deterioration_ge_2":false,"loss_of_consciousness":false,"neurologic_deficit":false,"pedestrian_or_cyclist_vs_vehicle":false,"persistent_anterograde_amnesia":false,"posttraumatic_seizure":false,"pta_2_to_lt_4h":false,"pta_ge_4h":false,"skull_contusion":false,"vomiting":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/chip' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"age":30,"anticoagulant_therapy":false,"clinical_signs_skull_fracture":false,"ejected_from_vehicle":false,"fall_from_any_elevation":false,"gcs":15,"gcs_deterioration_1":false,"gcs_deterioration_ge_2":false,"loss_of_consciousness":false,"neurologic_deficit":false,"pedestrian_or_cyclist_vs_vehicle":false,"persistent_anterograde_amnesia":false,"posttraumatic_seizure":false,"pta_2_to_lt_4h":false,"pta_ge_4h":false,"skull_contusion":false,"vomiting":false},{"age":30,"anticoagulant_therapy":false,"clinical_signs_skull_fracture":false,"ejected_from_vehicle":false,"fall_from_any_elevation":false,"gcs":15,"gcs_deterioration_1":false,"gcs_deterioration_ge_2":false,"loss_of_consciousness":false,"neurologic_deficit":false,"pedestrian_or_cyclist_vs_vehicle":false,"persistent_anterograde_amnesia":false,"posttraumatic_seizure":false,"pta_2_to_lt_4h":false,"pta_ge_4h":false,"skull_contusion":false,"vomiting":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%2Fchip&method=POST
const res = await pay("https://api.magentlab.com/api/calc/chip", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"items": [
{
"age": 30,
"anticoagulant_therapy": false,
"clinical_signs_skull_fracture": false,
"ejected_from_vehicle": false,
"fall_from_any_elevation": false,
"gcs": 15,
"gcs_deterioration_1": false,
"gcs_deterioration_ge_2": false,
"loss_of_consciousness": false,
"neurologic_deficit": false,
"pedestrian_or_cyclist_vs_vehicle": false,
"persistent_anterograde_amnesia": false,
"posttraumatic_seizure": false,
"pta_2_to_lt_4h": false,
"pta_ge_4h": false,
"skull_contusion": false,
"vomiting": false
},
{
"age": 30,
"anticoagulant_therapy": false,
"clinical_signs_skull_fracture": false,
"ejected_from_vehicle": false,
"fall_from_any_elevation": false,
"gcs": 15,
"gcs_deterioration_1": false,
"gcs_deterioration_ge_2": false,
"loss_of_consciousness": false,
"neurologic_deficit": false,
"pedestrian_or_cyclist_vs_vehicle": false,
"persistent_anterograde_amnesia": false,
"posttraumatic_seizure": false,
"pta_2_to_lt_4h": false,
"pta_ge_4h": false,
"skull_contusion": false,
"vomiting": 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/chip",
json={
"items": [
{
"age": 30,
"anticoagulant_therapy": False,
"clinical_signs_skull_fracture": False,
"ejected_from_vehicle": False,
"fall_from_any_elevation": False,
"gcs": 15,
"gcs_deterioration_1": False,
"gcs_deterioration_ge_2": False,
"loss_of_consciousness": False,
"neurologic_deficit": False,
"pedestrian_or_cyclist_vs_vehicle": False,
"persistent_anterograde_amnesia": False,
"posttraumatic_seizure": False,
"pta_2_to_lt_4h": False,
"pta_ge_4h": False,
"skull_contusion": False,
"vomiting": False,
},
{
"age": 30,
"anticoagulant_therapy": False,
"clinical_signs_skull_fracture": False,
"ejected_from_vehicle": False,
"fall_from_any_elevation": False,
"gcs": 15,
"gcs_deterioration_1": False,
"gcs_deterioration_ge_2": False,
"loss_of_consciousness": False,
"neurologic_deficit": False,
"pedestrian_or_cyclist_vs_vehicle": False,
"persistent_anterograde_amnesia": False,
"posttraumatic_seizure": False,
"pta_2_to_lt_4h": False,
"pta_ge_4h": False,
"skull_contusion": False,
"vomiting": 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 |
|---|---|---|---|---|
| 7 h ago | Timed out | - | - | - |
| 18 h ago | Timed out | - | - | - |
| 28 h ago | Passed | 402 | 182 ms | $0.007 |
| 37 h ago | Passed | 402 | 464 ms | $0.007 |
| 47 h ago | Passed | 402 | 152 ms | $0.007 |
Show 10 older checks
| 2 days ago | Passed | 402 | 259 ms | $0.007 |
| 3 days ago | Passed | 402 | 336 ms | $0.007 |
| 3 days ago | Passed | 402 | 180 ms | $0.007 |
| 3 days ago | Passed | 402 | 333 ms | $0.007 |
| 3 days ago | Passed | 402 | 317 ms | $0.007 |
| 3 days ago | Passed | 402 | 221 ms | $0.007 |
| 3 days ago | Passed | 402 | 339 ms | $0.007 |
| 4 days ago | Passed | 402 | 241 ms | $0.007 |
| 4 days ago | Passed | 402 | 299 ms | $0.007 |
| 4 days ago | Passed | 402 | 476 ms | $0.007 |
History
| 12 Oct 2026 | Price changed from $0.005 to $0.007 |