---
title: "获取 File"
method: GET
path: "/agent/managed/v1/files/{fileId}"
tags: ["Managed Agents - File"]
---

# 获取 File

`GET /agent/managed/v1/files/{fileId}`

## Request

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

获取指定 File 的元数据，不返回文件二进制内容。无读取权限时与文件不存在时均返回 404。

## Path parameters

- `fileId` string, required

## Headers

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

## Response `200`

请求成功。

- ManagedFile
  - `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，不设自动过期时间；旧协议省略此字段。

## 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/:fileId/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)
