查询 batch
/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>execution_preferencestring请求路径:auto | provider | platform。
executionstring实际解析路径:provider | platform。
fallback_from_providerbooleanauto 从 provider 回落到 platform 时为 true。
input_file_idstring输入文件 ID。
client_modelstringJSONL 中的公网模型名。
output_file_idstring完成后的输出 JSONL。
error_file_idstring错误 JSONL(若有)。
usage_billingobjectfinalize 后的用量计费汇总(标价 vs 实付)。
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_atinteger估计截止时间(创建 + 24h)。platform 路径到期不会强行停任务。
metadataobjectStored metadata.
errorsobjectValidation or platform errors when failed.
errors.messagestringHuman-readable error message.
errors.codestringMachine-readable error code.
errors.typestringError category when returned.
errors.stagestringProcessing stage where the error occurred.
errors.upstream_http_statusintegerProvider HTTP status when the error came from upstream.
errors.upstream_messagestringProvider error message when available.
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.