List batches

GET/v1/batches

List batch jobs for the authenticated user, newest first. Supports cursor pagination via after.

Authentication

Authorization Bearer

Query Parameters

limitinteger

Maximum items to return (default 20, max 100).

afterstring

Cursor: batch ID from a previous page (last_id).

Response

objectstring

list

dataarray

Array of batch objects (same shape as GET /v1/batches/{id}).

data.idstring

Batch ID.

data.objectstring

Always batch.

data.endpointstring

Target endpoint for batch requests.

data.statusstring

Batch status.

data.input_file_idstring

Uploaded input JSONL file ID.

data.output_file_idstring | null

Output file ID when available.

data.error_file_idstring | null

Error file ID when available.

data.request_countsobject

Request counts when available.

data.errorsobject | null

Validation or platform errors when failed.

has_moreboolean

Whether more pages exist.

first_idstring

First batch ID in this page.

last_idstring

Last batch ID; pass as after for next page.

Request

1curl "https://api.token360.ai/v1/batches?limit=20" \
2  -H "Authorization: Bearer sk-your-api-key"

Response

JSON
1{
2  "object": "list",
3  "data": [
4    {
5      "id": "batch_01abc",
6      "object": "batch",
7      "endpoint": "/v1/chat/completions",
8      "status": "completed",
9      "input_file_id": "file_abc123",
10      "output_file_id": "file_output_xyz",
11      "error_file_id": null,
12      "completion_window": "24h",
13      "request_counts": {
14        "total": 2,
15        "completed": 2,
16        "failed": 0
17      },
18      "created_at": 1710000000,
19      "expires_at": 1710086400,
20      "metadata": {
21        "job": "nightly"
22      }
23    }
24  ],
25  "has_more": false,
26  "first_id": "batch_01abc",
27  "last_id": "batch_01abc"
28}
Was this page helpful?