v1

latestOpenAPI 3.1.02026-07-2676188241.3 KB
Guided Documents

Generate a structured document

Generates a structured document using one of three template-supply paths: a stored template reference (optionally with runtime overrides), an ad-hoc assembly of stored sections, or a fully inline dynamic template. Exactly one of templateRef, assemblyTemplate, or dynamicTemplate must be provided. Context can combine different types or reference an interactionId to automatically fetch existing context to pass to the LLM. Note that discarded facts are not passed to the LLM. With the exception of the plain templateRef path (no overrides), every call creates a new auto-generated template aggregate that snapshots the resolved prompts as a drift-proof receipt, persisted for 30 days.

post/documents/

Headers

Tenant-Namestring required

Identifies a distinct entity within Corti's multi-tenant system. Ensures correct routing and authentication of the request.

Example:base

Identifies a distinct entity within Corti's multi-tenant system. Ensures correct routing and authentication of the request.

X-Corti-Retention-Policy'none'

Pass the optional X-Corti-Retention-Policy: none header to generate and return the document without saving it to the database. The response will be 200 with GuidedDocumentsCreateEphemeralResponse. Without the header the document is saved and the response is 201 with GuidedDocumentsCreateResponse.

Request body

OR
OR

Response

OK — document was generated but not saved (retention policy none).