Browser Integration

TESTED

Direct browser usage of wavebird/browser with the same WavebirdClient surface.

It fits when you explicitly need browser-side package orchestration with a publishable key and activation handshake, rather than the Script Tag or hosted-renderer path.

The browser entry is tested and verified as part of the released package. Browser package usage relies on publishable-key activation and allowed-origin checks. Secret keys remain server-only, and new browser work should prefer the Script Tag unless you explicitly need the package surface.

Browser key setup

Browser SDK calls use a dashboard publishable key, not a server secret key. Store it as NEXT_PUBLIC_WAVEBIRD_PUBLISHABLE_KEY, configure every local, staging, and production origin on that key, and keep WAVEBIRD_SECRET_KEY only on your server.

Included today

  • wavebird/browser
  • decisionDelivery: "auto"
  • getPublishableKey() or publishableKey
  • allowed origins configured in the dashboard
  • job creation and decision retrieval in browser code

Verified source

  • README browser example
  • Browser export tests
  • Package smoke

browser.ts

typescript

BROWSER
import { WavebirdClient } from "wavebird/browser";const client = new WavebirdClient({  baseUrl: "https://api.wavebird.ai",  getPublishableKey: async () => (await fetch("/api/wavebird/publishable-key")).text(),  publisher: {    app_name: "MyAIChatApp",    app_domain: "mychatapp.com",    categories: ["IAB19"],  },  decisionDelivery: "auto",});const job = await client.createJob({  job_type: "chat",});const decision = job?.slot_ids[0] ? await client.getDecision(job.slot_ids[0]) : null;console.log(decision);

Choose hosted defaults or package control

Back to API docsContact the team

These pages document the package layer for teams that choose wavebird to control ad requests, decisions, rendering helpers, consent, and beacons directly. Use the API docs for hosted defaults, and use contact only when you want rollout review, enterprise coordination, or help with non-standard integration constraints. Beacon billing rules live in SDK Concepts.