# magent HIRI-MSM HIV Incidence Risk Index Calculator

> magent HIRI-MSM HIV Incidence Risk Index Calculator 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).

Computes the Smith 2012 seven-item HIV Incidence Risk Index for Men who have Sex with Men (HIRI-MSM), returning a total score (0–47) and a binary high-risk flag (at_or_above_10) based on caller-supplied behavioral and demographic inputs.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/hiri_msm
- 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/magent-hiri-msm-hiv-incidence-risk-index-calculator-d8d6ab72
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_X7pA9yIcGM-MUAz-04B9d

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 magent-hiri-msm-hiv-incidence-risk-index-calculator-d8d6ab72
```

Example prompt: Calculate the Smith 2012 HIRI-MSM HIV risk score for a 32-year-old man who had 8 male sex partners in the last 6 months, 1 HIV-positive partner, 3 instances of unprotected receptive anal sex, 0 insertive anal acts with an HIV-positive partner, no poppers use, and no amphetamine use.

## When to prefer this

Use this endpoint when you need a validated, published clinical risk score (Smith 2012 HIRI-MSM) for MSM HIV incidence risk stratification, especially in digital health, PrEP decision-support, or research pipelines. Prefer this over generic risk calculators when the specific seven-item Smith 2012 instrument is required and all behavioral inputs are available from a structured intake form or EHR.

## Known failure modes

- Missing any of the seven required query parameters returns a validation error
- Age below 18 or non-integer values rejected
- Negative integers for partner counts or act counts are invalid
- Boolean parameters passed as strings may fail parsing
- Network or payment (x402) errors return non-200 status codes

## How this service works

Smith 2012 seven-item HIV incidence risk index for MSM. Age 18-28=8, 29-40=5, 41-48=2, >=49=0; male partners 0-5=0, 6-10=4, >=11=7; HIV-positive partners 0=0, 1=4, >=2=8; unprotected receptive anal 0=0, >=1=10; insertive anal with HIV-positive partner 0-4=0, >=5=6; poppers 3; amphetamines 5. Range 0-47; at_or_above_10 when score >=10. Caller-assigned. Not a diagnosis or PrEP order.

## Output

Returns the numeric HIRI-MSM total score (integer 0–47), a boolean or flag indicating whether the score is at or above 10 (the high-risk cutoff per Smith 2012), and optionally the per-item component scores contributing to the total. This is not a diagnosis and does not constitute a PrEP prescription or clinical recommendation.

## 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": [
      "age",
      "male_sex_partners_6mo",
      "hiv_positive_male_partners_6mo",
      "unprotected_receptive_anal_6mo",
      "insertive_anal_hiv_positive_6mo",
      "poppers_6mo",
      "amphetamines_6mo"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (18-120). Smith 2012: 18-28 scores 8; 29-40 scores 5; 41-48 scores 2; ≥49 scores 0. Caller-assigned. magent does not take a sexual history."
      },
      "poppers_6mo": {
       "type": "boolean",
       "description": "Caller-assigned popper (amyl nitrate) use in the prior 6 months (Smith 2012). true or false. magent does not take a substance-use history."
      },
      "amphetamines_6mo": {
       "type": "boolean",
       "description": "Caller-assigned amphetamine use in the prior 6 months (Smith 2012). true or false. magent does not take a substance-use history."
      },
      "male_sex_partners_6mo": {
       "type": "integer",
       "description": "Caller-assigned number of male sex partners in the prior 6 months (0-500). Smith 2012: 0-5 scores 0; 6-10 scores 4; ≥11 scores 7."
      },
      "hiv_positive_male_partners_6mo": {
       "type": "integer",
       "description": "Caller-assigned number of HIV-positive male sex partners in the prior 6 months (0-500). Smith 2012: 0 scores 0; 1 scores 4; ≥2 scores 8. Do not drop this item."
      },
      "unprotected_receptive_anal_6mo": {
       "type": "integer",
       "description": "Caller-assigned times the person had unprotected receptive anal sex with a male partner of any HIV status in the prior 6 months (0-500). Smith 2012: 0 scores 0; ≥1 scores 10."
      },
      "insertive_anal_hiv_positive_6mo": {
       "type": "integer",
       "description": "Caller-assigned times the person had insertive anal sex with an HIV-positive male partner in the prior 6 months (0-500). Smith 2012: 0-4 scores 0; ≥5 scores 6."
      }
  
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-hiri-msm-hiv-incidence-risk-index-calculator-d8d6ab72/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)
