查询 batch
GET
/v1/batches/{batch_id}查询 batch 作业当前状态,含 request_counts 及 output/error 文件 ID(若已生成)。
轮询直至 status 为终态:completed、failed、expired 或 cancelled。
Authentication
Authorization Bearer
Path Parameters
batch_idstringrequiredBatch ID returned by POST /v1/batches.
Response
idstringBatch ID.
objectstringbatch
endpointstring/v1/chat/completions
statusenum<string>Available options: validating failed in_progress finalizing completed expired cancelling cancelled
input_file_idstringInput file ID.
output_file_idstringOutput JSONL file when completed.
error_file_idstringError JSONL file when present.
request_countsobjectrequest_counts.totalintegerrequest_counts.completedintegerrequest_counts.failedintegercreated_atintegerUnix timestamp.
in_progress_atintegerUnix timestamp when upstream started.
completed_atintegerUnix timestamp when completed.
failed_atintegerUnix timestamp when failed.
expired_atintegerUnix timestamp when expired.
cancelled_atintegerUnix timestamp when cancelled.
expires_atintegerUnix timestamp deadline.
metadataobjectStored metadata.
errorsobjectValidation or platform errors when failed.
Polling guidance
- Non-terminal: poll every 30–60 seconds, or use webhooks.
completed: downloadoutput_file_id(anderror_file_idif set).failed/expired: inspecterrorsand error file.
此页面对您有帮助吗?
上一篇
创建 batch
下一篇
列出 batch