Preview Run
Dry-run credit estimate for a workflow — no run is created.
Returns a per-node-type credit breakdown based on the workflow’s current
definition. No run is enqueued, no credits are charged, and the workflow
state is not modified. Use this before calling POST /runs to confirm
the expected cost. Equivalent to POST /estimate.
Authentication
AuthorizationBearer
Clerk JWT token
OR
AuthorizationBearer
Onepin live API key (op_live_...). Test and public keys are reserved in Phase 1.
Path parameters
workflow_id
Headers
X-Workspace-Id
Response
Successful Response
data
Pre-flight estimate range returned by POST /workflows/{id}/runs/preview.
min_credits ≤ owner balance is the run-start gate (don’t refuse runs that might fit).
FE displays “min-max credits” or single value if min == max.
meta
Errors
422
Unprocessable Entity Error

