亮色模式
Cancel batch
POST
https://api.openai.com/v1/batches/batch_abc123/cancelCancels an in-progress batch. The batch will be in status cancelling
for up to 10 minutes, before changing to cancelled
, where it will have partial results (if any) available in the output file.
Request
Header 参数
Authorization
string
必需
示例值:
Bearer $OPENAI_API_KEY
Content-Type
string
必需
示例值:
application/json
Request samples
返回响应
Success(200)
HTTP Code: 200
Content Type : JSONapplication/json
数据结构
id
string
必需
object
string
必需
endpoint
string
必需
errors
null
必需
input_file_id
string
必需
completion_window
string
必需
status
string
必需
output_file_id
null
必需
error_file_id
null
必需
created_at
integer
必需
in_progress_at
integer
必需
expires_at
integer
必需
finalizing_at
null
必需
completed_at
null
必需
failed_at
null
必需
expired_at
null
必需
cancelling_at
integer
必需
cancelled_at
null
必需
request_counts
object
必需
total
integer
必需
completed
integer
必需
failed
integer
必需
metadata
object
必需
customer_id
string
必需
batch_description
string
必需
示例
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "cancelling",
"output_file_id": null,
"error_file_id": null,
"created_at": 1711471533,
"in_progress_at": 1711471538,
"expires_at": 1711557933,
"finalizing_at": null,
"completed_at": null,
"failed_at": null,
"expired_at": null,
"cancelling_at": 1711475133,
"cancelled_at": null,
"request_counts": {
"total": 100,
"completed": 23,
"failed": 1
},
"metadata": {
"customer_id": "user_123456789",
"batch_description": "Nightly eval job",
}
}
最后修改时间: 10 天前