Bing Chat, unchained: a reverse-engineered API wrapper
A Node.js client that lets you script Microsoft's AI search—if you can borrow a valid cookie.

What it does
bing-chat is a TypeScript wrapper that reverse-engineers Bing Chat so you can call it from Node.js. You pass in a _U cookie (yours, or generously donated), send messages, and get back AI-generated text with optional streaming. It handles conversation state and lets you pick Microsoft’s three personality modes: Balanced, Precise, or Creative.
The interesting bit
The whole thing is a public admission of fragility. The author labels it a “reverse-engineered hack” and warns it isn’t meant for production—refreshing honesty in a space crowded with stealth wrappers pretending to be official SDKs. The cookie requirement also means you’re essentially renting someone else’s authenticated session, which is either a clever workaround or a mild identity crisis, depending on your ethics.
Key highlights
- ESM-only, Node ≥ 18, assumes global
fetch - Supports streaming responses via
onProgresscallbacks - Conversations expire after ~20 minutes, so no long-lived state
- Three response variants: Balanced (default), Precise, Creative
- Backend-only recommended if you’re building a site—no client-side exposure of your cookie
Caveats
- Requires a valid Bing
_Ucookie; no API key, no OAuth, just cookie smuggling - Explicitly not production-ready; Microsoft can break this at any moment
- ESM-only means CommonJS projects need a compatibility shim or migration
Verdict
Worth a look if you’re prototyping LLM integrations or want to compare Bing’s output against other models. Skip it if you need stability, official support, or can’t explain to your security team why you’re checking in a browser cookie.