Skip to main content

Documentation Index

Fetch the complete documentation index at: https://wuweism.com/llms.txt

Use this file to discover all available pages before exploring further.

Two endpoints manage causal chat sessions: one to list all sessions associated with your account, and one to retrieve the full message history for a specific session.

List sessions

GET /api/causal-chat/sessions
Returns all sessions belonging to the authenticated user, ordered by most recently updated.

Authentication

Required. Include a session cookie or Authorization: Bearer <token> header.

Response

Status: 200 OK
Content-Type: application/json
sessions
object[]
required
Array of session summary objects.

Example

curl --request GET \
  --url https://wuweism.com/api/causal-chat/sessions \
  --header 'Authorization: Bearer <token>'
200
{
  "sessions": [
    {
      "id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
      "title": "Does cortisol exposure causally increase hippocampal volume reduction?",
      "updated_at": "2026-04-05T14:32:00Z",
      "domain_classified": "neuroscience"
    },
    {
      "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
      "title": "What is the causal effect of sleep deprivation on reaction time?",
      "updated_at": "2026-04-04T09:15:00Z",
      "domain_classified": "cognitive_science"
    }
  ]
}

Get session messages

GET /api/causal-chat/sessions/{sessionId}
Returns the full ordered message history for a specific session.

Authentication

Required. Include a session cookie or Authorization: Bearer <token> header.

Path parameters

sessionId
string
required
UUID of the session to retrieve. Obtain this from the id field in the list sessions response.

Response

Status: 200 OK
Content-Type: application/json
messages
object[]
required
Chronologically ordered array of messages in the session.

Example

curl --request GET \
  --url https://wuweism.com/api/causal-chat/sessions/3f2504e0-4f89-11d3-9a0c-0305e82c3301 \
  --header 'Authorization: Bearer <token>'
200
{
  "messages": [
    {
      "id": "a1b2c3d4-0000-0000-0000-000000000001",
      "role": "user",
      "content": "Does cortisol exposure causally increase hippocampal volume reduction?",
      "created_at": "2026-04-05T14:31:45Z",
      "causal_graph": null
    },
    {
      "id": "a1b2c3d4-0000-0000-0000-000000000002",
      "role": "assistant",
      "content": "Yes. The causal pathway from elevated cortisol to hippocampal volume reduction is well-supported by the loaded SCM...",
      "created_at": "2026-04-05T14:32:00Z",
      "causal_graph": {
        "modelKey": "neuroscience_hpa_axis",
        "version": "2.1.0",
        "tier1": {},
        "tier2": {}
      }
    }
  ]
}

Error responses

StatusDescription
401Missing or invalid authentication credentials.
404No session found with the given sessionId for the authenticated user.