Puter.js API Layer
This server acts as an API layer between puterjs AI services and your frontend.
Getting Started
- First, visit the Auth Page to get your token
- Use the token to make API calls to puterjs AI services
Available Endpoints
- GET /auth - Authentication page to get your token
- POST /api/chat - Chat with AI models
- POST /api/generate-image - Generate images with AI
- POST /api/extract-text - Extract text from images (OCR)
- POST /api/text-to-speech - Convert text to speech
Example Usage
// Chat with AI
POST /api/chat
{
"message": "Hello, how are you?",
"model": "gpt-4.1-nano"
}
// Generate image
POST /api/generate-image
{
"prompt": "A beautiful sunset over mountains"
}