async deep research

POST /research

Deep research as a durable run. Returns a run_id immediately (202); the engine then iterates — answer, find the claims it couldn't ground, crawl the gap, re-answer — checkpointing every step. The run survives restarts, and pages crawled along the way stay in the index.

querystring
required — the research question (1–1000 chars)
webhookUrlstring (url)
optional — POSTed the terminal run state when the run closes
maxIterationsnumber
optional — answer→crawl→re-answer cycles (1–3, default 3)
request · curl
curl -sS https://api.ipnops.ai/research \
  -H "content-type: application/json" \
  -d '{ "query": "…" }'

# 202 ◂
{ "run_id": "run_5c1f…", "status": "queued" }
observe the run
# poll
GET /research/:id

# stream — SSE, resumes from Last-Event-ID
GET /research/:id/events
# events: started → iteration → gap → crawl → completed

# cooperative cancel
POST /research/:id/cancel

The terminal result is the same AnswerResult shape as /answer, plus iterations and pagesIndexed.