Skip to content

Lifecycle & Expiry

Uploaded files have a finite lifetime. ai& cleans up expired files automatically and lets you delete files on demand.

Files are retained for 30 days after upload by default. You can set a shorter expiry on individual uploads where the SDK supports it, or delete files explicitly at any time.

Terminal window
curl -X DELETE https://api.aiand.com/v1/files/file-abc123 \
-H "Authorization: Bearer sk-..."

The file becomes inaccessible immediately. A subsequent GET returns 404.

Once a file passes its expires_at, it is removed automatically — bytes and metadata both. Subsequent reads return 404.

Once a file is deleted, any chat request that references its file_id returns an error. Deletion is not reversible — re-upload the file to use it again.