Who Controls Retention?
Request Payloads
Request I/O retention is controlled by theX-Fal-Store-IO header and handled by fal. No action is needed in your app code. See Request Payloads for details.
Content-Bearing Logs
fal captures application output fromstdout and stderr, including print() calls, Python logging, and error tracebacks. As the app owner, ensure your code and its dependencies avoid emitting customer content when your retention requirements prohibit storing it. Review exception messages and debug output as well as intentional application logs.
See Logging for how logs are captured and exposed.
Persistent Storage
Files written to the shared/data volume persist across requests, runner restarts, and deployments until you delete them. As the app owner, manage which files are written and when they are removed. Runner shutdown does not delete these files.
If customer content must not persist after processing, avoid writing it to /data or other persistent stores. Review library caches and intermediate files as well as final outputs. If your app uses KVStore or an external database or object store, manage that store’s retention separately.
Uploaded and Generated Media
Return generated files through toolkit types such asfal.toolkit.Image and fal.toolkit.File to apply the caller’s X-Fal-Object-Lifecycle-Preference, including expiration settings and initial_acl, to CDN uploads. See Controlling Access to Returned Files for implementation patterns. If your app enforces its own output ACL, preserve the caller’s expiration settings as shown there.
fal passes X-Fal-CDN-Token to your runner for CDN downloads and uploads on behalf of the API caller. Toolkit uploads use the caller’s CDN token automatically, so generated files belong to the caller. For custom uploads, see ACLs Inside a Serverless App.
Zero Data Retention (ZDR)
For Serverless workloads with ZDR requirements:- Have callers disable request-history storage.
- Avoid retaining customer content in application logs and persistent storage.
- Honor the caller’s CDN expiration and access preferences.