> ## Documentation Index
> Fetch the complete documentation index at: https://wuweism.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API overview

> Base URLs, authentication, content types, rate limits, and endpoint groups for the Wu-Weism API.

Wu-Weism exposes a REST API that powers the causal science workbench. You can use it to build integrations, automate workflows, and access causal models programmatically.

## Base URL

All API endpoints are relative to:

```
https://wuweism.com
```

For example, the causal chat endpoint is at `https://wuweism.com/api/causal-chat`.

## Authentication

Every API endpoint requires an authenticated session. Unauthenticated requests return `401 Unauthorized`.

* **Browser clients** — session cookies are set automatically after you sign in at [wuweism.com](https://wuweism.com). No extra configuration needed.
* **Programmatic access** — obtain a session token and pass it in the `Authorization` header:

```http theme={null}
Authorization: Bearer <your-session-token>
```

See the [Authentication](/api/authentication) guide for details on obtaining tokens and using BYOK AI provider keys.

## Content types

| Direction                | Content type          |
| ------------------------ | --------------------- |
| POST request body        | `application/json`    |
| File upload request body | `multipart/form-data` |
| Standard response        | `application/json`    |
| Streaming response       | `text/event-stream`   |

## Streaming

Several endpoints stream results back to the client using [Server-Sent Events (SSE)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events). These endpoints set `Content-Type: text/event-stream` and send incremental data as events arrive.

<Info>
  Streaming endpoints keep the HTTP connection open until the full response is complete. Make sure your HTTP client supports SSE or chunked transfer encoding.
</Info>

## Rate limiting

Requests are subject to rate limits based on your plan. When you exceed your limit, the API returns `429 Too Many Requests`. Contact support or upgrade your plan if you need higher throughput.

## Response format

### Success

Successful responses return HTTP `2xx` with a JSON body. Most endpoints include a `success` field:

```json theme={null}
{
  "success": true,
  ...
}
```

### Errors

Error responses use the following shape:

```json theme={null}
{
  "success": false,
  "error": "Human-readable error message"
}
```

Some endpoints return the shorter form:

```json theme={null}
{
  "error": "Human-readable error message"
}
```

Common HTTP status codes:

| Status | Meaning                                             |
| ------ | --------------------------------------------------- |
| `400`  | Bad request — check your request body or parameters |
| `401`  | Unauthorized — missing or invalid session           |
| `429`  | Too many requests — rate limit exceeded             |
| `500`  | Internal server error                               |

## Endpoint groups

<CardGroup cols={2}>
  <Card title="Causal chat" icon="message-bot" href="/api/causal-chat">
    Streaming causal dialogue grounded in structural causal models (SCMs). Ask causal questions and receive evidence-backed answers in real time.
  </Card>

  <Card title="Hybrid synthesize" icon="arrows-merge" href="/api/hybrid-synthesize">
    Multi-source synthesis pipeline. Combine evidence from different sources into a unified causal narrative.
  </Card>

  <Card title="Claims" icon="file-check" href="/api/claims">
    Claim ledger access. Create, retrieve, and manage causal claims produced during your research sessions.
  </Card>

  <Card title="SCM" icon="diagram-project" href="/api/scm">
    SCM model registry, interventions, traces, and integrity checks. Build and query structural causal models.
  </Card>

  <Card title="Epistemic analysis" icon="microscope" href="/api/epistemic">
    Epistemic analysis endpoints. Assess confidence, identify assumptions, and surface knowledge gaps in causal arguments.
  </Card>

  <Card title="Legal reasoning" icon="scale-balanced" href="/workbench/legal-causation">
    Legal causation analysis. Apply causal inference frameworks to legal fact patterns and causation standards.
  </Card>
</CardGroup>
