v2

latestOpenAPI 3.1.02026-07-262937191.0 MB
files

Upload File

Upload a file that can be used across various endpoints.

The size of individual files can be a maximum of 512 MB. The Fine-tuning API only supports .jsonl files.

Please contact us if you need to increase these storage limits.

post/v1/files

Response

OK

idstring uuid required

The unique identifier of the file.

objectstring required

The object type, which is always "file".

bytesinteger required

The size of the file, in bytes.

created_atinteger required

The UNIX timestamp (in seconds) of the event.

filenamestring required

The name of the uploaded file.

purpose'fine-tune' | 'batch' | 'ocr' required
sample_type'pretrain' | 'instruct' | 'batch_request' | 'batch_result' | 'batch_error' required
num_linesinteger nullable
mimetypestring nullable
source'upload' | 'repository' | 'mistral' required
signaturestring nullable
expires_atinteger nullable
visibility'workspace' | 'user'

Example response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f09",
  "object": "file",
  "bytes": 13000,
  "created_at": 1716963433,
  "filename": "files_upload.jsonl"
}