バッチ
メッセージバッチを作成
メッセージバッチを取得
メッセージバッチの一覧
メッセージバッチをキャンセル
メッセージバッチを削除
メッセージバッチの結果を取得
Models
DeletedMessageBatch object{ id, type }
ID of the Message Batch.
type: "message_batch_deleted"Deleted object type.
Deleted object type.
For Message Batches, this is always "message_batch_deleted".
MessageBatch object{ id, archived_at, cancel_initiated_at, 7 more }
MessageBatchCanceledResult object{ type }
type: "canceled"
MessageBatchErroredResult object{ error, type }
error: ErrorResponse { error, request_id, type }
type: "errored"
MessageBatchExpiredResult object{ type }
type: "expired"
MessageBatchIndividualResponse object{ custom_id, result }This is a single line in the response .jsonl file and does not represent the response as a whole.
This is a single line in the response .jsonl file and does not represent the response as a whole.
custom_id: stringDeveloper-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.
Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order.
Must be unique for each request within the Message Batch.
result: MessageBatchResultProcessing result for this request.
Processing result for this request.
Contains a Message output if processing was successful, an error response if processing failed, or the reason why processing was not attempted, such as cancellation or expiration.
MessageBatchRequestCounts object{ canceled, errored, expired, 2 more }
canceled: numberNumber of requests in the Message Batch that have been canceled.
Number of requests in the Message Batch that have been canceled.
This is zero until processing of the entire Message Batch has ended.
errored: numberNumber of requests in the Message Batch that encountered an error.
Number of requests in the Message Batch that encountered an error.
This is zero until processing of the entire Message Batch has ended.
expired: numberNumber of requests in the Message Batch that have expired.
Number of requests in the Message Batch that have expired.
This is zero until processing of the entire Message Batch has ended.
processing: numberNumber of requests in the Message Batch that are processing.
Number of requests in the Message Batch that are processing.
succeeded: numberNumber of requests in the Message Batch that have completed successfully.
Number of requests in the Message Batch that have completed successfully.
This is zero until processing of the entire Message Batch has ended.
MessageBatchResult = MessageBatchSucceededResult { message, type } or MessageBatchErroredResult { error, type } or MessageBatchCanceledResult { type } or MessageBatchExpiredResult { type }Processing result for this request.
Processing result for this request.
Contains a Message output if processing was successful, an error response if processing failed, or the reason why processing was not attempted, such as cancellation or expiration.