Skip to main content
POST
/
v1
/
batches
Create a batch
curl --request POST \
  --url https://api.zerogpu.ai/v1/batches \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-project-id: <api-key>' \
  --data '
{
  "input_file_id": "file-abc123",
  "endpoint": "/v1/chat/completions"
}
'
{
  "id": "<string>",
  "endpoint": "<string>",
  "input_file_id": "<string>",
  "output_file_id": "<string>",
  "error_file_id": "<string>",
  "completion_window": "<string>",
  "created_at": 123,
  "expires_at": 123,
  "request_counts": {
    "total": 123,
    "completed": 123,
    "failed": 123
  },
  "metadata": {}
}

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.

Create a batch job from a JSONL file you already uploaded.
  1. Upload input JSONL on Upload file or via Quickstart (purpose=batch).
  2. Paste the returned file-… id into input_file_id below.
  3. Set endpoint to /v1/chat/completions (must match every line in your JSONL).
Full reference: Batches API.

Authorizations

x-api-key
string
header
required
x-project-id
string
header
required

Body

application/json
input_file_id
string
required

ID from POST /v1/files with purpose=batch.

endpoint
enum<string>
default:/v1/chat/completions
required

Must match the url on every JSONL line.

Available options:
/v1/chat/completions
completion_window
enum<string>
default:24h
Available options:
24h
metadata
object

Optional tags echoed back on retrieve.

Response

Batch accepted

id
string
object
enum<string>
Available options:
batch
endpoint
string
status
enum<string>
Available options:
validating,
in_progress,
finalizing,
completed,
failed,
expired,
cancelling,
cancelled
input_file_id
string
output_file_id
string | null
error_file_id
string | null
completion_window
string
created_at
integer
expires_at
integer
request_counts
object
metadata
object