-
Notifications
You must be signed in to change notification settings - Fork 3.2k
src backend modules puterai README
KernelDeimos edited this page Jun 11, 2025
·
1 revision
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
All AI services in this module are metered using Puter's CostService infrastructure. For details on how metering works and how to implement it in new services, see the Metered Services documentation.
Each AI service defines its own cost structure based on its specific usage patterns:
- Costs are typically defined per million tokens
- Separate rates for input and output tokens
- Different models have different pricing tiers
- Cost per character
- Fixed rate regardless of voice or language
- Cost per page
- Fixed rate for basic layout analysis
- Cost varies by image size and quality
- Different rates for different models
Each service in this module:
- Defines its cost structure
- Validates available funds before operations
- Records costs after successful operations
- Handles insufficient funds errors appropriately
For implementation details of specific services, see their respective documentation files in this directory.
This wiki is generated from the repository. Do not edit files the wiki.
You are reading documentation for Puter, an open-source high-level operating system.
Getting started with Puter on localhost is as simple as:
git clone https://github.com/HeyPuter/puter.git
npm install
npm run start- Index (README.md)
- api drivers
- Group Endpoints
- Notification Endpoints
- Share Endpoints
- Type-Tagged Objects
- Comment Prefixes
- contributors vscode
- Local Email Testing
- Puter Extensions
- Repository Structure and Tooling
- Configuring Domains for Self-Hosted Puter
- Configuring Puter
- First Run Issues
- self_hosters config_values
- self_hosters support
- Self-Hosting Puter
- Backend Style
- Puter Backend - Directory Structure
- Puter Backend Boot Sequence
- Puter Kernel Moduels and Services
- Batch and Symlinks
- Metered Services and Cost Management
- Protected Apps and Subdomains
- Service Scripts
- Index (README.md)
- Configuring AI Services
- PuterAI API Request Examples
- src backend src modules puterai config
####### For Contributors