Skip to main content
POST
Upload a file
Upload batch input JSONL before creating a batch.
  1. Set purpose to batch.
  2. Attach a .jsonl file (max 100 MB). Each line must match the JSONL format.
  3. Copy the returned id (e.g. file-…) into input_file_id on the create-batch playground.
Full reference: Files API.

Authorizations

x-api-key
string
header
required

Headers

x-project-id
string

Optional project identifier. Scopes the request to a specific project when provided.

Body

multipart/form-data
purpose
enum<string>
default:batch
required

Must be batch for batch input uploads.

Available options:
batch
file
file
required

JSONL file (validated when you create the batch, not at upload).

Response

File uploaded

id
string

Prefixed with file-.

object
enum<string>
Available options:
file
bytes
integer
created_at
integer
filename
string
purpose
enum<string>

Uploads use batch; batch results use batch_output.

Available options:
batch,
batch_output
status
enum<string>
Available options:
uploaded,
processed,
error
status_details
string
expires_at
integer
is_error
boolean

ZeroGPU extension. true on batch error output files only.