Last updated 7 months ago
Was this helpful?
OpenAI
The ID of the batch to cancel.
curl https://api.portkey.ai/v1/batches/batch_abc123/cancel \ -H "x-portkey-api-key: $PORTKEY_API_KEY" \ -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \ -H "Content-Type: application/json" \ -X POST
Batch is cancelling. Returns the cancelling batch's details.
{ "id": "text", "object": "batch", "endpoint": "text", "errors": { "object": "text", "data": [ { "code": "text", "message": "text", "param": "text", "line": 1 } ] }, "input_file_id": "text", "completion_window": "text", "status": "validating", "output_file_id": "text", "error_file_id": "text", "created_at": 1, "in_progress_at": 1, "expires_at": 1, "finalizing_at": 1, "completed_at": 1, "failed_at": 1, "expired_at": 1, "cancelling_at": 1, "cancelled_at": 1, "request_counts": { "total": 1, "completed": 1, "failed": 1 }, "metadata": {} }