Skip to main content
The Files API provides storage for the JSONL input files that power Meliai’s Batch API. Before you can create a batch job, you must upload a JSONL file containing all the individual inference requests you want to process. Meliai stores the file on your behalf, returns a file_id, and lets you list, inspect, download, and delete your files at any time. All files are scoped to your API key and never leave EU infrastructure.

Endpoints


Upload a File

Upload a JSONL file that will serve as input to a batch job. The request must be sent as multipart/form-data. POST /v1/files
file
required
The JSONL file to upload. Each line must be a valid JSON object representing a single inference request. See the Batch API input format for the required schema.
string
required
The intended use for the file. Currently the only accepted value is "batch".
The response includes the id field you pass to POST /v1/batches as input_file_id.

List Files

Retrieve all files uploaded to your account, ordered by creation time. GET /v1/files

Get File Metadata

Retrieve metadata for a specific file without downloading its content. GET /v1/files/{id}

Download File Content

Download the raw content of a file. Use this to retrieve output JSONL files once a batch job has completed. GET /v1/files/{id}/content

Delete a File

Permanently delete a file from your account. This action cannot be undone. Deleting a file that is referenced by an active batch job will cause that job to fail. DELETE /v1/files/{id}
A successful deletion returns a confirmation object:
Deleting an input file while a batch job referencing it is still in_progress will cause the batch to transition to failed. Always wait for batch jobs to complete before deleting their associated input files.