Delete Output
Endpoint: 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
| Header | Value | Required | Notes |
|---|---|---|---|
Authorization | Bearer YOUR_API_KEY | yes | Account API key. Required on every request. |
Content-Type | application/json | no | Optional. The body is always parsed as JSON; if sent, application/json is accepted. |
Request body
A JSON array of output ids, taken from List Stored Outputs. 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
{
"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
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. |
static_immutable | Platform-owned static asset — it cannot be deleted. |
Deletion is permanent
Deleted files cannot be recovered.
Up to 50 per call
Each request deletes at most 50 outputs. If you send more than 50 ids the whole request is rejected (HTTP 400) and nothing is deleted — split larger sets across several calls.