Files
puter/src/backend/doc/modules/puterai/README.md
Daniel Salazar 08e26af85d feat: enforce new metering + get rid of old methods (#1762)
* feat: enforce new metering + get rid of old methods

* fix: make openrouter metering more robust
2025-10-16 10:33:17 -07:00

837 B

PuterAI Module

The PuterAI module provides AI capabilities to Puter through various services including:

  • Text generation and chat completion
  • Text-to-speech synthesis
  • Image generation
  • Document analysis

Metered Services

All AI services in this module are metered using Puter's MeteringService. This allows us to charge per unit usage, where a unit is defined by the specific service: for example, most LLMs will charge per token, AWS Polly charges per character, and AWS Textract charges per page. the metering service tracks usage units, and relies on its centralized cost maps to determine if a user has enough credits to perform an operation, and to record usage after the operation is complete.

see MeteringService for more details on how metering works.