Charge abbrechen
POST
https://api.openai.com/v1/batches/batch_abc123/cancel
Abgebrochen
, bevor er in Abgebrochen
wechselt, wo Teilergebnisse (falls vorhanden) in der Ausgabedatei verfügbar sind.Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.openai.com/v1/batches/batch_abc123/cancel' \
--header 'Authorization: Bearer $OPENAI_API_KEY'
Response Response Example
{
"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",
}
}
Request
Header Params
Authorization
string
required
Example:
Bearer $OPENAI_API_KEY
Content-Type
string
required
Example:
application/json
Body Params multipart/form-data
object {0}
Responses
Modified at 2024-12-23 06:00:57