メッセージバッチの結果を取得
GET/v1/messages/batches/{message_batch_id}/results
メッセージバッチの結果を.jsonlファイルとしてストリーミングします。
ファイルの各行は、メッセージバッチ内の単一リクエストの結果を含むJSONオブジェクトです。結果がリクエストと同じ順序であることは保証されません。結果とリクエストを照合するにはcustom_idフィールドを使用してください。
Message Batches APIの詳細については、ユーザーガイドをご覧ください。
Parameters
Returns
メッセージバッチの結果を取得
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: process.env["ANTHROPIC_API_KEY"] // This is the default and can be omitted
});
const betaMessageBatchIndividualResponse = await client.beta.messages.batches.results(
"message_batch_id"
);
console.log(betaMessageBatchIndividualResponse.custom_id);