Skip to content
中文

Create Upload Content URL (Extension)

Upload a file first, then replace the example file ID with its returned ID.

POST/agent/v1/uploads/{file_id}/content_url● Supported

Request parameters

  • file_idstringrequired

    path: File id (file-… ) the File service returned after the bytes were uploaded; only the caller's own upload is readable.

Returns

200

Available only on /agent/v1 and only to an embedded end-user token. file_id is the id the File service returns after the bytes are uploaded. Returns { url, expires_at } only for the caller own upload whose file still exists; the read address works for 900 seconds, and must not be stored or logged. A file that belongs to someone else, a missing file, or one that did not start as an upload returns 404 FILE_NOT_FOUND, never revealing whether another person file exists. The request body is empty.

Errors follow the Anthropic error format (type / message / request_id) — see error codes

Request

curl
# Upload a file first, then replace the example file ID with its returned ID.
curl -X POST https://api.deepraxis.com/agent/v1/uploads/file_123/content_url \
  -H "Authorization: Bearer $CUSTOMER_ACCESS_TOKEN" \
  -H "Origin: https://docs.example.com"
Python
# Upload a file first, then replace the example file ID with its returned ID.
import requests

opts = dict(
    base_url="https://api.deepraxis.com/agent",
    api_key="$PRAXIS_API_KEY",
)

# /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
resp = requests.post(
    f"{opts['base_url']}/v1/uploads/file_123/content_url",
    headers={"Authorization": f"Bearer {customer_access_token}", "Origin": "https://docs.example.com"},
)
print(resp.status_code, resp.json())
TypeScript
// Upload a file first, then replace the example file ID with its returned ID.
const opts = {
  baseURL: "https://api.deepraxis.com/agent",
  apiKey: "$PRAXIS_API_KEY",
};

// /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
const resp = await fetch(`${opts.baseURL}/v1/uploads/file_123/content_url`, {
  method: "POST",
  headers: { Authorization: `Bearer ${customerAccessToken}`, Origin: "https://docs.example.com", "Content-Type": "application/json" },
});
console.log(resp.status, await resp.json());

Response 200

{
  "url": "<redacted>",
  "expires_at": "2026-11-18T11:06:51.000Z"
}

Response

HTTP 200

Short-lived read address for the caller’s own uploaded file.

application/json

Name Type Description
url string Short-lived GET address for the file's bytes; fetch it within the lifetime and never store or log it.
expires_at string RFC 3339 time the address stops working; at most 900 seconds after it was issued.