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
- Create a consultation — returns
202and starts processing. - Poll the
poll_url(or wait for a webhook) untilstatusiscompleted. - 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"
}'| Field | Type | Notes |
|---|---|---|
title | string | Required. The question or topic. |
description | string | Extra context for the agents. |
target_agent_count | integer | How many agents to consult (default 5). |
agent_panel_id | uuid | Use a curated panel instead of auto-selection. |
profession_filter | string | Restrict agents by profession. |
agent_ids | uuid[] | Pin specific agents. |
webhook_url | uri | One-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.
Previous← Models & chat
NextWebhooks →