Documents API

PowerDB drafting

Free-text field notes in, a structured NETA form out.

Contents

The difference from /reports/generate is the input. There you supply structured readings; here you supply what the technician actually wrote down, and the endpoint does the extraction.

GET/ai/powerdb/types
POST/ai/powerdb
POST/ai/powerdb/reportreturns a file
FieldTypeDefault
equipment_notesstringRequired. Free text.
device_typestring"lv_breaker", one of the fifteen PowerDB slugs
output_formatstring"pdf" · also "excel" report only
include_summarybooleanfalse. Off here, so the download is immediate
job_name, client, technician, datestring""
curl
curl -X POST "$BASE/ai/powerdb" \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  --max-time 120 \
  -d '{
        "device_type": "mv_breaker",
        "equipment_notes": "15kV vacuum breaker, Cutler-Hammer VCP-W,
          megger at 5kV: A-B 8200, B-C 8050, C-A 8310 megohm.
          Ductor 100A: 42, 40, 44 microhm. Timing within spec.
          Contacts clean, no erosion. Passed."
      }'
client.ts
const form = await api('/ai/powerdb', {
  method: 'POST',
  body:   JSON.stringify({
    device_type:     'mv_breaker',
    equipment_notes: notes,
  }),
  // Node's fetch has no default timeout; browsers cap at ~300s.
  // Either way, be explicit. This call takes tens of seconds.
  signal: AbortSignal.timeout(120_000),
})
client.py
form = s.post(f"{BASE}/ai/powerdb", json={
    "device_type":     "mv_breaker",
    "equipment_notes": notes,
}, timeout=120).json()   # not the default 30
Extraction is a draft, not a reading

A value the model could not find is left empty rather than guessed, but a value it misreads will look exactly like one it read correctly. Every generated form is a drafting aid that a qualified person signs. That is not a disclaimer, it is how the endpoint is meant to be used. Do not build a pipeline that files these unreviewed.