Invoke a tool
Validates the input against the tool’s schema, checks that pricing_version is still
current, reserves the maximum charge (bounded by max_cost_usd and your budgets) and
runs the tool. The server waits up to wait_ms (default and maximum 25 seconds); a run
that is still going returns 202 and keeps running server-side — poll
GET /v1/runs/{run_id} instead of invoking again.
Send an Idempotency-Key header (or idempotency_key) to make retries safe: the same
key with the same request returns the original run with replayed: true and
billing.charge_is_new: false; the same key with a different request is rejected.
Requests rejected before a run is created (invalid input, stale pricing_version,
unknown tool) execute nothing and charge nothing. Runs blocked by balance, budgets or
limits are recorded with status BLOCKED and are not charged.
Authentication
Headers
Client-chosen key (at most 200 characters) that makes retries return the original run.
Request
From describe. A changed price is refused (PRICING_CHANGED) instead of charged.
Matches the tool’s input_schema (an object or an array).
Optional pin; refused with TOOL_VERSION_CHANGED if the tool changed.
Most you allow this call to cost. Default 0.50, lowered by budgets’ per-call maximums.
Groups runs of one agent task; session budgets apply.
Same as the Idempotency-Key header.
Response
The run finished (COMPLETED, FAILED, STOPPED or TIMED_OUT). Charges follow billing.reason.
Pass back as the tool’s cursor input for the next page (a new billed call).