Estimate Workflow
Estimate the credit cost of running a workflow without creating a run.
Computes a breakdown of expected credits per node type based on the
workflow’s current definition. No run is created, no credits are charged,
and no side effects occur. The optional request body accepts the same
run-scoped script_text/source_language overrides as POST /runs, so
an estimate that will be followed by a run with those overrides prices
the text that run will actually speak. Equivalent to POST /runs/preview;
prefer that path in new integrations as it is co-located with the run
lifecycle.
Authentication
Onepin live API key (op_live_...). Test and public keys are reserved in Phase 1.
Path parameters
Headers
Request
Run this workflow with this script text instead of the text saved in the workflow's source_script node. Applied to the run's definition snapshot only.
BCP-47 language of script_text (e.g. en-us). Optional; when omitted the saved source_language (or automatic detection) applies.
Response
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.

