# API Reference
Complete API reference for dotlottie-io, covering the DotLottie, DotLottieBuilder, DotLottieReader, and DotLottieMerger classes.

# dotlottie-io API Reference

This reference covers the public classes and types exported by `@lottiefiles/dotlottie-io`, for both the Node.js and Browser (WASM) builds. The API is identical across both — differences are called out on the relevant page.

JSON payloads (animations, themes, state machines) are passed **into** the API as `Buffer`/`Uint8Array` or a JSON string, and returned **from** the API as `string`. Use `JSON.parse()` on the returned value.

## Classes

1. **[`DotLottie`](/docs/tools/dotlottie-io/api/dotlottie-class)** — the core class representing a loaded or built `.lottie` package. Static `fromFile`/`fromBytes` loaders, plus instance methods for managing animations, themes, state machines, assets, and serialization.
2. **[`DotLottieBuilder`](/docs/tools/dotlottie-io/api/dotlottie-builder-class)** — a stateful builder for constructing a new package from scratch.
3. **[`DotLottieReader`](/docs/tools/dotlottie-io/api/dotlottie-reader-class)** — a lazy, read-only view over an archive; reads entries on demand.
4. **[`DotLottieMerger`](/docs/tools/dotlottie-io/api/dotlottie-merger-class)** — merges multiple packages, plus the `MergeStrategy` enum.

## Types

- **[Types](/docs/tools/dotlottie-io/api/types)** — `AnimationOptions`, `AssetReferences`.
- **[Errors](/docs/tools/dotlottie-io/api/errors)** — thrown error messages and the conditions that cause them.

Navigate using the links above, or proceed sequentially.

Next up: [`DotLottie` Class](/docs/tools/dotlottie-io/api/dotlottie-class)
