@raindrop-ai/browser-sdk
v0.1.7
Published
Minimal browser-safe SDK for Raindrop /v1/events
Keywords
Readme
@raindrop-ai/browser-sdk
Minimal browser-safe SDK for sending Raindrop events from frontend applications.
Install
pnpm add @raindrop-ai/browser-sdkUsage
import { Raindrop } from "@raindrop-ai/browser-sdk";
const raindrop = new Raindrop({
apiKey: process.env.RAINDROP_WRITE_KEY!,
});Projects
If your org has multiple projects, route events to a specific one by passing its slug as projectId:
const raindrop = new Raindrop({
apiKey: process.env.RAINDROP_WRITE_KEY!,
projectId: "support-prod",
});This sets the X-Raindrop-Project-Id header on every event. Omit it (or pass "default") to use your org's default Production project — the existing behavior. Single-project orgs need nothing new.
Payload size limits
input / output are capped at 1,000,000 characters per field by default
and truncated with a ...[truncated by raindrop] marker before the request
body is serialized, so a multi-MB transcript costs the cap — not the payload —
on the main thread, and lands truncated instead of tripping the 1 MB ingest
limit. Tune via maxTextFieldChars. Every request also carries a finite
timeout (default 30s, tune via timeoutMs).
Notes
- This package is intentionally small and browser-safe.
- It has zero runtime dependencies.
