Files
Last updated
Last updated
"Files" are used to upload documents that can be used with features like "Fine-tuning", and "Inference Batch API". You need to first create the file object using "/v1/files" and get the presigned upload url. Then upload the file through presigned url.
Functionality | Max File Size | File Extension | File Format Required |
---|---|---|---|
The total storage limit for all files uploaded by a single organization is capped at 100 GB.
For Fine-tuning, we only support data in the OpenAI fine-tuning format.
The file upload API returns a presigned upload URL, and the file needs to be uploaded using this presigned URL. The presigned URL is valid for 2 hours.
In this step, you create a file object, which initializes the upload process by providing essential metadata like the file name and type. The "purpose" parameter can be set to either "fine-tune" or "batch".
Please note that when passing the "file_name" parameter, you need to include the file extension. Otherwise, we will default to treating it as a JSONL file.
Example Request:
Replace {{API_TOKEN}}
with your actual token.
Example Response:
Example Request:
Replace {{
DATA_FILE_PATH}}
with your actual data file path.
Example Response:
Fine-tuning
512 MB
.jsonl
Inference Batch API
100 MB
.jsonl