75trust / 100

Calc Abbey

by magent in Other

x402 APIPassing, checked 5 h ago

Abbey 2004 observational pain scale from six caller-assigned 0-3 items (vocalization, facial_expression, change_in_body_language, behavioural_change, physiological_change, physical_changes) using that paper's absent/mild/moderate/severe descriptors. magent sums only (max 18) and returns Abbey 2004 bands: 0-2 none, 3-7 mild, 8-13 moderate, 14+ severe. magent does not observe the patient. Not a pain diagnosis or analgesic order. Not PAINAD.

GET
https://api.magentlab.com/api/calc/abbey
Price
$0.005
per call in USDC
Uptime
100%
last 30 days
Response time
255 ms
405 ms slowest 5%
Last check
Passed
5 h ago, next in 1 h

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/abbey

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/abbey?behavioural_change=0&change_in_body_language=0&facial_expression=0&physical_changes=0&physiological_change=0&vocalization=0

Parameters

ParameterTypeRequiredDescription
behavioural_changeintegerYesCaller-assigned Abbey 2004 behavioural change (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: increased confusion, refusing to eat, alteration in usual patterns. magent does not observe the patient.
change_in_body_languageintegerYesCaller-assigned Abbey 2004 change in body language (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: fidgeting, rocking, guarding part of body, withdrawn. magent does not observe the patient.
facial_expressionintegerYesCaller-assigned Abbey 2004 facial expression (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: looking tense, frowning, grimacing, looking frightened. magent does not observe the patient.
physical_changesintegerYesCaller-assigned Abbey 2004 physical changes (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: skin tears, pressure areas, arthritis, contractures, previous injuries. magent does not observe the patient.
physiological_changeintegerYesCaller-assigned Abbey 2004 physiological change (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: temperature, pulse or blood pressure outside normal limits, perspiring, flushing or pallor. magent does not observe the patient.
vocalizationintegerYesCaller-assigned Abbey 2004 vocalization (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: whimpering, groaning, crying. magent does not observe the patient.

Example response

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

Example response, 54 lines
{
  "citation": {
    "authors": "Abbey J, Piller N, De Bellis A, Esterman A, Parker D, Giles L, Lowcay B",
    "doi": "10.12968/ijpn.2004.10.1.12013",
    "id": "abbey-2004",
    "pmid": "14966439",
    "source": "Int J Palliat Nurs. 2004;10(1):6-13",
    "title": "The Abbey pain scale: a 1-minute numerical indicator for people with end-stage dementia"
  },
  "components": [
    {
      "factor": "vocalization",
      "points": 0,
      "present": true,
      "value": 0
    },
    {
      "factor": "facial_expression",
      "points": 0,
      "present": true,
      "value": 0
    },
    {
      "factor": "change_in_body_language",
      "points": 0,
      "present": true,
      "value": 0
    },
    {
      "factor": "behavioural_change",
      "points": 0,
      "present": true,
      "value": 0
    },
    {
      "factor": "physiological_change",
      "points": 0,
      "present": true,
      "value": 0
    },
    {
      "factor": "physical_changes",
      "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.",
  "formula": "abbey",
  "formula_expression": "Abbey = vocalization + facial_expression + change_in_body_language + behavioural_change + physiological_change + physical_changes; each caller-assigned 0-3 (absent/mild/moderate/severe); max 18; Abbey 2004 bands 0-2 none, 3-7 mild, 8-13 moderate, 14+ severe",
  "max_score": 18,
  "score": 0,
  "severity": "none"
}

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/abbey?behavioural_change=0&change_in_body_language=0&facial_expression=0&physical_changes=0&physiological_change=0&vocalization=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/abbey?behavioural_change=0&change_in_body_language=0&facial_expression=0&physical_changes=0&physiological_change=0&vocalization=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%2Fabbey
const res = await pay("https://api.magentlab.com/api/calc/abbey?behavioural_change=0&change_in_body_language=0&facial_expression=0&physical_changes=0&physiological_change=0&vocalization=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/abbey?behavioural_change=0&change_in_body_language=0&facial_expression=0&physical_changes=0&physiological_change=0&vocalization=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
5 h agoPassed402280 ms$0.005
15 h agoPassed402154 ms$0.005
25 h agoPassed402391 ms$0.005
35 h agoPassed402266 ms$0.005
45 h agoPassed402255 ms$0.005
Show 6 older checks
2 days agoPassed402405 ms$0.005
3 days agoPassed402145 ms$0.005
3 days agoPassed402185 ms$0.005
4 days agoPassed402289 ms$0.005
4 days agoPassed402144 ms$0.005
4 days agoPassed402138 ms$0.005