Delete Output
POST
/v1/storages/delete Permanently deletes one or more stored outputs. Deleting a persistent output stops its storage billing. Deletion takes effect immediately in listings and billing; the underlying file is purged in the background. Batch up to 50 with partial-success semantics.
Headers
Section titled “Headers”Authorization Bearer YOUR_API_KEY required Account API key. Required on every request.
Content-Type application/json required The request body is JSON.
Request body
Section titled “Request body”A JSON array of output ids — taken from List Stored Outputs and sent as strings. Up to 50 per request.
curl -X POST "https://api.hiapi.ai/v1/storages/delete" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '["90216", "90215"]'Response
Section titled “Response”{ "code": 200, "message": "success", "data": { "accepted": ["90216"], "rejected": [ { "id": "90215", "reason": "pending_archiving" } ] }}accepted— ids that were deleted. They drop out of List Stored Outputs and stop accruing storage charges immediately.rejected— ids that were not deleted, each with a reason.
Rejection reasons
Section titled “Rejection reasons”reason | Meaning |
|---|---|
not_owned | No such output for this account. |
already_deleted | Output has already been deleted. |
pending_archiving | Output is still being written to storage — retry once it finishes. |
storage_op_pending | Another storage operation is already in progress for this output — retry later. |