Managed Agents - File

新协议返回 data/next_page,旧协议返回 data/has_more/first_id/last_id。ids[] 为不分页批量查 ID 入口,见 Files 指南。

get/agent/managed/v1/files

Request

  • Base URL
    https://agent-api.bigmodel.cn/api
  • Auth
    HTTP bearer

Query parameters

limitinteger

每页数量。

before_idstring

返回此 File 之前的一页。

after_idstring

返回此 File 之后的一页。

scope_idstring

按 Session scope 过滤,必须为 sess_ 前缀。

pagestring

将新协议 next_page 原样传入;优先于 before_id/after_id。

ids[]string[]

按 ID 查询,去重最多100;不可与 page/limit/before_id/after_id 同用。

Headers

zai-version'2026-05-26' required
Example:2026-05-26

Managed Agents API 入口要求的基础协议标识,当前只接受 2026-05-26;响应兼容形态由 zai-beta 选择。两个头均需携带。

zai-betastring required
Example:managed-agents-2026-09-22

声明 Managed Agents Beta 协议并选择响应字段与兼容行为。新接入使用 managed-agents-2026-09-22;旧客户端仍可使用 managed-agents-2026-05-26。必须同时携带 zai-version: 2026-05-26。字段差异见 /cn/managed-agents/protocol-versions。

Response

请求成功。

OR

Example response

{
  "data": [
    {
      "type": "file",
      "id": "file_01911111-1111-7111-8111-222222222222",
      "size_bytes": 1024,
      "created_at": "2026-10-15T08:00:00.000Z",
      "filename": "report.txt",
      "mime_type": "text/plain",
      "downloadable": true,
      "expires_at": null,
      "scope": {
        "type": "session",
        "id": "sess_01911111-1111-7111-8111-111111111111"
      }
    }
  ]
}

Changes