# magent PHQ-9 Depression Severity Calculator

> magent PHQ-9 Depression Severity 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 Kroenke 2001 PHQ-9 total score (0-27), severity band, and screen_ge_10 flag from nine caller-supplied DSM-IV symptom ratings (0-3 each).

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/phq_9
- 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-phq-9-depression-severity-calculator-5ea9e4ff
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Q-Q_tl2nBggwWYSG3FG2S

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-phq-9-depression-severity-calculator-5ea9e4ff
```

Example prompt: Score a PHQ-9 for me: anhedonia 2, depressed 3, sleep 2, energy 2, appetite 1, failure 1, concentration 2, psychomotor 0, self-harm 1 — give me the total score, severity band, and whether it screens positive (≥10).

## When to prefer this

Choose this endpoint when you need a deterministic, citable, machine-readable PHQ-9 score computation with severity banding and the screen_ge_10 flag for autonomous agent workflows, EHR integrations, or clinical documentation pipelines. It is not appropriate for GAD-7, PHQ-2, PHQ-8, or any other instrument. Prefer it over hand-coding PHQ-9 arithmetic when you need the full Kroenke 2001 citation, per-item component breakdown, and structured disclaimer in the response payload.

## Known failure modes

- Missing any of the nine required query parameters returns an error — all nine items (anhedonia, depressed, sleep, energy, appetite, failure, concentration, psychomotor, self_harm) must be supplied
- Integer values outside 0-3 range may cause validation errors or unexpected results
- Payment failure via x402 protocol will block the response (endpoint costs $0.005 USDC per call)
- Passing non-integer (e.g. float or string) values for symptom items will likely cause a schema error

## How this service works

Kroenke 2001 PHQ-9 from nine caller-assigned DSM-IV depression items as integers 0-3 (0 not at all, 1 several days, 2 more than half the days, 3 nearly every day). magent does not interpret the items. Total 0-27. Severity: 0-4 none_minimal, 5-9 mild, 10-14 moderate, 15-19 moderately_severe, 20-27 severe. Returns screen_ge_10 (score ≥10; this paper 88% sensitivity and 88% specificity for major depression). Not a diagnosis, not a treatment order, not GAD-7, and not PHQ-2/PHQ-8.

## Output

Returns a JSON object with: total PHQ-9 score (integer 0-27), severity string (none_minimal, mild, moderate, moderately_severe, or severe), screen_ge_10 boolean (true if score ≥10, with ~88% sensitivity and specificity for major depression per the citation), a per-item component breakdown showing each factor's value and points, the Kroenke 2001 academic citation (DOI, PMID, journal), the formula expression, and a disclaimer that this is not a medical device and a licensed clinician retains responsibility for patient care.

## 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": [
      "anhedonia",
      "depressed",
      "sleep",
      "energy",
      "appetite",
      "failure",
      "concentration",
      "psychomotor",
      "self_harm"
     ],
     "properties": {
      "sleep": {
       "type": "integer",
       "description": "Caller-assigned Kroenke 2001 PHQ-9 item 3 (integer 0-3): trouble falling or staying asleep, or sleeping too much. magent does not interpret the item."
      },
      "energy": {
       "type": "integer",
       "description": "Caller-assigned Kroenke 2001 PHQ-9 item 4 (integer 0-3): feeling tired or having little energy. magent does not interpret the item."
      },
      "failure": {
       "type": "integer",
       "description": "Caller-assigned Kroenke 2001 PHQ-9 item 6 (integer 0-3): feeling bad about yourself — a failure, or having let yourself or your family down. magent does not interpret the item."
      },
      "appetite": {
       "type": "integer",
       "description": "Caller-assigned Kroenke 2001 PHQ-9 item 5 (integer 0-3): poor appetite or overeating. magent does not interpret the item."
      },
      "anhedonia": {
       "type": "integer",
       "description": "Caller-assigned Kroenke 2001 PHQ-9 item 1 (integer 0-3): little interest or pleasure in doing things (0 not at all, 1 several days, 2 more than half the days, 3 nearly every day). magent does not interpret the item."
      },
      "depressed": {
       "type": "integer",
       "description": "Caller-assigned Kroenke 2001 PHQ-9 item 2 (integer 0-3): feeling down, depressed, or hopeless. magent does not interpret the item."
      },
      "self_harm": {
       "type": "integer",
       "description": "Caller-assigned Kroenke 2001 PHQ-9 item 9 (integer 0-3): thoughts that you would be better off dead, or of hurting yourself in some way. magent does not interpret the item."
      },
      "psychomotor": {
       "type": "integer",
       "description": "Caller-a
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/phq_9",
  "count": 2,
  "items": [
   {
    "score": 0,
    "formula": "phq_9",
    "citation": {
     "id": "kroenke-2001",
     "doi": "10.1046/j.1525-1497.2001.016009606.x",
     "pmid": "11556941",
     "title": "The PHQ-9: validity of a brief depression severity measure",
     "source": "J Gen Intern Med. 2001;16(9):606-613",
     "authors": "Kroenke K, Spitzer RL, Williams JBW"
    },
    "severity": "none_minimal",
    "max_score": 27,
    "components": [
     {
      "value": 0,
      "factor": "anhedonia",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "depressed",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "sleep",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "energy",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "appetite",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "failure",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "concentration",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "psychomotor",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "self_harm",
      "points": 0,
      "present": true
     }
    ],
    "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.",
    "screen_ge_10": false,
    "formula_expression": "PHQ-9 = anhedonia + depressed + sleep + energy + appetite + failure + concentration + psychomotor + self_harm; each caller-assigned 0-3; max 27"
   },
   {
    "score": 0,
    "formula": "phq_9",
    "citation": {
     "id": "kroenke-2001",
     "doi": "10.1046/j.1525-1497.2001.016009606.x",
     "pmid": "11556941",
     "title": "The PHQ-9: validity of a brief depression severity measure",
     "source": "J Gen Intern Med. 2001;16(9):606-613",
     "authors": "Kroenke K, Spitzer RL, Williams JBW"
    },
    "severity": "none_minimal",
    "max_score": 27,
    "components": [
     {
      "value": 0,
      "factor": "anhedonia",
      "points": 0,
      "present": true
     },
     {
      "value": 0,
      "factor": "depressed",
      "points": 0,
      "present": true
     },
 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-phq-9-depression-severity-calculator-5ea9e4ff/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)
