Skip to main content
POST
添加会话资源
每个请求都必须发送 ?beta=true

授权

X-Api-Key
string
header
默认值:sk-ant-local-default
必填

OMA 工作区 API 密钥。

请求头

anthropic-version
string
anthropic-beta
string

路径参数

session_id
string
必填

会话标识符。

查询参数

beta
enum<boolean>
必填

为此接口启用 Beta API 合同,必须为 true

可用选项:
true

请求体

application/json

向会话添加资源的请求参数。

type
enum<string>
必填
可用选项:
file
示例:

"file"

file_id
string
必填

先前上传文件的 ID。

Required string length: 1 - 128
示例:

"file_011CNha8iCJcU1wXNR6q4V8w"

mount_path
string | null

容器内的挂载路径。默认为 /mnt/session/uploads/<file_id>

Required string length: 1 - 4096
示例:

"/uploads/receipt.pdf"

响应

请求成功。

已添加的会话资源。

type
enum<string>
必填
可用选项:
file
示例:

"file"

id
string
必填
示例:

"sesrsc_011CZkZBJq5dWxk9fVLNcPht"

file_id
string
必填
示例:

"file_011CNha8iCJcU1wXNR6q4V8w"

mount_path
string
必填
示例:

"/uploads/receipt.pdf"

created_at
string<date-time>
必填

RFC 3339 格式的时间戳

示例:

"2026-03-15T10:00:00Z"

updated_at
string<date-time>
必填

RFC 3339 格式的时间戳

示例:

"2026-03-15T10:00:00Z"