Claude Platform Docs

删除消息批次

DELETE/v1/messages/batches/{message_batch_id}

删除消息批次。

消息批次只有在处理完成后才能删除。如果您想删除正在处理中的批次,必须先将其取消。

在我们的用户指南中了解有关 Message Batches API 的更多信息

Path parameters
message_batch_id: string

ID of the Message Batch.

Returns
DeletedMessageBatch object{ id, type }
id: string

ID of the Message Batch.

type: "message_batch_deleted"

Deleted object type.

For Message Batches, this is always "message_batch_deleted".

defaultmessage_batch_deleted
删除消息批次
curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID \
    -X DELETE \
    -H 'anthropic-version: 2023-06-01' \
    -H "X-Api-Key: $ANTHROPIC_API_KEY"
Returns Examples
Response 200
{
  "id": "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF",
  "type": "message_batch_deleted"
}