Skip to main content
POST
https://api.neosantara.xyz
/
v1
/
batches
/
:batch_id
/
cancel
Cancel Batch
curl --request POST \
  --url https://api.neosantara.xyz/v1/batches/:batch_id/cancel \
  --header 'x-api-key: <api-key>'
{
  "id": "<string>",
  "object": "<string>",
  "endpoint": "<string>",
  "status": "<string>",
  "cancelled_at": 123,
  "request_counts": {
    "total": 123,
    "completed": 123,
    "failed": 123
  }
}
Cancel a batch job that is currently in progress. Once cancelled, the batch cannot be resumed.
batch_id
string
required
The ID of the batch to cancel (e.g., batch-abc123).

Returns

id
string
The ID of the cancelled batch.
object
string
The object type, which is always batch.
endpoint
string
The API endpoint that was used for the batch.
status
string
The batch status, which will be canceled.
cancelled_at
integer
The Unix timestamp when the batch was cancelled.
request_counts
object
Request statistics at the time of cancellation.
{
  "id": "batch-abc123",
  "object": "batch",
  "endpoint": "/v1/chat/completions",
  "status": "canceled",
  "cancelled_at": 1699566000,
  "request_counts": {
    "total": 100,
    "completed": 45,
    "failed": 2
  }
}