Calc Lips
by magent in Security & trust
Gajic 2011 lung injury prediction score (Table 3): caller-assigned predisposing conditions, at most one high-risk surgery type plus emergency add-on, stacking trauma items, and risk modifiers including diabetes -1 only with sepsis. Score is a number; published observed range 0-15.5. Band low if <4, high if >=4 (ROC cutoff). Not an ARDS diagnosis. magent does not examine the patient or read imaging.
https://api.magentlab.com/api/calc/lips- Price
- $0.007
- per call in USDC
- Uptime
- 88.9%
- last 30 days
- Response time
- 264 ms
- 614 ms slowest 5%
- Last check
- Failed
- 18 min ago, next in 43 min
Reliability
Latest check failed 18 min ago: Timed out
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://api.magentlab.com/api/calc/lips
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/lips
content-type: application/json
{
"items": [
{
"acidosis_ph_lt_735": false,
"acute_abdomen": false,
"alcohol_abuse": true,
"aortic_vascular": false,
"aspiration": false,
"cardiac": false,
"chemotherapy": false,
"diabetes_mellitus": false,
"emergency_surgery": false,
"fio2_gt_035": true,
"hypoalbuminemia": false,
"lung_contusion": false,
"multiple_fractures": false,
"near_drowning": false,
"obesity_bmi_gt_30": false,
"orthopedic_spine": false,
"pneumonia": true,
"sepsis": true,
"shock": true,
"smoke_inhalation": false,
"spo2_lt_95": false,
"tachypnea_rr_gt_30": false,
"traumatic_brain_injury": false
},
{
"acidosis_ph_lt_735": false,
"acute_abdomen": false,
"alcohol_abuse": true,
"aortic_vascular": false,
"aspiration": false,
"cardiac": false,
"chemotherapy": false,
"diabetes_mellitus": false,
"emergency_surgery": false,
"fio2_gt_035": true,
"hypoalbuminemia": false,
"lung_contusion": false,
"multiple_fractures": false,
"near_drowning": false,
"obesity_bmi_gt_30": false,
"orthopedic_spine": false,
"pneumonia": true,
"sepsis": true,
"shock": true,
"smoke_inhalation": false,
"spo2_lt_95": false,
"tachypnea_rr_gt_30": false,
"traumatic_brain_injury": false
}
]
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
items | array of object | Yes |
Example response
The provider's example. We can't check it without paying. Shortened for display.
Example response, 242 lines
{
"count": 2,
"items": [
{
"citation": {
"authors": "Gajic O, Dabbagh O, Park PK, Adesanya A, Chang SY, Hou P, Anderson H 3rd, Hoth JJ, Mikkelsen ME, Gentile NT, Gong MN, Talmor D, Bajwa E, Watkins TR, Festic E, Yilmaz M, Liendahl M, Khan NA, Sevransky JE, Malinchoc M; US Critical Illness and Injury Trials Group: Lung Injury Prevention Study Investigators (USCIITG-LIPS)",
"doi": "10.1164/rccm.201004-0549OC",
"id": "gajic-2011",
"pmid": "20802164",
"source": "Am J Respir Crit Care Med. 2011;183(4):462-470",
"title": "Early Identification of Patients at Risk of Acute Lung Injury: Evaluation of Lung Injury Prediction Score in a Multicenter Cohort Study"
},
"components": [
{
"factor": "shock",
"points": 2,
"present": true
},
{
"factor": "aspiration",
"points": 0,
"present": false
},
{
"factor": "sepsis",
"points": 1,
"present": true
},
{
"factor": "pneumonia",
"points": 1.5,
"present": true
},
{
"factor": "emergency_surgery",
"points": 0,
"present": false
},
{
"factor": "traumatic_brain_injury",
"points": 0,
"present": false
},
{
"factor": "smoke_inhalation",
"points": 0,
"present": false
},
{
"factor": "near_drowning",
"points": 0,
"present": false
},
{
"factor": "lung_contusion",
"points": 0,
"present": false
},
{
"factor": "multiple_fractures",
"points": 0,
"present": false
},
{
"factor": "alcohol_abuse",
"points": 1,
"present": true
},
{
"factor": "obesity_bmi_gt_30",
"points": 0,
"present": false
},
{
"factor": "hypoalbuminemia",
"points": 0,
"present": false
},
{
"factor": "chemotherapy",
"points": 0,
"present": false
},
{
"factor": "fio2_gt_035",
"points": 2,
"present": true
},
{
"factor": "tachypnea_rr_gt_30",
"points": 0,
"present": false
},
{
"factor": "spo2_lt_95",
"points": 0,
"present": false
},
{
"factor": "acidosis_ph_lt_735",
"points": 0,
"present": false
},
{
"factor": "orthopedic_spine",
"points": 0,
"present": false
},
{
"factor": "acute_abdomen",
"points": 0,
"present": 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": "lips",
"formula_expression": "LIPS = shock(2) + aspiration(2) + sepsis(1) + pneumonia(1.5) + at most one of orthopedic_spine(1), acute_abdomen(2), cardiac(2.5), aortic_vascular(3.5) + emergency_surgery(1.5) + traumatic_brain_injury(2) + smoke_inhalation(2) + near_drowning(2) + lung_contusion(1.5) + multiple_fractures(1.5) + alcohol_abuse(1) + obesity_bmi_gt_30(1) + hypoalbuminemia(1) + chemotherapy(1) + fio2_gt_035(2) + tachypnea_rr_gt_30(1.5) + spo2_lt_95(1) + acidosis_ph_lt_735(1.5) + diabetes_mellitus(-1 only if sepsis); Gajic 2011 Table 3; published observed range 0-15.5; low <4, high >=4",
"lips_band": "high",
"max_score": 15.5,
"score": 7.5
},
{
"citation": {
"authors": "Gajic O, Dabbagh O, Park PK, Adesanya A, Chang SY, Hou P, Anderson H 3rd, Hoth JJ, Mikkelsen ME, Gentile NT, Gong MN, Talmor D, Bajwa E, Watkins TR, Festic E, Yilmaz M, Liendahl M, Khan NA, Sevransky JE, Malinchoc M; US Critical Illness and Injury Trials Group: Lung Injury Prevention Study Investigators (USCIITG-LIPS)",
"doi": "10.1164/rccm.201004-0549OC",
"id": "gajic-2011",
"pmid": "20802164",
"source": "Am J Respir Crit Care Med. 2011;183(4):462-470",
"title": "Early Identification of Patients at Risk of Acute Lung Injury: Evaluation of Lung Injury Prediction Score in a Multicenter Cohort Study"
},
"components": [
{
"factor": "shock",
"points": 2,
"present": true
},
{
"factor": "aspiration",
"points": 0,
"present": false
},
{
"factor": "sepsis",
"points": 1,
"present": true
},
{
"factor": "pneumonia",
"points": 1.5,
"present": true
},
{
"factor": "emergency_surgery",
"points": 0,
"present": false
},
{
"factor": "traumatic_brain_injury",
"points": 0,
"present": false
},
{
"factor": "smoke_inhalation",
"points": 0,
"present": false
},
{
"factor": "near_drowning",
"points": 0,
"present": false
},
{
"factor": "lung_contusion",
"points": 0,
"present": false
},
{
"factor": "multiple_fractures",
"points": 0,
"present": false
},
{
"factor": "alcohol_abuse",
"points": 1,
"present": true
},
{
"factor": "obesity_bmi_gt_30",
"points": 0,
"present": false
},
{
"factor": "hypoalbuminemia",
"points": 0,
"present": false
},
{
"factor": "chemotherapy",
"points": 0,
"present": false
},
{
"factor": "fio2_gt_035",
"points": 2,
"present": true
},
{
"factor": "tachypnea_rr_gt_30",
"points": 0,
"present": false
},
{
"factor": "spo2_lt_95",
"points": 0,
"present": false
},
{
"factor": "acidosis_ph_lt_735",
"points": 0,
"present": false
},
{
"factor": "orthopedic_spine",
"points": 0,
"present": false
},
{
"factor": "acute_abdomen",
"points": 0,
"present": 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": "lips",
"formula_expression": "LIPS = shock(2) + aspiration(2) + sepsis(1) + pneumonia(1.5) + at most one of orthopedic_spine(1), acute_abdomen(2), cardiac(2.5), aortic_vascular(3.5) + emergency_surgery(1.5) + traumatic_brain_injury(2) + smoke_inhalation(2) + near_drowning(2) + lung_contusion(1.5) + multiple_fractures(1.5) + alcohol_abuse(1) + obesity_bmi_gt_30(1) + hypoalbuminemia(1) + chemotherapy(1) + fio2_gt_035(2) + tachypnea_rr_gt_30(1.5) + spo2_lt_95(1) + acidosis_ph_lt_735(1.5) + diabetes_mellitus(-1 only if sepsis); Gajic 2011 Table 3; published observed range 0-15.5; low <4, high >=4",
"lips_band": "high",
"max_score": 15.5,
"score": 7.5
}
],
"path": "/api/calc/lips"
}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/lips' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"acidosis_ph_lt_735":false,"acute_abdomen":false,"alcohol_abuse":true,"aortic_vascular":false,"aspiration":false,"cardiac":false,"chemotherapy":false,"diabetes_mellitus":false,"emergency_surgery":false,"fio2_gt_035":true,"hypoalbuminemia":false,"lung_contusion":false,"multiple_fractures":false,"near_drowning":false,"obesity_bmi_gt_30":false,"orthopedic_spine":false,"pneumonia":true,"sepsis":true,"shock":true,"smoke_inhalation":false,"spo2_lt_95":false,"tachypnea_rr_gt_30":false,"traumatic_brain_injury":false},{"acidosis_ph_lt_735":false,"acute_abdomen":false,"alcohol_abuse":true,"aortic_vascular":false,"aspiration":false,"cardiac":false,"chemotherapy":false,"diabetes_mellitus":false,"emergency_surgery":false,"fio2_gt_035":true,"hypoalbuminemia":false,"lung_contusion":false,"multiple_fractures":false,"near_drowning":false,"obesity_bmi_gt_30":false,"orthopedic_spine":false,"pneumonia":true,"sepsis":true,"shock":true,"smoke_inhalation":false,"spo2_lt_95":false,"tachypnea_rr_gt_30":false,"traumatic_brain_injury":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/lips' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"acidosis_ph_lt_735":false,"acute_abdomen":false,"alcohol_abuse":true,"aortic_vascular":false,"aspiration":false,"cardiac":false,"chemotherapy":false,"diabetes_mellitus":false,"emergency_surgery":false,"fio2_gt_035":true,"hypoalbuminemia":false,"lung_contusion":false,"multiple_fractures":false,"near_drowning":false,"obesity_bmi_gt_30":false,"orthopedic_spine":false,"pneumonia":true,"sepsis":true,"shock":true,"smoke_inhalation":false,"spo2_lt_95":false,"tachypnea_rr_gt_30":false,"traumatic_brain_injury":false},{"acidosis_ph_lt_735":false,"acute_abdomen":false,"alcohol_abuse":true,"aortic_vascular":false,"aspiration":false,"cardiac":false,"chemotherapy":false,"diabetes_mellitus":false,"emergency_surgery":false,"fio2_gt_035":true,"hypoalbuminemia":false,"lung_contusion":false,"multiple_fractures":false,"near_drowning":false,"obesity_bmi_gt_30":false,"orthopedic_spine":false,"pneumonia":true,"sepsis":true,"shock":true,"smoke_inhalation":false,"spo2_lt_95":false,"tachypnea_rr_gt_30":false,"traumatic_brain_injury":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%2Flips&method=POST
const res = await pay("https://api.magentlab.com/api/calc/lips", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"items": [
{
"acidosis_ph_lt_735": false,
"acute_abdomen": false,
"alcohol_abuse": true,
"aortic_vascular": false,
"aspiration": false,
"cardiac": false,
"chemotherapy": false,
"diabetes_mellitus": false,
"emergency_surgery": false,
"fio2_gt_035": true,
"hypoalbuminemia": false,
"lung_contusion": false,
"multiple_fractures": false,
"near_drowning": false,
"obesity_bmi_gt_30": false,
"orthopedic_spine": false,
"pneumonia": true,
"sepsis": true,
"shock": true,
"smoke_inhalation": false,
"spo2_lt_95": false,
"tachypnea_rr_gt_30": false,
"traumatic_brain_injury": false
},
{
"acidosis_ph_lt_735": false,
"acute_abdomen": false,
"alcohol_abuse": true,
"aortic_vascular": false,
"aspiration": false,
"cardiac": false,
"chemotherapy": false,
"diabetes_mellitus": false,
"emergency_surgery": false,
"fio2_gt_035": true,
"hypoalbuminemia": false,
"lung_contusion": false,
"multiple_fractures": false,
"near_drowning": false,
"obesity_bmi_gt_30": false,
"orthopedic_spine": false,
"pneumonia": true,
"sepsis": true,
"shock": true,
"smoke_inhalation": false,
"spo2_lt_95": false,
"tachypnea_rr_gt_30": false,
"traumatic_brain_injury": 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/lips",
json={
"items": [
{
"acidosis_ph_lt_735": False,
"acute_abdomen": False,
"alcohol_abuse": True,
"aortic_vascular": False,
"aspiration": False,
"cardiac": False,
"chemotherapy": False,
"diabetes_mellitus": False,
"emergency_surgery": False,
"fio2_gt_035": True,
"hypoalbuminemia": False,
"lung_contusion": False,
"multiple_fractures": False,
"near_drowning": False,
"obesity_bmi_gt_30": False,
"orthopedic_spine": False,
"pneumonia": True,
"sepsis": True,
"shock": True,
"smoke_inhalation": False,
"spo2_lt_95": False,
"tachypnea_rr_gt_30": False,
"traumatic_brain_injury": False,
},
{
"acidosis_ph_lt_735": False,
"acute_abdomen": False,
"alcohol_abuse": True,
"aortic_vascular": False,
"aspiration": False,
"cardiac": False,
"chemotherapy": False,
"diabetes_mellitus": False,
"emergency_surgery": False,
"fio2_gt_035": True,
"hypoalbuminemia": False,
"lung_contusion": False,
"multiple_fractures": False,
"near_drowning": False,
"obesity_bmi_gt_30": False,
"orthopedic_spine": False,
"pneumonia": True,
"sepsis": True,
"shock": True,
"smoke_inhalation": False,
"spo2_lt_95": False,
"tachypnea_rr_gt_30": False,
"traumatic_brain_injury": 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 |
|---|---|---|---|---|
| 18 min ago | Timed out | - | - | - |
| 6 h ago | Timed out | - | - | - |
| 11 h ago | Timed out | - | - | - |
| 16 h ago | Timed out | - | - | - |
| 20 h ago | Passed | 402 | 173 ms | $0.007 |
Show 10 older checks
| 25 h ago | Passed | 402 | 313 ms | $0.007 |
| 30 h ago | Passed | 402 | 264 ms | $0.007 |
| 35 h ago | Passed | 402 | 168 ms | $0.007 |
| 39 h ago | Passed | 402 | 290 ms | $0.007 |
| 44 h ago | Passed | 402 | 431 ms | $0.007 |
| 2 days ago | Passed | 402 | 334 ms | $0.007 |
| 2 days ago | Passed | 402 | 498 ms | $0.007 |
| 2 days ago | Passed | 402 | 528 ms | $0.007 |
| 3 days ago | Passed | 402 | 156 ms | $0.007 |
| 3 days ago | Passed | 402 | 188 ms | $0.007 |
History
| 11 Oct 2026 | Price changed from $0.005 to $0.007 |