Skip to main content
The explain endpoint is the primary API surface of Heretic. You pass a session ID — generated by the @heretic-hq/collector package running in your user’s browser — and the edge returns a complete ruling: a verdict, the individual signals that fired, the evidence families that measured the session, and a human-readable summary you can surface in your own tooling.

Request

Method: GET
URL: https://edge.heretic.quest/e

Query Parameters

string
required
The session ID returned by the Heretic collector. The collector exposes this as a string after the measurement run completes. Example: 9f2c41ab.

Headers

string
required
Your Heretic API key, passed as a Bearer token: Bearer {your-api-key}. You can create keys at heretic.quest/dashboard/keys.

Code Examples

curl:
TypeScript (fetch):

Response

A successful 200 response returns a JSON object conforming to the Verdict Response Schema. The example below is a real session showing a contradicted verdict with two composite signals:

Session Expiry

Sessions expire 15 minutes after they are collected by the edge. If you request a session ID after that window, the API returns 404. Fetch the verdict promptly after your collector run completes — or immediately upon receiving the session ID from the client.
Do not store raw session IDs for delayed lookup. Either fetch the verdict at collection time and cache the result, or fetch within the 15-minute window. A cached verdict is permanent; an unfetched session is not.