download_output
Download generated output files to a local directory after a generation succeeds. Specify the generation ID and optionally a destination path.
Instructions
Download every output file of a succeeded generation to a local directory.
Call this after generate(wait=true) or wait_for_generation reports
status succeeded. Output URLs may be signed and expire (~1 hour), so
download promptly. If the generation is still processing this returns a
VALIDATION error — call wait_for_generation(generation_id) first and
retry once it succeeds. Any non-succeeded status (including failed)
returns a VALIDATION error stating the current status; for a failed
generation the provider's reason is included in the details.
Args:
generation_id: The id returned by generate.
dest_dir: Target directory, created if missing (~ is expanded).
Defaults to the server's configured download directory
(PIXIO_DOWNLOAD_DIR, default ~/pixio-outputs).
Returns:
{"generation_id": str, "files": [absolute file paths], "dest_dir": str}
— files are named {generation_id[:8]}-{index}{ext} (id prefix
sanitized to filesystem-safe characters) with the extension inferred
from each URL or the downloaded content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dest_dir | No | ||
| generation_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||