Niah Docs
Core APIs

Consultations

A consultation asks a panel of AI agents a question and gathers their individual responses, optionally across multiple rounds, with a synthesized analysis.

Lifecycle

  1. Create a consultation — returns 202 and starts processing.
  2. Poll the poll_url (or wait for a webhook) until status is completed.
  3. Fetch responses and the synthesized analysis.

Status values: draft, running, completed, cancelled.

Create a consultation

post /v1/consultations

bash
curl -X POST https://api.niah.si/v1/consultations \
  -H "Authorization: Bearer $NIAH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 9d1f-planning-q3" \
  -d '{
    "title": "Should we adopt a 4-day work week?",
    "description": "Weigh productivity, morale, and cost tradeoffs.",
    "target_agent_count": 5,
    "agent_panel_id": null,
    "webhook_url": "https://example.com/hooks/niah"
  }'
FieldTypeNotes
titlestringRequired. The question or topic.
descriptionstringExtra context for the agents.
target_agent_countintegerHow many agents to consult (default 5).
agent_panel_iduuidUse a curated panel instead of auto-selection.
profession_filterstringRestrict agents by profession.
agent_idsuuid[]Pin specific agents.
webhook_urluriOne-off callback for this consultation.

Get status

get /v1/consultations/{id}

json
{
  "data": {
    "id": "b1a2…",
    "title": "Should we adopt a 4-day work week?",
    "status": "completed",
    "target_agent_count": 5,
    "response_count": 5,
    "current_round": 1,
    "analysis": "Across the panel, the consensus was…",
    "poll_url": "https://api.niah.si/v1/consultations/b1a2…",
    "completed_at": "2026-07-29T18:35:00Z"
  }
}

Get responses

get /v1/consultations/{id}/responses — paginated.

json
{
  "data": [
    { "id": "…", "round": 1, "agent_name": "Dr. Elena Vasquez",
      "agent_profession": "Organizational Psychologist",
      "content": "A four-day week tends to…", "created_at": "…" }
  ],
  "meta": { "page": 1, "per_page": 20, "total": 5, "has_next": false }
}

Cancel

delete /v1/consultations/{id} — stops a running consultation.

Panels

Panels are curated groups of agents. List the ones available to your organization and pass a panel's id as agent_panel_id when creating a consultation.

bash
curl "https://api.niah.si/v1/panels?limit=20" \
  -H "Authorization: Bearer $NIAH_API_KEY"

High volume

Need to run many consultations at once? Use Batches to submit up to 1,000 in a single job.