Skip to content

AI — API endpoints

  • https://ai.streamercatalyst.com

The StreamerCatalyst dashboard calls the session endpoints same-origin through https://streamercatalyst.com/m/ai/* (for example /m/ai/api/channels/:id/config reaches /api/channels/:id/config here). That proxy forwards the session cookie over a Cloudflare service binding and never forwards /internal/*.

Path Method Auth Description
/privacy/ai GET Public Viewer AI-privacy page: any viewer can opt out of AI personas (everywhere or in one channel) after an identity-only Twitch sign-in.
/privacy/ai/* GET/POST Public Steps of that flow: start, callback, confirm, revoke, and per-channel channel/opt-in, channel/opt-out, channel/delete. Rate-limited per IP.
/api/channels/:id/config GET/PUT Session cookie Per-channel AI configuration, including the switch that turns AI replies on.
/api/channels/:id/personas GET Session cookie List viewer personas (per-chatter profiles built from chat).
/api/channels/:id/personas/:userId GET/DELETE Session cookie Read or delete one viewer’s persona.
/api/channels/:id/personas/:userId/test-command POST Session cookie Try a built-in or custom AI command against a persona.
/api/channels/:id/custom-commands POST Session cookie Create an AI custom command.
/api/channels/:id/custom-commands/:commandId PUT/DELETE Session cookie Update or delete an AI custom command.
/api/channels/:id/lore GET Session cookie Channel lore: facts the broadcaster wrote, patterns the AI observed, and AI drafts awaiting approval.
/api/channels/:id/lore/* POST/PUT/DELETE Session cookie Manage lore: manual and manual/:entryId for your own entries, drafts/:draftId (and /promote) to keep or discard an AI draft, auto to clear AI-observed lore.
/api/channels/:id/optout GET Session cookie Viewers who opted out of AI personas, in this channel or everywhere.
/api/channels/:id/optout/:userId DELETE Session cookie Remove a viewer from this channel’s opt-out list. It never clears a viewer’s own platform-wide opt-out.
/api/channels/:id/eventsub GET Session cookie This channel’s live EventSub subscriptions, read from Twitch (the platform creates and deletes them).
/api/channels/:id/backfill-bits POST Session cookie Backfill bits history from Twitch (broadcaster only).
/internal/eventsub POST Service binding (internal) EventSub fan-out receiver (internal, from eventsub-router).
/internal/billing/downgrade POST Service binding (internal) Tier-downgrade handler (internal).
  • Session cookie endpoints require an active StreamerCatalyst session (set at login via the platform Worker). A channel-scoped route (/api/channels/:id/…) answers only for the session’s own channel, and a read-only admin masquerade may read but not change anything.
  • Public endpoints require no authentication.
  • Service binding endpoints are for other StreamerCatalyst Workers, called over Cloudflare service bindings with a shared internal token. They are not a public API.