Skip to content

About

Free AI API proxy: pool Puter.com accounts for unlimited credits across 400+ models (Claude, GPT, Gemini, DeepSeek). Auto-failover, OpenAI-compatible endpoint.

Topics

Resources

Security policy

Stars

36 stars

Watchers

3 watching

Forks

Latest commit

Β 

History

49 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Puter Pool β€” Free AI API with No Limits πŸš€

Puter Pool Logo

Get a free AI API for Claude Opus 5, GPT-5.6 Sol, Gemini 3.7 Flash, DeepSeek V4, Qwen, Llama, Mistral, Grok and 400+ models by pooling free Puter accounts.
Unlimited credits β€” no card, no rate limits, no token costs.

🌐 Live Landing β€’ πŸ› οΈ Local Depot Dashboard β€’ πŸ”Œ Local API β€’ πŸ“¦ Repository

Features β€’ Quick Start β€’ How It Works β€’ API β€’ Dashboard β€’ Docker β€’ Testing


How it works

Puter gives every free account a daily AI credit allowance. Puter Pool combines the allowances of accounts you own into a single OpenAI-compatible (/v1/chat/completions) and Anthropic-compatible (/v1/messages) endpoint, so coding agents (opencode, Claude Code, etc.) keep running without ever hitting a cap.

Notes

Puter may ask for phone verification when creating accounts. Only pool accounts you own, and respect Puter's terms of service.

✨ Features

Feature Description
Free AI API OpenAI at /v1/chat/completions + Anthropic at /v1/messages, /anthropic/v1/messages (all SSE streaming)
400+ Models Live from Puter β€” Claude Opus 5, GPT-5.6 Sol, Gemini 3.7 Flash, DeepSeek V4, Mistral, Qwen, Grok, Llama… grouped by lab with LobeHub icons
Unlimited Credits Automatic failover across accounts β€” never hit a cap
Local by Design Depot runs on localhost only; tokens never leave your machine. Landing is static on Cloudflare Workers
Industrial UI Depot dashboard with P logo (#0C0F12 ink + #FF3B1F signal + #FDB813 bolt), rail conveyor, health rail, queue meter, request tape, live traffic chart
Smart Scheduler Round-robin or least-used strategy, retries up to MAX_RETRIES=3, parks exhausted/error accounts via HealthChecker
Local SQLite data/pool.db via node:sqlite β€” auto-created, zero config
Docker Ready docker compose up -d persists ./data + ./logs

🎬 Demo

Watch the dashboard in action: account rack, live chat, health rail, queue meter, and request tape.


πŸš€ Quick Start

Prerequisites

  • Node.js 20+
  • npm or pnpm
  • (Optional) Docker & Docker Compose

1. Clone & Install

git clone https://github.com/Parithosh-Varma/puter-pool.git
cd puter-pool
cp .env.example .env   # SQLite at data/pool.db by default β€” no config needed
npm install && npm run build && npm start

2. Start Dashboard (separate terminal)

cd dashboard && npm install && npm run dev
# β†’ Tool: http://localhost:5173 (no auth, localhost-only)
# β†’ API:  http://localhost:3000  (landing stays on Cloudflare)

3. Add Puter Accounts

  1. Create free accounts at puter.com
  2. Get your token from browser DevTools β†’ Application β†’ Local Storage β†’ puter.com β†’ auth_token
  3. Paste tokens in the Depot UI at http://localhost:5173

βš™οΈ How It Works

flowchart LR
    A[Your App] --> B[Puter Pool API :3000]
    B --> C{Scheduler}
    C --> D[Account 1]
    C --> E[Account 2]
    C --> F[Account N]
    D --> G[Puter API]
    E --> G
    F --> G
    G --> H[AI Response]
    H --> A
Loading
  1. Create multiple Puter accounts (free at puter.com) β€” each gives daily AI credits
  2. Paste tokens in Depot at http://localhost:5173 β€” health + credit tracked per account
  3. Point any SDK at one endpoint β€” OpenAI POST /v1/chat/completions or Anthropic POST /v1/messages
  4. Scheduler shunts β€” round-robin or least-used, retries up to MAX_RETRIES=3, parks exhausted/error bays via HealthChecker
  5. Uninterrupted β€” pool handles rotation transparently, tape logs every request

πŸ”Œ API Reference

Proxy Endpoints (Same Pool, Same Failover)

Method Endpoint Format Description
POST /v1/chat/completions OpenAI {model, messages, stream, max_tokens, temperature}
POST /v1/messages Anthropic {model, max_tokens, messages, system, temperature, stream}
POST /anthropic/v1/messages Anthropic (alt) SDK baseURL: "/anthropic"
POST /anthropic/messages Anthropic (alt)
GET /v1/models OpenAI Live model list from Puter
GET /healthz β€” Liveness probe
GET /readyz β€” Readiness (503 if 0 active accounts)

App Endpoints

Method Endpoint Description
POST /api/ai/chat Auto-routed {model, prompt, stream}
GET /api/models Puter models (RSS + details)
GET /api/accounts List with health + credit (token redacted)
POST /api/accounts Add account {name, token, dailyCreditLimit}
DELETE /api/accounts/:id Remove account
PATCH /api/accounts/:id Update {status, token, name}
GET /api/stats Pool + scheduler stats
GET /api/dashboard Full UI data payload
GET /api/history?limit=100 Request history

Quick Examples

OpenAI curl

curl http://localhost:3000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-opus-5","messages":[{"role":"user","content":"Hello"}]}'

Anthropic curl

curl http://localhost:3000/v1/messages \
  -H "Content-Type: application/json" \
  -H "x-api-key: ignored" -H "anthropic-version: 2023-06-01" \
  -d '{"model":"claude-opus-5","max_tokens":1024,"messages":[{"role":"user","content":"Hello"}]}'

OpenAI SDK (Python)

from openai import OpenAI
client = OpenAI(base_url="http://localhost:3000/v1", api_key="ignored")
print(client.chat.completions.create(
    model="gpt-5.6-sol",
    messages=[{"role":"user","content":"Hello"}]
).choices[0].message.content)

Anthropic SDK (Python)

import anthropic
c = anthropic.Anthropic(base_url="http://localhost:3000", api_key="ignored")
print(c.messages.create(
    model="claude-opus-5",
    max_tokens=1024,
    messages=[{"role":"user","content":"Hello"}]
).content[0].text)

βš™οΈ Configuration

Full options in .env.example. Key variables:

Variable Default Description
PORT 3000 API server port
SQLITE_PATH data/pool.db Local SQLite file (auto-created)
SCHEDULER_STRATEGY round-robin round-robin | least-used
MAX_RETRIES 3 Accounts to try before returning 5xx
HEALTH_CHECK_INTERVAL_MS 60000 Re-verify account health interval
REQUEST_TIMEOUT_MS 30000 Per-request timeout
LOG_LEVEL info Logging verbosity

πŸ› οΈ Dashboard

http://localhost:5173 β€” TOOL Β· LOCALHOST ONLY (no login required)

  • πŸ’¬ Chat with any model (streaming)
  • πŸ“¦ Account Rack β€” add/enable/disable/delete cartridges
  • πŸ“Š Metrics β€” health / credit / latency / errorRate / consecutiveFailures
  • πŸš‚ Queue Rail (128 slots) + live tape + traffic chart
  • βš™οΈ Strategy Switch β€” round-robin ↔ least-used

πŸ—„οΈ Database

Local SQLite at SQLITE_PATH (data/pool.db) via node:sqlite β€” auto-created on first run.

  • Tables: puter_accounts + ai_responses
  • Mounted in Docker at ./data
  • Reference schema: supabase-schema.sql

🐳 Docker

docker compose up -d   # uses data/pool.db, no env needed

Persists:

  • ./data β†’ SQLite database
  • ./logs β†’ Application logs

☁️ Landing Page (Separate Deploy)

Static Vite app at /landing (gitignored), deployed to Cloudflare Workers:

cd landing && npm install && npm run build
source ~/bin/load-env.zsh  # CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID
npx wrangler deploy        # β†’ https://puterpool.parithosh.workers.dev

Features: Hero with curl examples, 400+ models grouped by lab (live RSS), how-it-works animation, API docs, comparison table, local steps, FAQ β€” LobeHub CDN icons + custom depot SVGs.


πŸ§ͺ Testing

npm test              # 54 tests (Vitest)
npm run test:coverage # With coverage report
npm run typecheck     # TypeScript strict check
npm run build         # Verify compilation

πŸ“ Project Structure

puter-pool/
β”œβ”€β”€ src/                 # Core TypeScript modules
β”‚   β”œβ”€β”€ accounts/        # Account management
β”‚   β”œβ”€β”€ scheduler/       # Round-robin / least-used
β”‚   β”œβ”€β”€ health/          # HealthChecker
β”‚   β”œβ”€β”€ proxy/           # OpenAI + Anthropic proxies
β”‚   β”œβ”€β”€ db/              # SQLite layer
β”‚   └── index.ts         # Entry point
β”œβ”€β”€ dashboard/           # React + Vite depot UI
β”œβ”€β”€ landing/             # Cloudflare Workers landing (gitignored)
β”œβ”€β”€ tests/               # Vitest suites
β”œβ”€β”€ data/                # SQLite (mounted in Docker)
β”œβ”€β”€ logs/                # Application logs
β”œβ”€β”€ assets/              # Demo video, screenshots (gitignored)
└── logo.png             # Brand assets

Star History

Star History Chart ---

🀝 Contributing

  1. Fork the repo
  2. Create a feature branch: git checkout -b feat/amazing-feature
  3. Run checks: npm run typecheck && npm test && npm run build
  4. Commit: git commit -m 'feat: add amazing feature'
  5. Push and open a PR

πŸ“„ License

Apache-2.0 β€” see LICENSE for details.


πŸ™ Acknowledgements

About

Free AI API proxy: pool Puter.com accounts for unlimited credits across 400+ models (Claude, GPT, Gemini, DeepSeek). Auto-failover, OpenAI-compatible endpoint.

Topics

Resources

Security policy

Stars

36 stars

Watchers

3 watching

Forks

Contributors

Languages