Skip to main content
POST
/
v1
/
files
Upload a file
curl --request POST \
  --url https://api.zerogpu.ai/v1/files \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-api-key: <api-key>' \
  --header 'x-project-id: <api-key>' \
  --form purpose=batch \
  --form file='@example-file'
{
  "id": "file-0123456789abcdef012345",
  "object": "file",
  "bytes": 5000,
  "created_at": 1736290000,
  "filename": "input.jsonl",
  "purpose": "batch",
  "status": "processed",
  "expires_at": 1738882000
}

Documentation Index

Fetch the complete documentation index at: https://docs.zerogpu.ai/llms.txt

Use this file to discover all available pages before exploring further.

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
x-project-id
string
header
required

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.