CLI
Async Runs and Status
Return right after submitting, and fetch the result later with tufty status.
Default: wait until done
After submitting, a tool command waits by default: it checks every 3 seconds until the run completes or fails, for up to --timeout seconds (900 by default).
- The
runIdis printed to stderr as soon as the run is submitted. - You can interrupt the wait at any time (Ctrl+C). The run keeps going on the server; pick it up later with
tufty status <runId> --wait. - Brief connection drops while polling (up to 3 in a row) are retried, so one network blip doesn't throw the whole wait away.
--no-wait
tufty product-promo --still ./sweater.jpg --resolution 1080P --duration 10 --no-waitReturns immediately after submitting:
{
"ok": true,
"result": {
"tool": "product-promo",
"runId": "9b1d4c7e-2f3a-4d8b-a6e5-7c0f1e2d3b4a",
"status": "running",
"outputs": []
}
}tufty status
tufty status 9b1d4c7e-2f3a-4d8b-a6e5-7c0f1e2d3b4a
tufty status 9b1d4c7e-2f3a-4d8b-a6e5-7c0f1e2d3b4a --wait
tufty status 9b1d4c7e-2f3a-4d8b-a6e5-7c0f1e2d3b4a --wait --timeout 1800 --format url| Flag | Description |
|---|---|
<runId> | The id returned when the run was submitted |
--wait | If the run is still going, poll until it completes or fails |
--timeout <seconds> | Maximum seconds to wait, 900 by default |
--format <mode> | json (default) or url |
Without --wait it checks once: a run in progress returns status: "running" with empty outputs; a finished run returns all output URLs.
tufty status has no --save. To download, take the URLs from --format url and fetch them yourself, or use --save on the tool command and let it wait.
Timeouts and failures
| Situation | Output |
|---|---|
Not finished within --timeout | code: "timeout", details.runId. The run isn't cancelled — run tufty status <runId> --wait later |
| Generation failed on the server | code: "task_failed"; details holds runId, tool and the server's error code serverCode |
--timeout must be a positive number; anything else returns usage_error (exit code 2).
In a script
RUN_ID=$(tufty image-to-video --still ./corgi.png --no-wait | jq -r '.result.runId')
tufty status "$RUN_ID" --wait --format url