列出 batch

GET/v1/batches

列出当前用户的 batch 作业,按创建时间倒序。支持通过 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}).

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.

请求

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

响应

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}
此页面对您有帮助吗?