# Upload file - 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-upload-batch-input-file

# Upload file

POST

/

openai

/

v1

/

files

Try it

Upload file

cURL

```
curl --request POST \
--url https://api.novita.ai/openai/v1/files \
--header 'Authorization: ' \
--header 'Content-Type: ' \
--data '
{
"purpose": ""
}
'
```

200

```
{
"id": "",
"object": "",
"bytes": 123,
"created_at": 123,
"filename": "",
"purpose": "",
"metadata": {
"total_requests": 123
}
}
```

Upload the batch input file so that it can be correctly referenced when creating a batch.

##

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

file

file

required

The batch input file to be uploaded should be in `.jsonl` format, with each line detailing an API inference request.Each request must have a unique `custom_id` to identify inference results in the output file after batch processing. The parameters within the `body` field of each line are used as the actual inference request parameters for the endpoint.

All requests within a single batch JSONL file must target the same model. Do not mix requests for different models in one batch.

Here is an example of an input file containing two requests:

```
{"custom_id": "request-1", "body": {"model": "deepseek/deepseek-v3-0324", "messages": [{"role": "user", "content": "Hello, world!"}], "max_tokens": 400}}
{"custom_id": "request-2", "body": {"model": "deepseek/deepseek-v3-0324", "messages": [{"role": "system", "content": "You are a helpful assistant."},{"role": "user", "content": "Hello world!"}],"max_tokens": 1000}}
```

[​](#param-purpose)

purpose

string

required

The purpose of the uploaded file. For batch processing, this should be set to `batch`.Enum: `batch`

##

[​](#response)

Response

[​](#param-id)

id

string

required

The unique identifier of the uploaded file.

[​](#param-object)

object

string

required

The object type, which is always `file`.

[​](#param-bytes)

bytes

integer

required

The size of the uploaded file in bytes.

[​](#param-created-at)

created_at

integer

required

The Unix timestamp (in seconds) when the file was created.

[​](#param-filename)

filename

string

required

The name of the uploaded file.

[​](#param-purpose-1)

purpose

string

required

The purpose of the uploaded file.

[​](#param-metadata)

metadata

object

Additional metadata about the uploaded file.

Show properties

[​](#param-total-requests)

total_requests

integer

required

The total number of requests contained in the batch input file.

Last modified on October 22, 2025
