{
  "x402Version": 2,
  "id": 38891,
  "slug": "38891",
  "resource": "https://api.magentlab.com/api/calc/twist",
  "description": "Barbosa 2013 TWIST (Testicular Workup for Ischemia and Suspected Torsion). Five caller-assigned flags: testicular swelling (2), hard testicle (2), absent cremasteric reflex (1), nausea or vomiting (1), high-riding testis (1). Max 7. Risk: 0–2 low, 3–4 intermediate, 5–7 high (cutoffs 2 and 5). Not a torsion diagnosis or an ultrasound or operative order. magent does not examine the patient.",
  "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": [
              {
                "absent_cremasteric_reflex": false,
                "hard_testicle": false,
                "high_riding_testis": false,
                "nausea_or_vomiting": false,
                "testicular_swelling": false
              },
              {
                "absent_cremasteric_reflex": false,
                "hard_testicle": false,
                "high_riding_testis": false,
                "nausea_or_vomiting": false,
                "testicular_swelling": false
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "citation": {
                  "authors": "Barbosa JA, Tiseo BC, Barayan GA, Rosman BM, Torricelli FC, Passerotti CC, Srougi M, Retik AB, Nguyen HT",
                  "doi": "10.1016/j.juro.2012.10.056",
                  "id": "barbosa-2013",
                  "pmid": "23103800",
                  "source": "J Urol. 2013;189(5):1859-1864",
                  "title": "Development and initial validation of a scoring system to diagnose testicular torsion in children"
                },
                "components": [
                  {
                    "factor": "testicular_swelling",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "hard_testicle",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "absent_cremasteric_reflex",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "nausea_or_vomiting",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "high_riding_testis",
                    "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": "twist",
                "formula_expression": "TWIST = testicular_swelling (true 2) + hard_testicle (true 2) + absent_cremasteric_reflex (true 1) + nausea_or_vomiting (true 1) + high_riding_testis (true 1); Barbosa 2013; max 7; 0-2 low, 3-4 intermediate, 5-7 high (cutoffs 2 and 5)",
                "max_score": 7,
                "risk": "low",
                "score": 0
              },
              {
                "citation": {
                  "authors": "Barbosa JA, Tiseo BC, Barayan GA, Rosman BM, Torricelli FC, Passerotti CC, Srougi M, Retik AB, Nguyen HT",
                  "doi": "10.1016/j.juro.2012.10.056",
                  "id": "barbosa-2013",
                  "pmid": "23103800",
                  "source": "J Urol. 2013;189(5):1859-1864",
                  "title": "Development and initial validation of a scoring system to diagnose testicular torsion in children"
                },
                "components": [
                  {
                    "factor": "testicular_swelling",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "hard_testicle",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "absent_cremasteric_reflex",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "nausea_or_vomiting",
                    "points": 0,
                    "present": false
                  },
                  {
                    "factor": "high_riding_testis",
                    "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": "twist",
                "formula_expression": "TWIST = testicular_swelling (true 2) + hard_testicle (true 2) + absent_cremasteric_reflex (true 1) + nausea_or_vomiting (true 1) + high_riding_testis (true 1); Barbosa 2013; max 7; 0-2 low, 3-4 intermediate, 5-7 high (cutoffs 2 and 5)",
                "max_score": 7,
                "risk": "low",
                "score": 0
              }
            ],
            "path": "/api/calc/twist"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "absent_cremasteric_reflex": {
                          "description": "Absent cremasteric reflex as assigned by the caller (Barbosa 2013). true scores 1. magent does not examine the patient.",
                          "type": "boolean"
                        },
                        "hard_testicle": {
                          "description": "Hard testicle as assigned by the caller (Barbosa 2013). true scores 2. magent does not examine the patient.",
                          "type": "boolean"
                        },
                        "high_riding_testis": {
                          "description": "High-riding testis as assigned by the caller (Barbosa 2013). true scores 1. magent does not examine the patient.",
                          "type": "boolean"
                        },
                        "nausea_or_vomiting": {
                          "description": "Nausea or vomiting as assigned by the caller (Barbosa 2013). true scores 1. magent does not take a symptom history.",
                          "type": "boolean"
                        },
                        "testicular_swelling": {
                          "description": "Testicular swelling as assigned by the caller (Barbosa 2013). true scores 2. magent does not examine the patient.",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "testicular_swelling",
                        "hard_testicle",
                        "absent_cremasteric_reflex",
                        "nausea_or_vomiting",
                        "high_riding_testis"
                      ],
                      "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": [
    "twist",
    "testicular-torsion",
    "acute-scrotum",
    "emergency",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T15:53:59.692Z",
  "quality": {
    "calls30d": 6,
    "uniquePayers30d": 3,
    "lastCalledAt": "2026-10-13T15:53:59.54Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "absent_cremasteric_reflex": false,
                  "hard_testicle": false,
                  "high_riding_testis": false,
                  "nausea_or_vomiting": false,
                  "testicular_swelling": false
                },
                {
                  "absent_cremasteric_reflex": false,
                  "hard_testicle": false,
                  "high_riding_testis": false,
                  "nausea_or_vomiting": false,
                  "testicular_swelling": false
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "citation": {
                    "authors": "Barbosa JA, Tiseo BC, Barayan GA, Rosman BM, Torricelli FC, Passerotti CC, Srougi M, Retik AB, Nguyen HT",
                    "doi": "10.1016/j.juro.2012.10.056",
                    "id": "barbosa-2013",
                    "pmid": "23103800",
                    "source": "J Urol. 2013;189(5):1859-1864",
                    "title": "Development and initial validation of a scoring system to diagnose testicular torsion in children"
                  },
                  "components": [
                    {
                      "factor": "testicular_swelling",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "hard_testicle",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "absent_cremasteric_reflex",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "nausea_or_vomiting",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "high_riding_testis",
                      "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": "twist",
                  "formula_expression": "TWIST = testicular_swelling (true 2) + hard_testicle (true 2) + absent_cremasteric_reflex (true 1) + nausea_or_vomiting (true 1) + high_riding_testis (true 1); Barbosa 2013; max 7; 0-2 low, 3-4 intermediate, 5-7 high (cutoffs 2 and 5)",
                  "max_score": 7,
                  "risk": "low",
                  "score": 0
                },
                {
                  "citation": {
                    "authors": "Barbosa JA, Tiseo BC, Barayan GA, Rosman BM, Torricelli FC, Passerotti CC, Srougi M, Retik AB, Nguyen HT",
                    "doi": "10.1016/j.juro.2012.10.056",
                    "id": "barbosa-2013",
                    "pmid": "23103800",
                    "source": "J Urol. 2013;189(5):1859-1864",
                    "title": "Development and initial validation of a scoring system to diagnose testicular torsion in children"
                  },
                  "components": [
                    {
                      "factor": "testicular_swelling",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "hard_testicle",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "absent_cremasteric_reflex",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "nausea_or_vomiting",
                      "points": 0,
                      "present": false
                    },
                    {
                      "factor": "high_riding_testis",
                      "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": "twist",
                  "formula_expression": "TWIST = testicular_swelling (true 2) + hard_testicle (true 2) + absent_cremasteric_reflex (true 1) + nausea_or_vomiting (true 1) + high_riding_testis (true 1); Barbosa 2013; max 7; 0-2 low, 3-4 intermediate, 5-7 high (cutoffs 2 and 5)",
                  "max_score": 7,
                  "risk": "low",
                  "score": 0
                }
              ],
              "path": "/api/calc/twist"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "absent_cremasteric_reflex": {
                            "description": "Absent cremasteric reflex as assigned by the caller (Barbosa 2013). true scores 1. magent does not examine the patient.",
                            "type": "boolean"
                          },
                          "hard_testicle": {
                            "description": "Hard testicle as assigned by the caller (Barbosa 2013). true scores 2. magent does not examine the patient.",
                            "type": "boolean"
                          },
                          "high_riding_testis": {
                            "description": "High-riding testis as assigned by the caller (Barbosa 2013). true scores 1. magent does not examine the patient.",
                            "type": "boolean"
                          },
                          "nausea_or_vomiting": {
                            "description": "Nausea or vomiting as assigned by the caller (Barbosa 2013). true scores 1. magent does not take a symptom history.",
                            "type": "boolean"
                          },
                          "testicular_swelling": {
                            "description": "Testicular swelling as assigned by the caller (Barbosa 2013). true scores 2. magent does not examine the patient.",
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "testicular_swelling",
                          "hard_testicle",
                          "absent_cremasteric_reflex",
                          "nausea_or_vomiting",
                          "high_riding_testis"
                        ],
                        "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"
  }
}