Elimina Output
Endpoint: POST /v1/storages/delete
Elimina definitivamente uno o più output memorizzati. L’eliminazione di un output persistente interrompe la relativa fatturazione dello storage. L’eliminazione ha effetto immediato negli elenchi e nella fatturazione; il file sottostante viene rimosso in background. Batch fino a 50 con semantica di successo parziale.
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
Un array JSON di id degli output, presi da List Stored Outputs. Fino a 50 per richiesta.
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— id che sono stati eliminati. Scompaiono da List Stored Outputs e smettono immediatamente di generare addebiti per lo storage.rejected— id che non sono stati eliminati, ciascuno con un motivo.
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.