メッセージバッチの結果を取得
GET/v1/messages/batches/{message_batch_id}/results
メッセージバッチの結果を.jsonlファイルとしてストリーミングします。
ファイルの各行は、メッセージバッチ内の単一リクエストの結果を含むJSONオブジェクトです。結果がリクエストと同じ順序であることは保証されません。結果とリクエストを照合するにはcustom_idフィールドを使用してください。
Message Batches APIの詳細については、ユーザーガイドをご覧ください。
Parameters
Returns
メッセージバッチの結果を取得
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
$client = new Client(apiKey: 'my-anthropic-api-key');
$messageBatchIndividualResponse = $client->messages->batches->resultsStream(
'message_batch_id', workspaceID: 'wrkspc_011CZkZaBF1tNoB5wlCeusgy'
);
var_dump($messageBatchIndividualResponse);