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

# SDK API reference

> Complete reference for the Layers SDK covering controllers, methods, response types, error handling, filtering DSL, caching, and storage adapters.

The SDK API reference is split across a few focused pages:

<CardGroup cols={2}>
  <Card title="Client methods" icon="function" href="/sdk/api-reference/client-methods">
    `collection()`, `blocks()`, `search()`, `suggest()`, `uploadImage()`, `searchByImage()`, `searchContent()`, the product card controller, and abort signal patterns.
  </Card>

  <Card title="Filtering" icon="filter" href="/sdk/api-reference/filtering">
    Filter DSL, operators, and filter aliases configured at client init.
  </Card>

  <Card title="Response types and error handling" icon="shield-exclamation" href="/sdk/api-reference/responses-and-errors">
    Shared `QueryResult` shape, the tagged error model, and retry helpers.
  </Card>

  <Card title="Cache, storage, and signals" icon="database" href="/sdk/api-reference/cache-and-storage">
    Cache API, storage adapters, signal primitives, singleton access, and SDK technical details.
  </Card>
</CardGroup>

## Controller lifecycle at a glance

All controllers follow the same pattern with reactive state and three ways to subscribe:

* **`state`** — a `ReadonlySignal<QueryState<T>>` with `{ data, error, isFetching }`
* **`execute()`** — runs the query, returns `Result<T, ClientError>`
* **`subscribe(callback)`** — reacts to state changes without importing signals
* **`dispose()`** — cleans up subscriptions and aborts pending requests

See [Client methods](/sdk/api-reference/client-methods) for the full list.

## Next steps

* [Framework integration](/sdk/framework-integration)
* [SDK upgrade guide (v2)](/developers/sdk/upgrade-v2)
