# Cancel batch - Documentation

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown is available with `Accept: text/markdown` and `.md` URL variants.

Source: /docs/api-reference/model-apis-llm-cancel-batch

# Cancel batch

POST

/

openai

/

v1

/

batches

/

{batch_id}

/

cancel

Try it

Cancel batch

cURL

```
curl --request POST \
--url https://api.novita.ai/openai/v1/batches/{batch_id}/cancel \
--header 'Authorization: ' \
--header 'Content-Type: '
```

200

```
{
"id": "",
"object": "",
"endpoint": "",
"input_file_id": "",
"output_file_id": "",
"error_file_id": "",
"completion_window": "",
"in_progress_at": {},
"expires_at": {},
"finalizing_at": {},
"completed_at": {},
"failed_at": {},
"expired_at": {},
"cancelling_at": {},
"cancelled_at": {},
"status": "",
"errors": "",
"version": 123,
"created_at": "",
"updated_at": {},
"created_by": "",
"created_by_key_id": "",
"remark": "",
"total": 123,
"completed": 123,
"failed": 123,
"metadata": {},
"request_counts": {
"total": 123,
"completed": 123,
"failed": 123
}
}
```

##

[​](#request-headers)

Request Headers

[​](#param-content-type)

Content-Type

string

required

Enum: `application/json`

[​](#param-authorization)

Authorization

string

required

Bearer authentication format, for example: Bearer {{API Key}}.

##

[​](#path-parameters)

Path Parameters

[​](#param-batch-id)

batch_id

string

required

The unique identifier of the batch job to check.

##

[​](#response)

Response

[​](#param-id)

id

string

required

A unique identifier for the batch job.

[​](#param-object)

object

string

required

The object type, which is always `batch`.

[​](#param-endpoint)

endpoint

string

required

The API endpoint that the batch job is using for processing requests.

[​](#param-input-file-id)

input_file_id

string

required

The ID of the input file containing the batch requests.

[​](#param-output-file-id)

output_file_id

string

required

The ID of the output file containing the batch results. Empty until the batch is completed.

[​](#param-error-file-id)

error_file_id

string

required

The ID of the error file containing any errors that occurred during batch processing. Empty until errors occur.

[​](#param-completion-window)

completion_window

string

required

The time window for batch completion. Currently fixed at `48h`.

[​](#param-in-progress-at)

in_progress_at

string | null

The timestamp when the batch started processing. Null if not yet started.

[​](#param-expires-at)

expires_at

string | null

The timestamp when the batch will expire. Null if not set.

[​](#param-finalizing-at)

finalizing_at

string | null

The timestamp when the batch started finalizing. Null if not yet finalizing.

[​](#param-completed-at)

completed_at

string | null

The timestamp when the batch was completed. Null if not yet completed.

[​](#param-failed-at)

failed_at

string | null

The timestamp when the batch failed. Null if not failed.

[​](#param-expired-at)

expired_at

string | null

The timestamp when the batch expired. Null if not expired.

[​](#param-cancelling-at)

cancelling_at

string | null

The timestamp when the batch started cancelling. Null if not cancelling.

[​](#param-cancelled-at)

cancelled_at

string | null

The timestamp when the batch was cancelled. Null if not cancelled.

[​](#param-status)

status

string

required

The current status of the batch job.Available statuses:

- `VALIDATING` - The input file is being validated before the batch can begin

- `PROGRESS` - Batch is in progress

- `COMPLETED` - Batch processing completed successfully

- `FAILED` - Batch processing failed

- `EXPIRED` - Batch exceeded deadline

- `CANCELLING` - Batch is being cancelled

- `CANCELLED` - Batch was cancelled

[​](#param-errors)

errors

string

Error messages if any errors occurred during batch processing.

[​](#param-version)

version

integer

required

The version number of the batch job.

[​](#param-created-at)

created_at

string

required

The timestamp when the batch job was created.

[​](#param-updated-at)

updated_at

string | null

The timestamp when the batch job was last updated. Null if never updated.

[​](#param-created-by)

created_by

string

required

The unique identifier of the user who created the batch job.

[​](#param-created-by-key-id)

created_by_key_id

string

required

The API key ID used to create the batch job.

[​](#param-remark)

remark

string

Optional remark or note for the batch job.

[​](#param-total)

total

integer

required

The total number of requests in the batch.

[​](#param-completed)

completed

integer

required

The number of completed requests in the batch.

[​](#param-failed)

failed

integer

required

The number of failed requests in the batch.

[​](#param-metadata)

metadata

object | null

Additional metadata associated with the batch job. Null if no metadata is provided.

[​](#param-request-counts)

request_counts

object

required

Detailed request count information.

Show properties

[​](#param-total-1)

total

integer

required

The total number of requests in the batch.

[​](#param-completed-1)

completed

integer

required

The number of successfully completed requests.

[​](#param-failed-1)

failed

integer

required

The number of failed requests.

Last modified on August 12, 2025
