AION
/Substrate Codex
Computational APIsEndpoint Specification
POST

/v1/query

Submits an analytical inquiry to the AION reasoning engine. Performs multi-hop relational evidence traversals, temporal filtering, contradiction extraction, and returns the strict 13-field Answer Contract.

Request Headers & Body

Headers
X-AION-Key: aion_live_... (Required)
Content-Type: application/json
PropertyTypeDescription
questionstringThe natural language question to interrogate across the substrate. (Required).
domainstring (enum)Target domain: education, economy, health, politics, governance, or all. Default: education.
timeRangeobjectExplicit temporal observation window: { start: ISOString, end: ISOString }.
requireContradictionsbooleanWhether to enforce bilateral contradiction detection between opposing claims. Default: true.
syncbooleanIf true, waits up to 8000ms for synchronous resolution before falling back to HTTP 202.

HTTP Response Status Codes

200 OKSynchronous Analytical Synthesis

Query completed immediately. Response body contains the full 13-field Answer Contract.

202 AcceptedAsynchronous Computation Dispatched

Query dispatched to background reasoning engine. Includes Location header and resultUrl for polling.

422 Unprocessable EntityEpistemic Failure

Triggered when a query violates constitutional laws (e.g. asking for population claims without census data, or asking outside temporal bounds).

GET

/v1/query/{queryId}/result

Poll this endpoint to retrieve completed results for asynchronous queries. Returns { status: "processing" } until ready, followed by the complete Answer Contract.

Next Reference
Longitudinal Change & Signals API
Explore Longitudinal APIs →