Skip to content
English

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.

Authorization Bearer YOUR_API_KEY required

Account API key. Required on every request.

Content-Type application/json required

The request body is JSON.

A JSON array of output ids — taken from List Stored Outputs and sent as strings. Up to 50 per request.

Terminal window
curl -X POST "https://api.hiapi.ai/v1/storages/delete" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '["90216", "90215"]'
{
"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.
reasonMeaning
not_ownedNo such output for this account.
already_deletedOutput has already been deleted.
pending_archivingOutput is still being written to storage — retry once it finishes.
storage_op_pendingAnother storage operation is already in progress for this output — retry later.