파일 및 배치
메시지 배치 조회
메시지 배치의 상태 및 요청 수를 조회합니다.
개요
조직에서 생성한 메시지 배치의 상태, 요청 수 및 타임스탬프를 반환합니다. processing_status가 ended가 될 때까지 이 엔드포인트를 폴링한 다음, 결과를 가져오십시오.
참고 사항
processing_status는in_progress,canceling또는ended입니다.results_url은 배치가 종료될 때까지null입니다.- 존재하지 않거나 삭제된 배치는
404를 반환합니다. 아직 읽을 준비가 되지 않은 배치는409를 반환할 수 있으므로 나중에 다시 시도하십시오.
요청
curl -X GET "https://api.tokenlab.sh/v1/messages/batches/msgbatch_01ABC123" \
-H "x-api-key: sk-your-api-key" \
-H "anthropic-version: 2023-06-01"응답
{
"id": "msgbatch_01ABC123",
"type": "message_batch",
"processing_status": "ended",
"request_counts": {
"processing": 0,
"succeeded": 2,
"errored": 0,
"canceled": 0,
"expired": 0
},
"ended_at": "2026-11-01T10:20:00Z",
"created_at": "2026-11-01T10:00:00Z",
"expires_at": "2026-11-02T10:00:00Z",
"cancel_initiated_at": null,
"archived_at": null,
"results_url": "https://api.tokenlab.sh/v1/messages/batches/msgbatch_01ABC123/results"
}주요 필드
processing_statusstring
in_progress, canceling 또는 ended입니다.request_countsobject
processing, succeeded, errored, canceled 또는 expired 상태인 요청의 수입니다.ended_atstring|null
처리가 종료된 시간이며, 종료되지 않은 경우
null입니다.cancel_initiated_atstring|null
취소 요청이 수락된 시간이며, 취소되지 않은 경우
null입니다.results_urlstring|null
결과를 확인할 수 있는 URL이며, 아직 준비되지 않은 경우
null입니다.인증
BearerAuth AuthorizationBearer <token>
API 키 인증입니다. Dashboard > API > API Keys에서 API 키를 생성하거나 관리하십시오.
위치: header
경로 매개변수
message_batch_id*string
메시지 배치 식별자
응답
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json