Skip to content
中文

Create Artifact Content URL (Extension)

Call Create session first and replace the example session ID with its returned ID.

POST/agent/v1/sessions/{session_id}/artifacts/{artifact_id}/content_url● Supported

Request parameters

  • session_idstringrequired

    path: Session id from session creation or listing.

  • artifact_idstringrequired

    path: Artifact id (art_...) from the artifact list or an agent.artifact_delivered event.

  • partintegeroptional

    Index into the artifact's parts; defaults to 0.

  • ttl_secondsintegeroptional

    How long the address works, 60 to 300 seconds; defaults to 300.

Returns

200

Own-face extension. The body is optional: part (index into the artifact parts, default 0) and ttl_seconds (60 to 300, default 300). Returns { url, expire_time }. The address works for minutes; do not store or log it. For an object part the address serves a snapshot picture of a canvas or the own bytes of the asset; an object that no longer exists returns 404 ARTIFACT_NOT_FOUND and a failing share service returns 502. An unknown artifact or an out-of-range part returns 404 ARTIFACT_NOT_FOUND, a session that is missing or not yours returns 404, and a ttl_seconds outside 60 to 300 returns 400.

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

Request

curl
# Call Create session first and replace the example session ID with its returned ID.
curl https://api.deepraxis.com/agent/v1/sessions/sesn_123/artifacts/art_123/content_url \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"part":0}'
Python
# Call Create session first and replace the example session 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/sessions/sesn_123/artifacts/art_123/content_url",
    headers={"Authorization": f"Bearer {opts['api_key']}"},
    json={"part":0},
)
print(resp.status_code, resp.json())
TypeScript
// Call Create session first and replace the example session 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/sessions/sesn_123/artifacts/art_123/content_url`, {
  method: "POST",
  headers: { Authorization: `Bearer ${opts.apiKey}`, "Content-Type": "application/json" },
  body: JSON.stringify({"part":0}),
});
console.log(resp.status, await resp.json());

Response 200

{
  "url": "<redacted>",
  "expire_time": "2026-11-14T14:20:58.000Z"
}

Response

HTTP 200

Short-lived download address

application/json

Name Type Description
url string Signed download address; fetch it within the lifetime and do not store it.
expire_time string When the address stops working, RFC 3339; at most 300 seconds after it was issued.