75trust / 100

Calc Nvps

by magent in Other

x402 APIPassing, checked 6 h ago

Odhner 2003 original NVPS from five caller-assigned 0-2 items (face, activity, guarding, physiologic_i vital signs, physiologic_ii autonomic) using that paper's 0/1/2 descriptors. magent sums only (max 10) and does not observe the patient. Not the later NVPS-R respiratory revision. No invented intensity cutoffs. Not a pain diagnosis or analgesic order. Not BPS. Not FLACC.

GET
https://api.magentlab.com/api/calc/nvps
Price
$0.005
per call in USDC
Uptime
100%
last 30 days
Response time
225 ms
341 ms slowest 5%
Last check
Passed
6 h ago, next in 32 min

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

GET https://api.magentlab.com/api/calc/nvps

Each call costs $0.005 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.

GET https://api.magentlab.com/api/calc/nvps?activity=0&face=0&guarding=0&physiologic_i=0&physiologic_ii=0

Parameters

ParameterTypeRequiredDescription
activityintegerYesCaller-assigned Odhner 2003 original NVPS activity/movement (integer 0-2): 0 lying quietly, normal position; 1 seeking attention through movement or slow, cautious movement; 2 restless, excessive activity and/or withdrawal reflexes. magent does not observe the patient.
faceintegerYesCaller-assigned Odhner 2003 original NVPS face (integer 0-2): 0 no particular expression or smile; 1 occasional grimace, tearing, frowning, wrinkled forehead; 2 frequent grimace, tearing, frowning, wrinkled forehead. magent does not observe the patient.
guardingintegerYesCaller-assigned Odhner 2003 original NVPS guarding (integer 0-2): 0 lying quietly, no positioning of hands over areas of the body; 1 splinting areas of the body, tense; 2 rigid, stiff. magent does not observe the patient.
physiologic_iintegerYesCaller-assigned Odhner 2003 original NVPS physiologic I vital signs (integer 0-2): 0 stable vital signs (no change in past 4 h vs baseline BP/HR/RR); 1 change over past 4 h in SBP >20 mmHg or HR >20/min or RR >10/min; 2 change over past 4 h in SBP >30 mmHg or HR >25/min or RR >20/min. magent does n…
physiologic_iiintegerYesCaller-assigned Odhner 2003 original NVPS physiologic II autonomic (integer 0-2): 0 warm, dry skin; 1 dilated pupils, perspiring, flushing; 2 diaphoretic, pallor. Not the later NVPS-R respiratory category. magent does not observe the patient.

Example response

The provider's example. We can't check it without paying.

Example response, 52 lines
{
  "activity": 0,
  "citation": {
    "authors": "Odhner M, Wegman D, Freeland N, Steinmetz A, Ingersoll GL",
    "doi": "10.1097/00003465-200311000-00010",
    "id": "odhner-2003",
    "pmid": "14639117",
    "source": "Dimens Crit Care Nurs. 2003;22(6):260-267",
    "title": "Assessing pain control in nonverbal critically ill adults"
  },
  "components": [
    {
      "factor": "face",
      "points": 0,
      "present": true,
      "value": 0
    },
    {
      "factor": "activity",
      "points": 0,
      "present": true,
      "value": 0
    },
    {
      "factor": "guarding",
      "points": 0,
      "present": true,
      "value": 0
    },
    {
      "factor": "physiologic_i",
      "points": 0,
      "present": true,
      "value": 0
    },
    {
      "factor": "physiologic_ii",
      "points": 0,
      "present": true,
      "value": 0
    }
  ],
  "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.",
  "face": 0,
  "formula": "nvps",
  "formula_expression": "NVPS = face + activity + guarding + physiologic_i + physiologic_ii; each caller-assigned 0-2; max 10",
  "guarding": 0,
  "max_score": 10,
  "physiologic_i": 0,
  "physiologic_ii": 0,
  "score": 0
}

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.005.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i 'https://api.magentlab.com/api/calc/nvps?activity=0&face=0&guarding=0&physiologic_i=0&physiologic_ii=0'

# 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 - 'https://api.magentlab.com/api/calc/nvps?activity=0&face=0&guarding=0&physiologic_i=0&physiologic_ii=0' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: 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.005 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.005" });
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.005 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.magentlab.com%2Fapi%2Fcalc%2Fnvps
const res = await pay("https://api.magentlab.com/api/calc/nvps?activity=0&face=0&guarding=0&physiologic_i=0&physiologic_ii=0");
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.005 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.005"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.get("https://api.magentlab.com/api/calc/nvps?activity=0&face=0&guarding=0&physiologic_i=0&physiologic_ii=0")
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
6 h agoPassed402246 ms$0.005
16 h agoPassed402225 ms$0.005
26 h agoPassed402142 ms$0.005
35 h agoPassed402301 ms$0.005
45 h agoPassed402160 ms$0.005
Show 6 older checks
2 days agoPassed402341 ms$0.005
3 days agoPassed402289 ms$0.005
3 days agoPassed402308 ms$0.005
4 days agoPassed402221 ms$0.005
4 days agoPassed402132 ms$0.005
4 days agoPassed402141 ms$0.005