# Magent Denver HIV Risk Score (DHRS) Calculator

> Magent Denver HIV Risk Score (DHRS) 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-15).

Computes the full Haukoos 2012 Table 2 Denver HIV Risk Score from age, sex, ethnicity, and five behavioral/historical flags, returning an integer risk score in the range -14 to 81.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/dhrs
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/magent-denver-hiv-risk-score-dhrs-calculator-fae8e0b5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DcgnsqK0IGYljUlqU7X8g

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-denver-hiv-risk-score-dhrs-calculator-fae8e0b5
```

Example prompt: Calculate the full Haukoos 2012 Denver HIV Risk Score for a 35-year-old black male — sm is true, vi is false, rai is true, idu is false, and pht is true.

## When to prefer this

Use this endpoint when you need the complete, unabbreviated Haukoos 2012 Table 2 Denver HIV Risk Score — including all five behavioral flags (sm, vi, rai, idu, pht) — rather than an abbreviated variant. Prefer this over generic HIV risk tools when you need a deterministic, published, citable algorithm with a known score range (-14 to 81) for clinical decision support, triage, or research pipelines.

## Known failure modes

- Missing required query parameters (age, sex, ethnicity, or any of the five boolean flags) returns an error
- Age outside the integer range 18-120 may be rejected or yield unexpected scoring
- Invalid enum values for sex (not 'male'/'female') or ethnicity (not 'black'/'hispanic'/'white'/'other') return validation errors
- Non-boolean values for sm, vi, rai, idu, or pht cause parameter parse failures
- Payment not attached or insufficient USDC balance returns HTTP 402

## How this service works

Haukoos 2012 Table 2 FULL Denver HIV score (not abbreviated). Age bands, sex, ethnicity, and five caller-assigned flags (sm vi rai idu pht). Range -14 to 81. Caller-assigned. Not a diagnosis.

## Output

Returns an integer Denver HIV Risk Score computed from the Haukoos 2012 Table 2 algorithm, with a value between -14 and 81. Higher scores indicate greater estimated HIV risk based on the supplied demographic and behavioral parameters. This is not a diagnosis.

## 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",
      "sex",
      "ethnicity",
      "sm",
      "vi",
      "rai",
      "idu",
      "pht"
     ],
     "properties": {
      "sm": {
       "type": "boolean",
       "description": "Haukoos 2012 Table 2 item sm. Caller-assigned boolean. +22 if true. Magent docs map this to the paper's sex-with-a-male coefficient; magent does not take a sexual history."
      },
      "vi": {
       "type": "boolean",
       "description": "Haukoos 2012 Table 2 item vi. Caller-assigned boolean. -10 if true. Do not drop this item. Magent docs map this to the paper's vaginal-intercourse coefficient."
      },
      "age": {
       "type": "integer",
       "description": "Age in years (integer 18-120). Haukoos 2012 Table 2: <22 or >60 scores 0; 22-25 or 55-60 scores 4; 26-32 or 47-54 scores 10; 33-46 scores 12. Caller-assigned."
      },
      "idu": {
       "type": "boolean",
       "description": "Haukoos 2012 Table 2 item idu. Caller-assigned boolean. +9 if true. Magent docs map this to the paper's injection-drug-use coefficient."
      },
      "pht": {
       "type": "boolean",
       "description": "Haukoos 2012 Table 2 item pht. Caller-assigned boolean. -4 if true. Magent docs map this to the paper's past-HIV-testing coefficient."
      },
      "rai": {
       "type": "boolean",
       "description": "Haukoos 2012 Table 2 item rai. Caller-assigned boolean. +8 if true. Do not drop this item. Magent docs map this to the paper's receptive-anal-intercourse coefficient."
      },
      "sex": {
       "enum": [
        "female",
        "male"
       ],
       "type": "string",
       "description": "female or male as assigned by the caller (Haukoos 2012 Table 2 gender). female scores 0; male scores 21."
      },
      "ethnicity": {
       "enum": [
        "black",
        "hispanic",
        "white",
        "other"
       ],
       "type": "string",
       "description": "Caller-assigned 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-denver-hiv-risk-score-dhrs-calculator-fae8e0b5/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)
