Fine-tuning is not yet supported.
Objects
The FileObject
Most file endpoints return aFileObject describing an uploaded file.
Create file
file
file
The file to be uploaded.
purpose
purpose
The intended purpose of the file. Can be
"batch" or "fine-tune" for upload, but only "batch" is currently supported.expires_after (optional)
expires_after (optional)
Controls how long the file remains available. An object with two fields:
anchor(optional) — must be"created_at". The expiry is measured from when the file is created. Defaults to"created_at".seconds(optional) — the number of seconds the file stays available after the anchor. An integer between3600(1 hour) and2592000(30 days). Defaults to2592000(30 days).
List files
after (optional)
after (optional)
A pagination cursor. The returned list starts from the object right after the file with this
id. If omitted, the list starts from the first file.limit (optional)
limit (optional)
An integer between
1 and 10000. The returned list will have at most limit elements. Defaults to 10000.order (optional)
order (optional)
Sort order by
created_at, either "asc" (ascending) or "desc" (descending).purpose (optional)
purpose (optional)
Only returns files of the given purpose. If omitted, files are not filtered by purpose.
Retrieve a file
file_id
file_id
The
id of the file to retrieve.Retrieve file content
file_id
file_id
The
id of the file whose content to retrieve.Delete a file
file_id
file_id
The
id of the file to delete.FileDeleted object with the following fields: