Skip to main content
POST
/
v1
/
files
Upload File
curl --request POST \
  --url https://api.example.com/v1/files \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form purpose=assistants
{
  "id": "<string>",
  "object": "<string>",
  "bytes": 123,
  "created_at": 123,
  "expires_at": 123,
  "filename": "<string>",
  "purpose": "assistants"
}

Documentation Index

Fetch the complete documentation index at: https://docs.getimpala.ai/llms.txt

Use this file to discover all available pages before exploring further.

Body

multipart/form-data
file
file
required

The File object (not file name) to be uploaded.

purpose
enum<string>
required

The intended purpose of the uploaded file.

Available options:
assistants,
batch,
fine-tune,
vision,
user_data,
evals
expires_after
object

The expiration policy for a file. By default, files with purpose=batch expire after 30 days and all other files are persisted until they are manually deleted.

Response

200 - application/json

Successful Response

id
string
required

The file identifier, which can be referenced in the API endpoints.

object
string
required

The object type, which is always file.

Allowed value: "file"
bytes
integer
required

The size of the file, in bytes.

created_at
integer
required

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

expires_at
integer | null
required

The Unix timestamp (in seconds) for when the file will expire.

filename
string
required

The name of the file.

purpose
enum<string>
required

The intended purpose of the file. Supported values are assistants, assistants_output, batch, batch_output, fine-tune, fine-tune-results, vision, and user_data.

Available options:
assistants,
assistants_output,
batch,
batch_output,
fine-tune,
fine-tune-results,
vision,
user_data