Skip to main content
POST
上传 File

Authorizations

Authorization
string
header
required

标准的 HTTP Bearer 认证方式,在 API Keys 页面获取密钥。

Headers

zai-version
enum<string>
default:2026-05-26
required

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

Available options:
2026-05-26
Example:

"2026-05-26"

zai-beta
string
default:managed-agents-2026-09-22
required

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

Example:

"managed-agents-2026-09-22"

Body

multipart/form-data
file
file
required

Response

请求成功。

type
enum<string>
required
Available options:
file
id
string
required

File ID。

Example:

"file_01911111-1111-7111-8111-111111111111"

size_bytes
integer<int64>
required
created_at
string<date-time>
required

创建时间。

filename
string
required
mime_type
string
required
downloadable
enum<boolean>
required

上传文件为 false,不可再下载;写入 /mnt/session/outputs 后编目的会话产物为 true。

Available options:
false
Example:

false

expires_at
enum<string> | null

新协议固定为 null,不设自动过期时间;旧协议省略此字段。

Available options:
null
Example:

null