Add Session Resource
POST
/anthropic/v1/sessions/{session_id}/resources◐ PartialRequest parameters
session_idstringrequiredpath: Session ID (path or query parameter).
typestringrequiredquery: The request-body field this session resource is added from.
file_idstringrequiredID of a previously uploaded file.
mount_pathstringoptionalMount path in the container. Defaults to
/mnt/session/uploads/<file_id>.
Returns
501
Supports persistence, retrieval and removal of file resource references, up to 500 per session. Files must be live and owned by the current tenant. Paths default to /mnt/session/uploads/<file_id>; custom paths are rooted there and parent traversal is rejected. File content is immutable through this API. Sandbox synchronization is not implemented in this batch.
Errors follow the Claude Managed Agents format — see error codes
Request
curl
curl -X POST https://api.deepraxis.com/anthropic/v1/sessions/sample_id_123/resources \
-H "x-api-key: $PRAXIS_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01"Python
from anthropic import Anthropic
client = Anthropic(
base_url="https://api.deepraxis.com/anthropic",
api_key="$PRAXIS_API_KEY",
)
# 官方有、平台未支持:调用得到 501(not_implemented_error),无副作用。
result = client.beta.sessions.resources.add("sample_id_123", {})
print(result)TypeScript
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
baseURL: "https://api.deepraxis.com/anthropic",
apiKey: "$PRAXIS_API_KEY",
});
// 官方有、平台未支持:调用得到 501(not_implemented_error),无副作用。
const result = await client.beta.sessions.resources.add("sample_id_123", {});
console.log(result);Response 501
{
"type": "error",
"error": {
"type": "not_implemented_error",
"message": "Not implemented: this Managed Agents operation is not implemented on this platform yet (POST /v1/sessions/{session_id}/resources); see the docs for the supported subset."
},
"request_id": "4b0a0a44-c95a-45b7-aaeb-007d5825c5c4"
}Response
HTTP 200
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | |
| created_at | string | A timestamp in RFC 3339 format |
| file_id | string | |
| mount_path | string | |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |