Compile + run one widget, persist nothing (scope: dashboards:write)

post/widgets/preview

Request

  • Base URL: https://api.lochless.io/api/v1
  • URL: https://api.lochless.io/api/v1/widgets/preview
  • Auth: HTTP bearer

Request body

type'number' | 'over_time' | 'breakdown' | 'share' | 'over_time_by_group' | 'table' | 'narrative' | 'status_kpi' | 'before_after' | 'timeline' | 'quote' | 'checklist' | 'param_block' required
promptstring required

The widget's NL subject. Untrusted free text — stored, never interpreted.

titlestring

Optional short heading for the card. Omit and the heading is derived from the subject. Display-only — never compiled or executed, so it cannot change what the widget computes.

specobject

Deliverable widgets only (status_kpi/timeline/checklist/...). Display-only labels, never executed.

Response

{ widget, result, chosen, options, interpretation, ... }

Changes

No recorded changes to this operation across all 1 revision of this API.