---
title: "文件列表"
method: GET
path: "/paas/v4/files"
tags: ["文件 API"]
---

# 文件列表

`GET /paas/v4/files`

获取已上传文件的分页列表，支持按用途和排序过滤。点击 **Try it** 按钮可快速试用。

## Query parameters

- `after` string
- `purpose` 'batch' | 'code-interpreter' | 'agent', required
- `order` 'created_at'
- `limit` integer

## Response `200`

业务处理成功

- FileListResponse
  - `object` 'list'
  - `data` FileObject[]
    - `id` string — 文件标识符
    - `object` 'file'
    - `bytes` integer — 文件大小（字节）
    - `created_at` integer — 文件创建的`Unix`时间戳
    - `filename` string — 文件名
    - `purpose` string — 文件的预期用途
  - `has_more` boolean — 是否有更多数据

## Other responses

- `default` — 请求失败。

---

[API](https://skmtc.net/bigmodel/apis/zhipu-ai-api.md) · [All operations](https://skmtc.net/bigmodel/apis/zhipu-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bigmodel/zhipu-ai-api/revisions/37de2d7b73de/schema)
