跳转到主要内容
GET
/
v1
/
batches
列出批处理任务
curl --request GET \
  --url https://api.moonshot.cn/v1/batches \
  --header 'Authorization: Bearer <token>'
{
  "object": "list",
  "data": [
    {
      "id": "<string>",
      "object": "batch",
      "endpoint": "<string>",
      "input_file_id": "<string>",
      "completion_window": "<string>",
      "status": "validating",
      "created_at": 123,
      "request_counts": {
        "completed": 123,
        "failed": 123,
        "total": 123
      },
      "output_file_id": "<string>",
      "error_file_id": "<string>",
      "in_progress_at": 123,
      "expires_at": 123,
      "finalizing_at": 123,
      "completed_at": 123,
      "failed_at": 123,
      "cancelling_at": 123,
      "cancelled_at": 123,
      "metadata": {}
    }
  ],
  "has_more": true
}

Documentation Index

Fetch the complete documentation index at: https://platform.kimi.com/docs/llms.txt

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

完整的调用示例请参考 Batch API 指南

授权

Authorization
string
header
必填

Authorization 请求头需要一个 Bearer 令牌。使用 MOONSHOT_API_KEY 作为令牌。这是一个服务端密钥,请在 API 密钥页面 生成。

查询参数

after
string

分页游标,传入上一页最后一个 batch 的 ID

limit
integer
默认值:20

每页数量,默认 20

响应

批处理任务列表

object
string
必填
示例:

"list"

data
object[]
必填
has_more
boolean

是否还有更多数据