{
  "x402Version": 2,
  "id": 39445,
  "slug": "39445",
  "resource": "https://api.magentlab.com/api/calc/bps",
  "description": "Payen 2001 Behavioral Pain Scale from three caller-assigned 1-4 items (facial_expression, upper_limbs, ventilator_compliance) using that paper's Table 1 descriptors. magent sums only (range 3-12) and does not observe the patient. No later pain-present cutoffs. Not a pain diagnosis or analgesic order. Not CPOT (CPOT items are 0-2).",
  "type": "http",
  "serviceName": "magent",
  "resourceType": "Agent Service",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x836Be278f1739fB4308091cD1852F7971Bc19Ee2",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "amountUsd": 0.005,
      "maxTimeoutSeconds": 600
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "iconUrl": "https://api.magentlab.com/favicon.ico",
        "input": {
          "body": {
            "items": [
              {
                "facial_expression": 1,
                "upper_limbs": 1,
                "ventilator_compliance": 1
              },
              {
                "facial_expression": 1,
                "upper_limbs": 1,
                "ventilator_compliance": 1
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "citation": {
                  "authors": "Payen JF, Bru O, Bosson JL, Lagrasta A, Novel E, Deschaux I, Lavagne P, Jacquot C",
                  "doi": "10.1097/00003246-200112000-00004",
                  "id": "payen-2001",
                  "pmid": "11700385",
                  "source": "Crit Care Med. 2001;29(12):2258-2263",
                  "title": "Assessing pain in critically ill sedated patients by using a behavioral pain scale"
                },
                "components": [
                  {
                    "factor": "facial_expression",
                    "points": 1,
                    "present": true,
                    "value": 1
                  },
                  {
                    "factor": "upper_limbs",
                    "points": 1,
                    "present": true,
                    "value": 1
                  },
                  {
                    "factor": "ventilator_compliance",
                    "points": 1,
                    "present": true,
                    "value": 1
                  }
                ],
                "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.",
                "facial_expression": 1,
                "formula": "bps",
                "formula_expression": "BPS = facial_expression + upper_limbs + ventilator_compliance; each caller-assigned 1-4; range 3-12",
                "max_score": 12,
                "score": 3,
                "upper_limbs": 1,
                "ventilator_compliance": 1
              },
              {
                "citation": {
                  "authors": "Payen JF, Bru O, Bosson JL, Lagrasta A, Novel E, Deschaux I, Lavagne P, Jacquot C",
                  "doi": "10.1097/00003246-200112000-00004",
                  "id": "payen-2001",
                  "pmid": "11700385",
                  "source": "Crit Care Med. 2001;29(12):2258-2263",
                  "title": "Assessing pain in critically ill sedated patients by using a behavioral pain scale"
                },
                "components": [
                  {
                    "factor": "facial_expression",
                    "points": 1,
                    "present": true,
                    "value": 1
                  },
                  {
                    "factor": "upper_limbs",
                    "points": 1,
                    "present": true,
                    "value": 1
                  },
                  {
                    "factor": "ventilator_compliance",
                    "points": 1,
                    "present": true,
                    "value": 1
                  }
                ],
                "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.",
                "facial_expression": 1,
                "formula": "bps",
                "formula_expression": "BPS = facial_expression + upper_limbs + ventilator_compliance; each caller-assigned 1-4; range 3-12",
                "max_score": 12,
                "score": 3,
                "upper_limbs": 1,
                "ventilator_compliance": 1
              }
            ],
            "path": "/api/calc/bps"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "facial_expression": {
                          "description": "Caller-assigned Payen 2001 BPS facial expression (integer 1-4): 1 relaxed; 2 partially tightened (e.g. brow lowering); 3 fully tightened (e.g. eyelid closing); 4 grimacing. magent does not observe the patient.",
                          "type": "integer"
                        },
                        "upper_limbs": {
                          "description": "Caller-assigned Payen 2001 BPS upper limbs (integer 1-4): 1 no movement; 2 partially bent; 3 fully bent with finger flexion; 4 permanently retracted. magent does not observe the patient.",
                          "type": "integer"
                        },
                        "ventilator_compliance": {
                          "description": "Caller-assigned Payen 2001 BPS compliance with ventilation (integer 1-4): 1 tolerating movement; 2 coughing but tolerating ventilation most of the time; 3 fighting ventilator; 4 unable to control ventilation. magent does not observe the patient.",
                          "type": "integer"
                        }
                      },
                      "required": [
                        "facial_expression",
                        "upper_limbs",
                        "ventilator_compliance"
                      ],
                      "type": "object"
                    },
                    "maxItems": 25,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "items"
                ],
                "type": "object"
              },
              "headers": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "method": {
                "const": "POST",
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "bps",
    "pain",
    "icu",
    "neurology",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-12T14:51:44.684Z",
  "quality": {
    "calls30d": 4,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-12T14:51:44.561Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "facial_expression": 1,
                  "upper_limbs": 1,
                  "ventilator_compliance": 1
                },
                {
                  "facial_expression": 1,
                  "upper_limbs": 1,
                  "ventilator_compliance": 1
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "citation": {
                    "authors": "Payen JF, Bru O, Bosson JL, Lagrasta A, Novel E, Deschaux I, Lavagne P, Jacquot C",
                    "doi": "10.1097/00003246-200112000-00004",
                    "id": "payen-2001",
                    "pmid": "11700385",
                    "source": "Crit Care Med. 2001;29(12):2258-2263",
                    "title": "Assessing pain in critically ill sedated patients by using a behavioral pain scale"
                  },
                  "components": [
                    {
                      "factor": "facial_expression",
                      "points": 1,
                      "present": true,
                      "value": 1
                    },
                    {
                      "factor": "upper_limbs",
                      "points": 1,
                      "present": true,
                      "value": 1
                    },
                    {
                      "factor": "ventilator_compliance",
                      "points": 1,
                      "present": true,
                      "value": 1
                    }
                  ],
                  "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.",
                  "facial_expression": 1,
                  "formula": "bps",
                  "formula_expression": "BPS = facial_expression + upper_limbs + ventilator_compliance; each caller-assigned 1-4; range 3-12",
                  "max_score": 12,
                  "score": 3,
                  "upper_limbs": 1,
                  "ventilator_compliance": 1
                },
                {
                  "citation": {
                    "authors": "Payen JF, Bru O, Bosson JL, Lagrasta A, Novel E, Deschaux I, Lavagne P, Jacquot C",
                    "doi": "10.1097/00003246-200112000-00004",
                    "id": "payen-2001",
                    "pmid": "11700385",
                    "source": "Crit Care Med. 2001;29(12):2258-2263",
                    "title": "Assessing pain in critically ill sedated patients by using a behavioral pain scale"
                  },
                  "components": [
                    {
                      "factor": "facial_expression",
                      "points": 1,
                      "present": true,
                      "value": 1
                    },
                    {
                      "factor": "upper_limbs",
                      "points": 1,
                      "present": true,
                      "value": 1
                    },
                    {
                      "factor": "ventilator_compliance",
                      "points": 1,
                      "present": true,
                      "value": 1
                    }
                  ],
                  "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.",
                  "facial_expression": 1,
                  "formula": "bps",
                  "formula_expression": "BPS = facial_expression + upper_limbs + ventilator_compliance; each caller-assigned 1-4; range 3-12",
                  "max_score": 12,
                  "score": 3,
                  "upper_limbs": 1,
                  "ventilator_compliance": 1
                }
              ],
              "path": "/api/calc/bps"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "facial_expression": {
                            "description": "Caller-assigned Payen 2001 BPS facial expression (integer 1-4): 1 relaxed; 2 partially tightened (e.g. brow lowering); 3 fully tightened (e.g. eyelid closing); 4 grimacing. magent does not observe the patient.",
                            "type": "integer"
                          },
                          "upper_limbs": {
                            "description": "Caller-assigned Payen 2001 BPS upper limbs (integer 1-4): 1 no movement; 2 partially bent; 3 fully bent with finger flexion; 4 permanently retracted. magent does not observe the patient.",
                            "type": "integer"
                          },
                          "ventilator_compliance": {
                            "description": "Caller-assigned Payen 2001 BPS compliance with ventilation (integer 1-4): 1 tolerating movement; 2 coughing but tolerating ventilation most of the time; 3 fighting ventilator; 4 unable to control ventilation. magent does not observe the patient.",
                            "type": "integer"
                          }
                        },
                        "required": [
                          "facial_expression",
                          "upper_limbs",
                          "ventilator_compliance"
                        ],
                        "type": "object"
                      },
                      "maxItems": 25,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "type": "object"
                },
                "headers": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "method": {
                  "const": "POST",
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.magentlab.com",
    "manifest_name": "api.magentlab.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}