POST /v1/validation
Submit information and evidence to determine what the evidence actually supports. Start with the executable Quickstart.
POST https://api.ivorleaf.io/v1/validation
X-API-Key: ivl_...
X-Ivorleaf-Client: api
Idempotency-Key: validation-example-001
Content-Type: application/json
Prefer: respond-async
Idempotency-Key is required: 8–128 letters, numbers, periods, underscores, colons, or hyphens. Prefer: respond-async is optional and recommended when your integration can handle accepted work.
Request
{
"information": {
"text": "H2O is the chemical formula for water."
},
"evidence": [
{
"text": "The chemical formula for water is H2O."
}
]
}
ValidationRequest has exactly information and evidence. information.text must be nonblank; evidence contains at least one item. Undeclared fields are rejected at every request level. Each evidence item may have source with optional title and url.
| Evidence form | Request item | Meaning |
|---|---|---|
| Supplied text | {"text":"The chemical formula for water is H2O."} | Evaluate the supplied material; omit URL or set it to null. |
| URL-only | {"source":{"url":"https://learn.microsoft.com/en-us/sql/t-sql/queries/where-transact-sql"}} | Acquire the URL and select material using information.text; text may be omitted or null. |
| Text plus URL | Nonblank text together with source.url | Acquire that URL using text as the compatibility retrieval hint. |
| Mixed | Separate supplied and URL-only items in one evidence array | Evaluate both kinds in their submitted order. |
An item without text or a URL is invalid. Empty or whitespace-only text is invalid even when a URL is present; use null or omission for URL-only evidence. Source URLs require permitted public destinations and organization acquisition permission. See evidence control and operational limits.
Without a supported source URL, evidence.text is supplied evidence material. With a supported public HTML source.url, server Source Inspection retrieves and inspects material that becomes authoritative; evidence.text is a retrieval hint. The hint cannot override successfully inspected material. Inspection failure fails closed, without trusting the hint. See Source Inspection for support boundaries.
URL-only and mixed request examples
Use an organization approved for acquisition. This complete URL-only request selects source material using the information text:
{
"information": {"text": "SQL Server supports the WHERE clause."},
"evidence": [
{"text": null, "source": {"url": "https://learn.microsoft.com/en-us/sql/t-sql/queries/where-transact-sql"}}
]
}
For mixed evidence, keep the supplied text and URL in separate items:
{
"information": {"text": "SQL Server supports the WHERE clause."},
"evidence": [
{"text": "The WHERE clause specifies the search condition for rows returned by a query."},
{"source": {"url": "https://learn.microsoft.com/en-us/sql/t-sql/queries/where-transact-sql"}}
]
}
These are request-shape examples, not a guarantee that an external page is currently retrievable or your organization permits the source. The returned inspected material determines support. Repeated source URLs and duplicate evidence do not manufacture independent corroboration.
Responses
| HTTP | Body | Action |
|---|---|---|
200 | ValidationResponse, status: "completed" | Read the determination and relationships. |
202 | ValidationInProgress, status: "in_progress", validation_id | Accepted and still active; retrieve with GET. |
When hybrid dispatch is enabled and authorized, fast completion can return 200; work still active at the 20-second sync boundary can return 202. The preference alone does not enable runtime dispatch; the current pilot can use bounded direct execution. Hybrid execution has a 60-second provider budget and 90-second hard deadline. Without the preference, synchronous qualified compatibility uses a 20-second provider timeout. See Async Execution.
Completed result
A completed response includes validation_id, status, determination, reason_code, reason, information, information_units, evidence, relationships, signals, and provenance.
information preserves the supplied information. Source-backed canonical evidence.text may contain inspected passages rather than the submitted hint. Duplicate evidence remains traceable through duplicate_of.
The exact determinations are supported, unsupported, conflicting, and uncertain. Relationships are supports, contradicts, partial, overstated, and unrelated. Read Determinations and Relationships.
Signals
grounding, relevance, conflict, and coverage are categorical summaries derived from the completed canonical graph. See Signals and Provenance.
Provenance
Provenance connects validation, information units, evidence, relationships, unit determinations, determination, and signals through canonical IDs. Public provenance does not promise private inspection proof fields.
Idempotency and usage
Same key plus same canonical request reuses execution according to state. A completed replay returns the stored result with zero inference, zero inspection, and zero additional VUs. Different payload with the same key returns 409. Read Idempotency and Validation Units.
Errors
The production schema declares 401, 403, 409, 422, 429, 500, 502, 503, and 504. Source Inspection failure is 502. Operational request-size enforcement can also return 413, which is not declared in this operation's OpenAPI responses; do not treat its absence from the schema as unlimited input. Errors never become an uncertain determination. See Errors and the authoritative production API Reference.