Estimate Template
Estimate the credit cost of running a workflow built from this template.
Returns a per-unit pricing guide expressed in credits per
unit_chars input characters (default 1,000). Because the template does not
contain the caller’s actual script, the estimate uses a synthetic fixed-length
input to compute a reproducible per-unit rate. Multiply by your expected
character count to project total cost.
The response distinguishes variable costs (scale with script length, e.g. synthesis) from fixed costs (apply once per run regardless of length). A node-level breakdown is included so callers can see which processing steps drive the cost.
Results are cached against the template definition and current pricing rates.
cache_status indicates whether this response was served from cache (hit),
computed fresh (miss), or recomputed because the definition or rates changed
(stale).
Visibility rules match GET /templates/{id} — own-workspace templates use the
draft definition; cross-workspace templates use the published snapshot.
Dual-auth: Bearer JWT or API key (scope templates:read).
Authentication
Onepin live API key (op_live_...). Test and public keys are reserved in Phase 1.
Path parameters
Case-sensitive 8-character base62 template identifier.
Headers
Response
Per-unit pricing guide for a visible template snapshot.
Templates do not contain the caller's final script. Costs are therefore
quoted for a fixed input-character unit plus fixed workflow overhead; cloned
workflows still use EstimateResponse once real script text exists.

