> ## Documentation Index
> Fetch the complete documentation index at: https://opentrain.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Render Preview

> Render a saved page or ad-hoc content to HTML or Markdown with a loss report.

Renders either a saved page (optionally at a historical revision) or an ad-hoc canonical document you send inline — to `html` or `markdown`. Markdown output always carries the machine-readable loss report.

**Requirements:** `instructions:read`.

## Request

Provide **exactly one** of `content` or `pageId`.

<ParamField body="format" type="string" required>
  `html` or `markdown`.
</ParamField>

<ParamField body="content" type="object">
  A canonical document envelope to render without saving.
</ParamField>

<ParamField body="pageId" type="string">
  A saved page to render.
</ParamField>

<ParamField body="revisionNumber" type="number">
  Historical page revision (only with `pageId`).
</ParamField>

## Response

<ResponseField name="format" type="string">
  Echo of the requested format.
</ResponseField>

<ResponseField name="output" type="string">
  The rendered document.
</ResponseField>

<ResponseField name="lossReport" type="object | null">
  `{lossless, format, items}` — each item `{nodeId, nodeType, reason, severity: "INFO" | "DATA_LOSS"}`.
</ResponseField>
