# Eat Sleep Console (ESC) Neonatal Opioid Withdrawal Assessment

> Eat Sleep Console (ESC) Neonatal Opioid Withdrawal Assessment 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 Grossman 2018 Eat, Sleep, Console functional assessment result for neonatal opioid withdrawal, returning well_managed or needs_increased_treatment based on three boolean clinical flags.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/eat_sleep_console
- 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/eat-sleep-console-esc-neonatal-opioid-withdrawal-assessment-bea8dd8c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yKyAK36_TSyB7lEh5ruEG

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 eat-sleep-console-esc-neonatal-opioid-withdrawal-assessment-bea8dd8c
```

Example prompt: Run the Grossman 2018 Eat Sleep Console assessment: the infant is eating adequately (eat_ok = true), sleeping undisturbed for at least an hour (sleep_ok = true), but cannot be consoled within 10 minutes (console_ok = false) — is this baby well-managed or does treatment need to be increased?

## When to prefer this

Use this endpoint when implementing or automating the Grossman 2018 Eat Sleep Console (ESC) functional assessment for neonatal opioid withdrawal syndrome (NOWS) management. Prefer this over Finnegan-based tools when the clinical protocol has adopted the ESC method. Ideal for EHR integrations, clinical decision support pipelines, or audit/research workflows that need a reliable, deterministic classification of well-managed vs. needs-increased-treatment based on the three ESC criteria.

## Known failure modes

- Missing required query parameters (eat_ok, sleep_ok, console_ok) returns a validation error
- Non-boolean values for parameters cause schema rejection
- Payment failure (x402) if USDC balance insufficient
- Misuse: caller attempts to use output as a morphine dosing recommendation (output is classification only)
- Confusion with modified Finnegan scoring — this is not the Finnegan or mFAS scale

## How this service works

Grossman 2018 Eat, Sleep, Console functional assessment. well_managed iff eat ≥1 oz per feed or breastfeed well, sleep undisturbed ≥1 hour, and console within 10 minutes if crying. needs_increased_treatment iff not well_managed (boolean only; not a morphine dose). Not modified Finnegan. Not the later ESC Care Tool item list. magent does not examine the infant. Not a diagnosis or medical device.

## Output

Returns a structured result indicating whether the infant is 'well_managed' (all three ESC criteria met: eat_ok, sleep_ok, and console_ok are all true) or 'needs_increased_treatment' (one or more criteria not met). This is a boolean classification only — not a morphine dose recommendation and 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": [
      "eat_ok",
      "sleep_ok",
      "console_ok"
     ],
     "properties": {
      "eat_ok": {
       "type": "boolean",
       "description": "Able to eat ≥1 oz per feed or breastfeed well, as assigned by the caller (Grossman 2018 Eat, Sleep, Console). true or false. magent does not observe feeding."
      },
      "sleep_ok": {
       "type": "boolean",
       "description": "Able to sleep undisturbed ≥1 hour, as assigned by the caller (Grossman 2018 Eat, Sleep, Console). true or false. magent does not observe sleep."
      },
      "console_ok": {
       "type": "boolean",
       "description": "Able to be consoled, if crying, within 10 minutes, as assigned by the caller (Grossman 2018 Eat, Sleep, Console). true or false. magent does not observe consolability."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/eat-sleep-console-esc-neonatal-opioid-withdrawal-assessment-bea8dd8c/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)
