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

# API Reference

> Two API surfaces, one backend. Pick the one that matches your integration.

Blend exposes two API surfaces from the same backend. They share the same data and schemas but differ in authentication and how they identify the account.

<CardGroup cols={2}>
  <Card title="Frontend API" icon="browser" href="/build/api/frontend">
    For browser apps. Auth with a publishable key and SIWE wallet signature. The account is implicit from the signed session.
  </Card>

  <Card title="Server API" icon="server" href="/build/api/server">
    For backends. Auth with an API key. The account type and account ID are explicit in the URL path.
  </Card>
</CardGroup>

## Which one do I use?

|                     | Frontend API                                              | Server API                                                  |
| ------------------- | --------------------------------------------------------- | ----------------------------------------------------------- |
| **Runs in**         | Browser                                                   | Your backend (Node.js, Python, etc.)                        |
| **Auth**            | `X-Publishable-Key` + SIWE bearer JWT                     | `X-API-Key`                                                 |
| **Account scoping** | Automatic from the signed session                         | Explicit via `{accountTypeId}` and `{accountId}` in the URL |
| **Auth endpoints**  | Yes (`/auth/challenge`, `/auth/verify`, `/auth/sign-out`) | No                                                          |
| **Account lookup**  | No (account resolved from JWT)                            | Yes (`GET /account?address=...`)                            |
| **SDK**             | `@blend-money/fe`                                         | `@blend-money/node`                                         |
| **Base URL**        | `https://api.portal.blend.money/extern/fe`                | `https://api.portal.blend.money/extern/svr/{accountTypeId}` |

Both surfaces return the same response shapes. A balance response from the frontend API is identical to one from the server API.

## Common patterns

Every response wraps data in a standard envelope:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "status": "success",
  "data": { ... }
}
```

Errors follow the same shape:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "status": "error",
  "message": "Human-readable error description"
}
```

<CardGroup cols={2}>
  <Card title="Frontend API" icon="browser" href="/build/api/frontend">
    Browse all 21 frontend endpoints
  </Card>

  <Card title="Server API" icon="server" href="/build/api/server">
    Browse all 19 server endpoints
  </Card>
</CardGroup>
