获取批处理任务详情
curl --request GET \
--url https://api.moonshot.cn/v1/batches/{batch_id} \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"object": "batch",
"endpoint": "<string>",
"input_file_id": "<string>",
"completion_window": "<string>",
"created_at": 123,
"request_counts": {
"completed": 123,
"failed": 123,
"total": 123
},
"output_file_id": "<string>",
"error_file_id": "<string>",
"in_progress_at": 123,
"expires_at": 123,
"finalizing_at": 123,
"completed_at": 123,
"failed_at": 123,
"cancelling_at": 123,
"cancelled_at": 123,
"metadata": {}
}获取批处理任务详情
获取指定批处理任务的状态和详细信息。
GET
/
v1
/
batches
/
{batch_id}
获取批处理任务详情
curl --request GET \
--url https://api.moonshot.cn/v1/batches/{batch_id} \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"object": "batch",
"endpoint": "<string>",
"input_file_id": "<string>",
"completion_window": "<string>",
"created_at": 123,
"request_counts": {
"completed": 123,
"failed": 123,
"total": 123
},
"output_file_id": "<string>",
"error_file_id": "<string>",
"in_progress_at": 123,
"expires_at": 123,
"finalizing_at": 123,
"completed_at": 123,
"failed_at": 123,
"cancelling_at": 123,
"cancelled_at": 123,
"metadata": {}
}完整的调用示例请参考 Batch API 指南。
授权
路径参数
批处理任务的 ID
响应
批处理任务详情
批处理任务的唯一标识符
对象类型,固定为 batch
示例:
"batch"
请求端点
输入文件 ID
任务处理时间窗口
当前状态:validating(校验中)、failed(校验失败)、in_progress(执行中)、finalizing(准备结果中)、completed(已完成)、expired(已过期)、cancelling(取消中)、cancelled(已取消)
可用选项:
validating, failed, in_progress, finalizing, completed, expired, cancelling, cancelled 创建时间(Unix 时间戳)
Show child attributes
Show child attributes
处理成功的结果文件 ID
处理失败的错误文件 ID
开始执行时间(Unix 时间戳)
过期时间(Unix 时间戳)
开始准备结果的时间(Unix 时间戳)
完成时间(Unix 时间戳)
校验失败时间(Unix 时间戳)
发起取消时间(Unix 时间戳)
取消完成时间(Unix 时间戳)
自定义元数据
Show child attributes
Show child attributes
此页面对您有帮助吗?
⌘I