Files
puter/src/docs
Daniel Salazar 3c4c70af7a fix(ai): realtime billing, subscription gate and conversation reconnects
Relay:
- Cancel and bill a response still generating when the client leaves,
  instead of cutting the upstream before response.done.
- Record realtime usage through the AI cost-factor hook.
- Drop the upstream byte and message caps; replies arrive faster than real
  time and tripping them closed sessions and skipped billing.
- Price usage as it arrives, before any forwarding decision, so a closing
  session never drops a usage event.
- Bill the model the session reports and refuse a session.update that
  changes the model.
- Require a paid plan.

SDK (puter.ai.convo):
- Reconnect after a dropped connection with the same settings, keeping
  listeners and media; emits reconnecting and ready { reconnected }.
- Errors reject only the operation they name; a failed send rejects only
  its own request.
- configure() sends only the given settings and settles on its own ack;
  commitAudio follows turn detection set natively.
- interrupt() right after sendText cancels the reply once it starts.
- Microphone: capture at the device rate, drop chunks instead of stopping
  on stalls or a congested socket, no timeout on the permission prompt,
  permission_denied on refusal.
- Speaker: 300 s playback bound without interrupting, played position
  accounts for output latency and gaps between chunks.
- Audio control events keep headroom over queued audio.
- Upgrade prompt on subscription_required / insufficient_funds.

Tests that need the built SDK and Chromium move to the puter.js suite.
2026-10-29 01:18:35 -07:00
..
2026-10-03 10:27:23 +07:00
…

Puter.js Docs

Docs · Developer · Puter.com · X

screenshot


Puter.js Docs

The Puter.js documentation contains everything you need to build powerful applications with Puter.js.

  • Get started with Puter.js by reading documentations on usage and best practices
  • Browse all available APIs, including AI, networking, authentication, and cloud services
  • Find code examples and implementations to speed up your development

Getting Started

💻 Local Development

git clone https://github.com/HeyPuter/docs
cd docs
npm install
npm run dev

→ This should launch Puter.js Docs at http://127.0.0.1:8080 (or the next available port).


Support

Connect with the maintainers and community through these channels:

We are always happy to help you with any questions you may have. Don't hesitate to ask!


License

This repository, including its sub-projects, modules, and components, is licensed under MIT, and its content is licensed under CC BY-SA 4.0 unless explicitly stated otherwise. Third-party libraries included in this repository may be subject to their own licenses.