A generated image, video or audio result has more than one lifetime. The model task can finish, its source file can remain available for a limited period, and a download link can expire sooner. An application that stores only the last URL loses the distinction between those events.
I work on VezAPI, an image, video and audio API service. Its public file-handling documentation is a useful concrete example of these boundaries. The design below concerns the application around the API: retaining a stable job record and deciding when a generated file becomes a durable asset.
Three clocks to keep apart
The VezAPI file handling guide describes uploaded input files as available for 24 hours from upload. Generated media is normally retained for 14 days from creation, subject to the selected model’s retention policy. Its temporary download URL is valid for 20 minutes, and only while the underlying source file remains available.
Those periods answer different questions. Input retention tells you when a reference file may stop being usable. Output retention tells you when a generated source may disappear. A temporary link controls access to that source for a shorter window. Refreshing a link does not recreate a source that has already expired.
Use an application-owned handle
Give each user operation an identifier owned by your application. Keep the external task identifier and original output reference attached to that record. A browser can then reopen the same job even when its current download link needs replacing.
The application job identifier and authenticated owner.
The external task identifier and the original result reference, preserved exactly.
Generation state, recorded separately from file-delivery state.
A storage asset identifier when a durable copy is actually ready.
These are suggested application fields, not a claim that every model returns the same JSON schema. Map each operation’s documented response deliberately. A task identifier also does not promise permanent access to the provider’s file; retain only the metadata your application needs, under its own retention policy.
Preserve the reference; control its exposure
Keep the returned source URL intact, including its query string. Removing a signature while cleaning up a URL can turn a valid reference into an unusable one. Do not reconstruct a file location from a display filename or assume a path is interchangeable with a download URL.
An intact URL may carry access information, so it belongs in owner-scoped backend data rather than general analytics, public logs or a shared page. When the user requests playback or a download, check that the job belongs to that user before returning the appropriate delivery reference.
Make durable storage a separate step
If the product promises a persistent library, move the file into storage your application controls before its source expires. Record the durable asset identifier only after the copy succeeds. Decide explicitly whether a failure should leave the job available for another delivery attempt, and show that state clearly.
For example, generation can be succeeded while delivery is copying, ready or failed. These are application states. A copy failure should not silently create another paid generation request. Likewise, receiving the same completion notification twice should not create two storage objects or two user-visible assets.
If the product only offers short-lived access, expose that limit clearly and avoid presenting a temporary provider URL as a permanent library entry. The storage policy should match the experience the application actually offers.
Recover the delivery step deliberately
A missing or expired temporary link is a reason to inspect the existing task and source availability. It is not enough evidence to rerun generation. If the source remains available, follow the documented download-link flow. If it has expired, report that condition and let the product decide whether a new generation is an explicit user action.
Exercise the design with simulated records: a link expires while the source is available; the source expires before copying; the same completion arrives twice; and another account requests the job. Each case should have a defined result without making a real model request.
The contract to read before implementing
The VezAPI file handling guide documents upload methods, original URL handling, file expiration and temporary downloads. Check the chosen model operation as well; input constraints and output details vary. Model usage is paid from prepaid credits, without a subscription. An application-owned asset pipeline remains the application’s responsibility.
This article was prepared with AI assistance and reviewed against the public documentation. It describes an integration design; no live generation or file-upload request was run for it.