Preview what a profile would extract from a text (nothing is stored)
Changed onRun the extraction pipeline on content synchronously and return the facts a real ingestion would create — with their POT score, provenance, classification and (when scope-aware) scope fields — without persisting anything: no facts, no Document, no job, no vectors, no edges. The only durable trace is the usage event (operation=extraction_preview), which counts against the workspace's monthly token quota like an ingestion.
Profile: pass profile_id (a stored profile of this workspace, snapshotted exactly as /ingest does) or profile (an inline lever body, applied once and never stored — iterate on levers before saving them). The response's profile_applied says which levers shaped the extraction and where they came from.
What it does not do: constitution edge detection and score propagation (score_stage is initial, edges is null), and deduplication against the facts already in the POT (dedup_scope is batch+constitution), and the near-duplicate judge (a similar fact is discarded only when its text is identical; the others are listed in extraction_audit.near_duplicates_kept as undecided, no_judge), so a real ingestion may keep fewer facts than shown.
Limits: content at most 12288 characters (413), 45 s server-side ceiling (504), 4 concurrent previews per API process (429) and a per-integrator route limit on top of the global one (429). A chunk whose extraction fails is reported in errors[] with partial: true; when nothing at all could be extracted the call fails with 502 and the same error code a job would carry.
Error shapes: the gates this route shares with /ingest (404 POT, 422 PROFILE_NOT_FOUND, 429 TOKEN_QUOTA_EXCEEDED, the rate limiter's 429) answer {"detail": ...} like that route; the preview's own gates (413, 429 PREVIEW_CONCURRENCY_LIMIT, 500, 502, 503 LLM_NOT_CONFIGURED, 504) answer the {"error": {code, message, fix, retryable, ...}} envelope.
Request
- Base URLhttps://api.scipot.ai (the document declares no server; this is the origin it was published from)
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Headers
Optional contributor (UUID) the usage events are attributed to, as on /ingest. A value that is not an active contributor of the workspace is ignored; billing never depends on it.
Request body
Example request
{
"content": "# Master Services Agreement\n\nThe liability cap is 12 months of fees.",
"profile": {
"business_relevance": "Liability caps, SLAs and termination rights.",
"granularity": "fine",
"language": "en",
"name": "Legal (draft)"
}
}Response
The facts the pipeline would create; nothing was stored
Example response
{
"document_context": {
"document_type": "technical",
"key_entities": [
"POT Index",
"SciPot",
"certainty scores",
"facts",
"provenance"
],
"language": "en",
"main_themes": [
"scoring system",
"knowledge validation",
"certainty measurement"
],
"title": "POT Index Specification"
},
"extraction_audit": {
"discarded": 8,
"discarded_facts": [],
"kept": 12,
"total_extracted": 20
}
}Changes
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- info
- warning
added the new
restatesenum value to the///response property for the response status - info
added the optional property
///to the response with the status - info
added the optional property
///to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- warning