Files & Batches
Delete Message Batch
Deletes a Message Batch that has ended.
Overview
Delete a Message Batch that has ended. After deletion, the batch no longer appears in the list, and its status and results are no longer available (404).
Notes
- Delete only after the batch has ended and TokenLab has settled its usage. Before that, the request returns
409with error typeconflict_error. Cancel a batch that is still processing, wait until it ends, then delete it. - Deleting does not change what you were charged.
- Download the results before you delete the batch.
Request
curl -X DELETE "https://api.tokenlab.sh/v1/messages/batches/msgbatch_01ABC123" \
-H "x-api-key: sk-your-api-key" \
-H "anthropic-version: 2023-06-01"Response
{
"id": "msgbatch_01ABC123",
"type": "message_batch_deleted"
}Important fields
idstring
ID of the deleted batch.
typestring
Always
message_batch_deleted.Authorization
BearerAuth AuthorizationBearer <token>
API Key authentication. Create or manage API keys in Dashboard > API > API Keys.
In: header
Path Parameters
message_batch_id*string
Message batch identifier
Response
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json