Authentication
Both APIs authenticate with headers, not a bearer token:401; a key that is invalid, inactive, or does
not belong to the supplied project returns 403; an organization with no
balance and no free credits returns 429 with insufficient_quota. See the
Errors reference for the complete list.
Endpoints
The Files API stores the JSONL that drives a batch:
The Batches API submits and monitors the jobs:
Both APIs are wire-compatible with OpenAI’s
/v1/files and /v1/batches, so
the official SDKs work once pointed at the ZeroGPU base URL. The ZeroGPU
specifics are: completion_window must be "24h", endpoint must be
/v1/chat/completions (the only batchable endpoint),
files are soft-deleted, and error files carry an is_error flag (below).
The File object
Returned by upload and retrieve, and insidedata[] on list.
Output and error files are both written with
purpose: "batch_output"; the
is_error: true flag is what distinguishes the error file when you
GET /v1/files?purpose=batch_output.
The Batch object
Returned by create, retrieve, and cancel, and insidedata[] on list.
Status lifecycle
Validation is synchronous, processing is asynchronous: the create call
returns only after the JSONL passes (or fails) validation, and lines are then
worked through an internal queue. Once a batch is terminal, no further state
changes occur, so stop polling. Retrieve returns live
request_counts; the
list endpoint may lag by a few seconds, so poll a specific batch for accurate
progress.
Reading results
Whenstatus is completed:
output_file_idis set if any line returned 2xx. Download it and match results to inputs bycustom_id, order is not preserved.error_file_idis set if any line failed. Partition byerror.codeto decide what to retry.
Next steps
JSONL format →
Exact line schema for input, output, and error files.
Errors reference →
Every status, validation message, and error-file code, with recovery steps.

