---
title: "列出 File"
method: GET
path: "/agent/managed/v1/files"
tags: ["Managed Agents - File"]
---

# 列出 File

`GET /agent/managed/v1/files`

## Request

- Base URL: `https://agent-api.bigmodel.cn/api`
- URL: `https://agent-api.bigmodel.cn/api/agent/managed/v1/files`
- Auth: HTTP bearer

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

## Query parameters

- `limit` integer
- `before_id` string
- `after_id` string
- `scope_id` string
- `page` string
- `ids[]` string[]

## Headers

- `zai-version` '2026-05-26', required
- `zai-beta` string, required

## Response `200`

请求成功。

- union
  - ManagedFilePageCurrent
    - `data` ManagedFile[], required
      - `type` 'file', required
      - `id` string, required: File ID。
      - `size_bytes` integer, required
      - `created_at` string, date-time, required: 创建时间。
      - `filename` string, required
      - `mime_type` string, required
      - `downloadable` boolean, required: 上传文件为 false，不可再下载；写入 /mnt/session/outputs 后编目的会话产物为 true。
      - `scope` object: 仅会话范围文件在列出或获取时返回；组织级上传文件和上传响应不含此字段。
        - `type` 'session', required
        - `id` string, required
      - `expires_at` 'null', nullable: 新协议固定为 null，不设自动过期时间；旧协议省略此字段。
    - `next_page` string, nullable, required
  - ManagedFilePageLegacy
    - `data` ManagedFile[], required
      - `type` 'file', required
      - `id` string, required: File ID。
      - `size_bytes` integer, required
      - `created_at` string, date-time, required: 创建时间。
      - `filename` string, required
      - `mime_type` string, required
      - `downloadable` boolean, required: 上传文件为 false，不可再下载；写入 /mnt/session/outputs 后编目的会话产物为 true。
      - `scope` object: 仅会话范围文件在列出或获取时返回；组织级上传文件和上传响应不含此字段。
        - `type` 'session', required
        - `id` string, required
      - `expires_at` 'null', nullable: 新协议固定为 null，不设自动过期时间；旧协议省略此字段。
    - `has_more` boolean, required
    - `first_id` string
    - `last_id` string

## Other responses

- `default`: 请求失败。

## Changes

- **2026-11-03** `7fd61aa7f811`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bigmodel/apis/zhipu-ai-api/changes/agent/managed/v1/files/get.md)

---

[API](https://skmtc.dev/bigmodel/apis/zhipu-ai-api.md) - [All operations](https://skmtc.dev/bigmodel/apis/zhipu-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bigmodel/apis/zhipu-ai-api/revisions/f2be7c0fcbb9?raw)
