Files

Upload a file that can be used across various endpoints. The Batch API only supports `.jsonl` files up to 100 MB in size. The input also has a specific required [format](/docs/batch). Please contact us if you need to increase these storage limits.

Changed on
post/openai/v1/files

Request

  • Base URL
    https://api.groq.com
  • URL
    https://api.groq.com/openai/v1/files
  • Auth
    HTTP bearer

Request body multipart/form-data

filestring binary required

The File object (not file name) to be uploaded.

purpose'batch' required

The intended purpose of the uploaded file. Use "batch" for Batch API.

Response

OK

idstring

The file identifier, which can be referenced in the API endpoints.

bytesinteger

The size of the file, in bytes.

created_atinteger

The Unix timestamp (in seconds) for when the file was created.

filenamestring

The name of the file.

object'file'

The object type, which is always file.

purpose'batch' | 'batch_output'

The intended purpose of the file. Supported values are batch, and batch_output.

Changes