Retrieve and cancel Runs
Check results and request cancellation using the original Run ID.
View as Markdownpurrkey get-run
--wait starts after the initial submission or retrieval request, so it is not a total command timeout. Polling follows unresolved billing (HELD or REVIEW) and can continue after execution ends. When the wait expires, the CLI returns the latest Run and can exit successfully even if the Run is pending or failed. Check status, billing.status and result.status in the JSON response.
Retrieval does not make another purchase. If work is pending when the wait ends, keep the Run ID and retrieve it later. Use output only when result.status is available.
purrkey get-run --id '<runId>' --wait 30s --output result.json| Flag | Meaning |
|---|---|
| --id | Required original Run ID. |
| --wait | Bounded polling duration, default 0 and maximum 10m. |
| --output | Optional local file for the full JSON response. |
purrkey cancel-run
--id is required. The returned Run reports the current state; cancellation acceptance does not prove supplier cancellation or a refund. Use get-run afterward to read the final outcome and bill.
purrkey cancel-run --id '<runId>'Handle expired delivery
If result.status is expired, the Run and bill remain valid but the output is no longer deliverable. Polling does not renew file URLs. Do not create another paid Run merely to recover an expired result.