Skip to main content

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

PUT https://rest.alpha.fal.ai/requests/delete_io/{request_id}

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

curl --location --request PUT 'https://rest.alpha.fal.ai/requests/delete_io/{request_id}' \
--header 'Authorization: Key {KEY}'

Response

The endpoint returns a JSON object containing the results of the deletion operation:
{
  "CDN_DELETE_RESULTS": [
    {
      "link": "https://v3.fal.media/files/rabbit/VAi0muC9Zo3MbDXw5gzV6.png",
      "exception": null
    }
  ]
}

Response Fields

  • CDN_DELETE_RESULTS (array): List of deletion results for each CDN link
    • link (string): The CDN URL that was processed
    • exception (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 the X-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.

Example

curl --location --request POST 'https://queue.fal.run/fal-ai/fast-sdxl' \
--header "Authorization: Key $FAL_KEY" \
--header 'X-Fal-Store-IO: 0' \
--header 'Content-Type: application/json' \
--data '{
  "prompt": "A beautiful landscape"
}'
I