?dry_run=true. The request goes through the same checks as the real call (your scope, plan, tool permissions, bans, project access) and the same validation of its body, and then answers what it would cost instead of running. Nothing is charged, generated or queued.
?dry_run=true and send the same body to run it.
What you get back
A model that cannot be priced in advance answers
credits: null.
Refused the same way
- A body the call would refuse answers the same
422, with the problems underdetails.errorsand, for a value the model does not take,details.violations. - A tool or model your organization switched off answers
403, as the call would. - A dry run needs the scope of the call itself:
api:writefor a call that creates something.
When there is no dry run
dry_run is a query parameter. These answer 422 with details.errors.dry_run instead of running the call:
dry_runon a call that charges nothing, or whose price is only known once it runs.- A value other than
trueorfalse. dry_runsent in the body instead of the query string.
GET /v2/stock/…/download) and a Magnific Move retry do not take dry_run.
A video upscale preview cannot be priced ahead: it bills the first frames of a trimmed source that only the run measures. Price the full upscale, or run the preview.