Skip to main content

Upload

To upload a new dataset file:
Here’s a sample output:
The printed file-… identifier is the assigned file-id for this file object. Pass --json to get the full response body instead.

Parameters

Check

You can precheck that a file is structurally valid before uploading.
Here’s a sample output:
Pass --json to get the full structured report instead of the pass/fail summary:
For fine-tuning JSONL files, this command verifies UTF-8 encoding, that each non-empty line is parseable JSON, and that there is one JSON object per line, along with the minimum sample count and maximum file size. Schema-level validation (such as required fields and role ordering) is performed on the server when the file is used. The Files API surfaces any errors at that point.

List

To list previously uploaded files:

Retrieve

To retrieve the metadata of a previously uploaded file:
Here’s a sample output:

Retrieve content

To download a previously uploaded file:
Here’s a sample output:
You must pass either --output <DIRECTORY> to write the contents to disk under the file’s original filename, or --stdout to stream the contents to standard output.

Delete

To delete a previously uploaded file:
Here’s a sample output: