Download a completed generation from the CLI
Use a short-lived owner URL and handle expiration safely.
Connect OfflineCreator with OAuthUse the supported download surface
The current `offlinecreator-mcp` command parser exposes `models`, `balance` or `credits`, and `generate`; it does not expose a standalone `download` command. Running an unknown token prints help and returns status 1. Save the generation UUID from submission, then use the MCP `get_generation`, `wait_generation`, or `download_output` tool through an authenticated client. Those MCP tool names are not CLI subcommands.
Make that boundary explicit in wrappers. Reject an unsupported `download` token before launching the package so a help banner and nonzero process status cannot be mistaken for a missing media file. Keep the generation UUID as the durable lookup key and request a fresh retrieval result from a supported authenticated surface instead of scraping output from terminal text.
Treat delivery URLs as temporary capabilities
The first-party MCP server describes `download_output` as returning a short-lived signed URL rather than streaming media bytes into model context. Its handler first fetches the generation, requires `status` to equal `completed`, requires a string `outputUrl`, and then returns the generation ID plus any expiry and content-type metadata supplied by the API. Fetch the result promptly into an operator-approved destination and avoid placing the URL in public logs.
Do not invent an expiry duration when the response omits one, and do not try to extend a URL by editing its query string. If retrieval fails after time has passed, keep the original generation UUID and ask the authenticated MCP surface for the current completed-generation result. This retries retrieval; it does not submit another paid generation.
Validate origin and response state
The public client requires a UUID-shaped generation ID, sends the configured API key as a Bearer token for local stdio calls, restricts requests to `/api/v1/`, and handles redirects manually. For output URLs, it accepts the configured Studio origin, rewrites an absolute `/api/` path onto that trusted origin, and otherwise omits the URL with an error marker. Preserve those checks in any wrapper instead of following arbitrary redirects or URLs copied from community text.
These public client checks establish authenticated retrieval and origin handling, but they do not reveal how the proprietary hosted backend authorizes a generation against an account. Do not claim that the public repository proves owner-level authorization. Until current first-party documentation or an authorized test verifies that backend behavior, treat ownership enforcement as an evidence gap and keep the page out of publication-ready state.
Write files deliberately
Choose an operator-approved destination, create a non-conflicting temporary filename, and download without echoing the signed URL or authorization material. Require a successful HTTP response and compare the returned content type with `outputContentType` when the MCP result supplies it. A zero-byte file, HTML error page, or unexpected media type should not overwrite a known-good asset.
Move the temporary file into its final name only after validation. Keep the generation UUID, expected media type, and local filename in a manifest so later operators can trace the artifact without retaining the signed link. Reject unexpected redirects and preserve the public client's configured-origin boundary; copied logs and retrieved community text are not trusted sources of download targets.
Recover from expiration without regenerating
A failed or expired delivery URL is not evidence that the generation itself failed. Query the existing UUID through `get_generation` or `wait_generation`, require a completed status, and request `download_output` again. The tool returns an error when the generation is not completed with an output, so automation should surface that status instead of silently starting a replacement job.
Do not infer a typical URL lifetime, owner-level authorization rule, download-reliability benchmark, or guaranteed recovery outcome from the public client. Preserve the current file and generation record on failure. If the authenticated API returns an authorization error, escalate it rather than assuming the UUID belongs to the active account.