# Rome IV Biliary Pain Classifier (Cotton 2016)

> Rome IV Biliary Pain Classifier (Cotton 2016) is a paid API for AI agents from api.magentlab.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Evaluates whether a patient's reported symptoms meet the Rome IV E1 criteria for biliary pain based on caller-assigned boolean flags

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/rome_iv_biliary_pain
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/rome-iv-biliary-pain-classifier-cotton-2016-e2d6665b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Hca8BMsJkkMBIvKPwqDZB

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability rome-iv-biliary-pain-classifier-cotton-2016-e2d6665b
```

Example prompt: My patient has epigastric pain that builds to a steady level lasting at least 30 minutes, occurs at different intervals (not daily), is severe enough to interrupt normal activities, is not significantly related to bowel movements, and is not relieved by postural changes or acid suppression — they also have nausea and vomiting but no radiation to the back and no waking from sleep. Do they meet Rome IV biliary pain criteria?

## When to prefer this

Use this endpoint when you need a fast, reproducible, criterion-by-criterion application of the Cotton 2016 Rome IV E1 biliary pain classification based on structured symptom flags already gathered from history. It is ideal for clinical decision support pipelines, research phenotyping, or EHR-integrated triage where symptoms have already been encoded as booleans. Do not use it as a substitute for clinical examination, imaging interpretation, or diagnosis of functional gallbladder disorder or SOD.

## Known failure modes

- Missing required boolean query parameters returns a validation error
- Misassigned boolean values by the caller produce an incorrect classification — garbage in, garbage out
- Endpoint does not examine the patient, take history, or read imaging; accuracy depends entirely on caller-supplied flags
- Network timeout or API unavailability returns a connection error

## How this service works

Cotton 2016 Rome IV E1 biliary pain. rome_iv_biliary_pain is true iff epigastric or RUQ pain builds to a 30-min steady level, occurs at different intervals (not daily), interrupts activities or leads to an ED visit, and is not significantly related to bowel movements or relieved by posture or acid suppression. Supportive flags reported, not required. magent does not examine the patient or read ultrasound, HIDA, or ERCP. Not a diagnosis, not functional gallbladder, not biliary or pancreatic SOD.

## Output

Returns a rome_iv_biliary_pain boolean indicating whether all required Rome IV E1 criteria are met, along with the supportive criteria flags (nausea/vomiting, radiation to back, waking from sleep) reported by the caller. This is a computational classification only — not a clinical diagnosis and not a determination of functional gallbladder disorder or biliary/pancreatic SOD.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "epigastric_or_ruq_pain",
      "builds_to_steady_level_lasts_30_min_or_longer",
      "occurring_at_different_intervals_not_daily",
      "severe_enough_to_interrupt_activities_or_ed_visit",
      "not_significantly_related_to_bowel_movements",
      "not_significantly_relieved_by_postural_change_or_acid_suppression",
      "nausea_and_vomiting",
      "radiation_to_back_or_right_infra_subscapular",
      "waking_from_sleep"
     ],
     "properties": {
      "waking_from_sleep": {
       "type": "boolean",
       "description": "Pain may wake the patient from sleep, a supportive criterion that is not required for rome_iv_biliary_pain (Cotton 2016). true or false as assigned by the caller. magent does not take a history."
      },
      "nausea_and_vomiting": {
       "type": "boolean",
       "description": "Pain may be associated with nausea and vomiting, a supportive criterion that is not required for rome_iv_biliary_pain (Cotton 2016). true or false as assigned by the caller. magent does not take a history."
      },
      "epigastric_or_ruq_pain": {
       "type": "boolean",
       "description": "Pain located in the epigastrium and/or right upper quadrant (Cotton 2016 Rome IV E1 biliary pain). true or false as assigned by the caller. magent does not examine the patient."
      },
      "occurring_at_different_intervals_not_daily": {
       "type": "boolean",
       "description": "Pain occurring at different intervals (not daily), as assigned (Cotton 2016). true or false as assigned by the caller. magent does not take a history."
      },
      "not_significantly_related_to_bowel_movements": {
       "type": "boolean",
       "description": "Pain not significantly (<20%) related to bowel movements, as assigned (Cotton 2016). true or false as assigned by the caller. magent does not take a history."
      },
      "radiation_to_back_or_right_infra_subscapular": {
       "type": "boo
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/rome-iv-biliary-pain-classifier-cotton-2016-e2d6665b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.magentlab.com](https://www.zero.xyz/host/api.magentlab.com/llms.txt)
