# Create 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-create-batch

# Create batch

POST

/

openai

/

v1

/

batches

Try it

Create batch

cURL

```
curl --request POST \
--url https://api.novita.ai/openai/v1/batches \
--header 'Authorization: &#x3C;authorization>' \
--header 'Content-Type: &#x3C;content-type>' \
--data '
{
"input_file_id": "&#x3C;string>",
"endpoint": "&#x3C;string>",
"completion_window": "&#x3C;string>"
}
'
```

200

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

After successfully [uploading the input file](/docs/api-reference/model-apis-llm-upload-batch-input-file), initiate a batch by using the ID of the uploaded file. Note that the completion window is set to a fixed duration of 48 hours and cannot be modified.

##

[​](#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}}.

##

[​](#request-body)

Request Body

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

input_file_id

string

required

ID of the uploaded input file containing batch requests

[​](#param-endpoint)

endpoint

string

required

The endpoint to use for batch processing. Available endpoints are `/v1/chat/completions` and `/v1/completions`.

Set the `endpoint` parameter to `/v1/chat/completions` or `/v1/completions` for OpenAI API compatibility.

[​](#param-completion-window)

completion_window

string

Time window for batch completion. The completion window is fixed at `48h` and is currently non-adjustable.

##

[​](#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-1)

endpoint

string

required

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

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

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-1)

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
