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

# ParaLens API — Endpoints, Authentication, and Responses

> ParaLens exposes GET /health and POST /analyze over HTTP. No auth required. Returns versioned TxReport JSON for Ethereum transaction hashes.

The ParaLens API is a stateless HTTP service. Every request to `/analyze` is processed independently — no sessions, no wallet indexing, no persistent state. You POST a transaction hash and receive a `TxReport`.

## Base URLs

| Environment | URL                                          |
| ----------- | -------------------------------------------- |
| Production  | `https://paralens-production.up.railway.app` |

## Endpoints Summary

| Method | Path       | Description                               |
| ------ | ---------- | ----------------------------------------- |
| GET    | `/health`  | Healthcheck — returns `ok`                |
| POST   | `/analyze` | Analyze a transaction and return TxReport |

See [GET /health](/docs/api-reference/health) and [POST /analyze](/docs/api-reference/analyze) for full endpoint documentation.

## Authentication

No authentication is required today. Future clients should send an `x-api-key: <api-key>` header when key-based access is introduced.

Browser clients can call ParaLens directly — CORS is permissive. However, production applications should route requests through a backend proxy to avoid exposing any future credentials and to centralize request handling.

## Request Format

All requests to `/analyze` must include the `Content-Type: application/json` header. The request body must be valid JSON.

## Response Format

All responses are returned as `application/json`. A successful analysis returns a `TxReport` object. Failures return a JSON error object:

```json theme={null}
{ "error": "message describing the failure" }
```

## Status Codes

| Code  | Meaning                                           |
| ----- | ------------------------------------------------- |
| `200` | Success                                           |
| `400` | Bad request (invalid hash or chain)               |
| `502` | Upstream failure (RPC, trace, or analysis engine) |

## Schema Versioning

Every `TxReport` includes a `schema_version` integer field, currently set to `1`. Clients should read this field before parsing the rest of the response.

```json theme={null}
{ "schema_version": 1, ... }
```

Versioning rules:

* **Additive changes** (new optional fields) are made without bumping the version.
* **Structural or breaking changes** increment `schema_version`.

Always guard your parsing logic against unknown fields, and check `schema_version` if your client depends on specific top-level structure.
