Skip to content
中文

Get Thread

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

GET/anthropic/v1/sessions/{session_id}/threads/{thread_id}◐ Partial

Official Claude documentation ↗

Request parameters

  • session_idstringrequired

    path: Session ID (path or query parameter).

  • thread_idstringrequired

    path: Path parameter: the thread ID.

  • session_idstringrequired

    query: Session ID (path or query parameter).

Returns

200

Returns a primary or child thread belonging to this session, field-for-field identical to its list item. Foreign, unknown and malformed thread ids uniformly return 404 without revealing existence.

Errors follow the Claude Managed Agents format — see error codes

Request

curl
# Call Create session first and replace the example session ID with its returned ID.
curl https://api.deepraxis.com/anthropic/v1/sessions/sesn_123/threads/sthr_123 \
  -H "x-api-key: $PRAXIS_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "anthropic-beta: managed-agents-2026-04-01"
Python
# Call Create session first and replace the example session ID with its returned ID.
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.threads.retrieve("thread_123", {"session_id": "sample_id_123"})
print(result)
TypeScript
// Call Create session first and replace the example session ID with its returned ID.
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.threads.retrieve("thread_123", { session_id: "sample_id_123" });
console.log(result);

Response 200

{
  "id": "sthr_d72b90b27a414fe5885adff0ac6b9b96",
  "type": "session_thread",
  "parent_thread_id": null,
  "session_id": "sesn_d72b90b27a414fe5885adff0ac6b9b96",
  "agent": {
    "id": "agent_57d15145-7ef6-4bd3-8b33-2b8ddca88ac0",
    "type": "agent",
    "name": "文档助手(已更新)",
    "description": null,
    "system": "用一句话简短回答。",
    "model": {
      "id": "deepseek-flash"
    },
    "version": 2,
    "tools": [],
    "skills": [],
    "mcp_servers": []
  },
  "archived_at": null,
  "created_at": "2026-09-26T07:16:14.796Z",
  "updated_at": "2026-09-26T07:16:35.522Z",
  "status": "idle",
  "stats": null,
  "usage": null
}

Response

HTTP 200

Successful response

application/json

Name Type Description
id string Unique identifier for this thread.
agent object The resolved agent a session_thread runs.
agent.model string | object The advisor model id. / Model identifier and configuration.
agent.type string
agent.id string
agent.description null | string
agent.mcp_servers array<object>
agent.name string
agent.skills array<object>
agent.system null | string
agent.tools array<object>
agent.version number
archived_at null | string A timestamp in RFC 3339 format
created_at string A timestamp in RFC 3339 format
parent_thread_id null | string Parent thread that spawned this thread. Null for the primary thread.
session_id string The session this thread belongs to.
stats null | object Timing statistics for a session thread.
stats.active_seconds number Cumulative time in seconds the thread spent actively running. Excludes idle time.
stats.duration_seconds number Elapsed time since thread creation in seconds. For archived threads, frozen at the final update.
stats.startup_seconds number Time in seconds for the thread to begin running. Zero for child threads, which start immediately.
status string SessionThreadStatus enum
type string
updated_at string A timestamp in RFC 3339 format
usage null | object Cumulative token usage for a session thread across all turns.
usage.active_seconds number Cumulative time in seconds this thread spent in running status. Equal to stats.active_seconds; surfaced here so a thread's usage carries every quantity its cost is priced on.
usage.cache_creation object Prompt-cache creation token usage broken down by cache lifetime.
usage.cache_read_input_tokens number Total tokens read from prompt cache.
usage.input_tokens number Total input tokens consumed across all turns.
usage.list_cost null | object A monetary amount in a specific currency.
usage.output_tokens number Total output tokens generated across all turns.
usage.server_tool_use null | object Cumulative count of server-executed tool invocations, broken down by tool.