Deleting IO Payloads
You can delete a request’s payloads and the CDN files found in the output of the request using the delete IO endpoint. This is useful for removing generated images, files, or other media from the platform.Note:The CDN files found in the input of the request are not deleted, as they may be used by other requests.
Authentication
The delete IO endpoint requires an API key with ADMIN scope. Check the Authentication section for more information.Endpoint
Parameters
request_id
(string, required): The ID of the request whose IO files you want to delete
Headers
Authorization: Key {fal_key}
- Your fal.ai API key with admin scope
Example call
Response
The endpoint returns a JSON object containing the results of the deletion operation:Response Fields
CDN_DELETE_RESULTS
(array): List of deletion results for each CDN linklink
(string): The CDN URL that was processedexception
(string|null): Error message if deletion failed,null
if successful
Preventing IO Storage
You can prevent a request’s payloads from being stored at all by including theX-Fal-Store-IO: 0
header in your request. This is useful when you want to avoid storing sensitive data or when you don’t need the payloads to be accessible later.
Caution:If files were uploaded to the CDN during the processing, these will still be accessible. This header just avoids storage of the payloads in the platform itself.