api reference

One index. Reach it over MCP or plain HTTP.

Every route returns typed, cited structure a model consumes directly. The MCP server is the front door most agents use; the same behaviour is one POST away for any runtime.

base url

All routes are served from the API host. Responses are JSON. Requests with a body are application/json.

base url
https://api.ipnops.ai
the primary interface

MCP server

A Streamable-HTTP, stateless MCP server at POST /mcp. Add one connector and six tools appear inside your runtime: ipnops_search, ipnops_answer, ipnops_extract, ipnops_research, ipnops_research_status, and ipnops_monitor. Each ships an outputSchema, so tool results arrive as typed structure — not text to re-parse.

~/.mcp/config
# one connector — Ipnops becomes an agent tool
{ "ipnops": {
    "transport": "http",
    "url": "https://api.ipnops.ai/mcp"
  } }
tools/list ◂ result
{ "tools": [
  { "name": "ipnops_search", "outputSchema": {…} },
  { "name": "ipnops_answer", "outputSchema": {…} },
  …extract, research, research_status, monitor
] }

A tools/call to answer returns the same AnswerResult shape documented under /answer as structuredContent.

grounded synthesis

POST /answer

Consolidates highlights into one grounded answer with Ipnops' own tiered reasoner. The response is the agent-native shape: marker-per-claim citations, a claims array with per-claim verdicts and evidence quotes, one calibrated confidence scalar, and a sufficiency verdict that says whether the evidence actually covered the question.

querystring
required — the question (1–1000 chars)
topKnumber
optional — highlights to synthesize over (1–20)
forceEscalateboolean
optional — skip the floor rung, use the flagship reasoner
request · curl
curl -sS https://api.ipnops.ai/answer \
  -H "content-type: application/json" \
  -d '{ "query": "who maintains sqlite?" }'
200 ◂ AnswerResult
{ "answer": "… [1] … [2]",
  "citations": [{ "marker": 1, "url": "…", "text": "…" }],
  "claims": [{ "text": "…", "verdict": "supported",
    "quotes": ["…"], "grounded": true }],
  "confidence": 0.84, "sufficiency": "supported",
  "conflicts": [], "grounding": "own-index", "tier": "floor" }

grounding is one of own-index, web, places, or none — the reach ladder falls through in that order and never fabricates when it misses. sufficiency is supported, conflicting (sources disagree — see conflicts), or insufficient (treat the answer as an abstain).

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.

standing queries

POST /monitor

Watch a question instead of asking it once. Each sweep re-answers the query and diffs the grounded claim set against the last snapshot — a deterministic normalized-text comparison, zero extra model calls. The webhook fires only when the facts change: rephrasing is silence, a new number is a signal.

querystring
required — the watched question (1–1000 chars)
webhookUrlstring (url)
optional — POSTed the claim diff + new answer on change
routes
POST /monitor      # register → 201 { monitor_id }
GET /monitor       # list
GET /monitor/:id   # one monitor + last snapshot
DELETE /monitor/:id
POST /monitor/run   # the cron target — sweep + diff
webhook ◂ on change
{ "monitor_id": "mon_9b2e…",
  "diff": { "addedClaims": ["…"], "removedClaims": ["…"],
           "confidenceDelta": -0.05 },
  "answer": "… [1]", "citations": […], "confidence": 0.81
}
growing the index

POST /index/seed

Grow the index. Pass exactly one of seed (crawl one domain) or query (fan a free-text query across the discovery ladder and crawl what it finds).

seedstring (url)
crawl one explicit domain — mutually exclusive with query
querystring
fan out a free-text query and crawl discovered URLs
maxPagesnumber
optional — page cap per crawl (1–200)
maxSeedsnumber
optional — discovered URLs to crawl for a query seed (1–50)
purgeboolean
optional — drop the index before crawling (clean reseed)
request · curl
curl -sS https://api.ipnops.ai/index/seed \
  -H "content-type: application/json" \
  -d '{ "query": "sqlite documentation", "maxSeeds": 5 }'
operations

Health & admin

GET/healthz

Liveness probe. Returns { status: 'ok' }.

GET/readyz

Readiness — reports sidecar + reasoner liveness.

POST/admin/migrate

Apply schema.sql (idempotent).

POST/index/purge

Drop the whole index.