Package Update - BYOK Included ✅
Date: October 14, 2025
Package: photoswipe-pro-5.4.4.tgz
Status: ✅ BYOK functionality fully included
✅ YES - BYOK is in the Downloaded Package!
The downloadable package that users receive when they purchase a license now includes full BYOK (Bring Your Own Key) functionality.
What's Included
Package Contents
File: releases/photoswipe-pro-5.4.4.tgz (9.7 KB)
Key files:
- ✅
src/ai/CaptionProvider.js(4.8 KB) - Includes BYOK support - ✅
README.md(2.5 KB) - Complete BYOK documentation - ✅
src/ai/plugin.js- AI plugin with BYOK - ✅
src/ai/schema/ImageObject.js- SEO schema builder - ✅
src/license.js- License validation - ✅
LICENSE-commercial- Commercial license
What Users Get
When users install photoswipe-pro-5.4.4.tgz, they receive:
BYOK-enabled CaptionProvider
import { CaptionProvider } from 'photoswipe-pro';
const provider = new CaptionProvider({
baseUrl: '/api/ai',
apiKey: 'their-gemini-key', // BYOK parameter
provider: 'gemini' // BYOK parameter
});Batch Processing
await provider.generateBatch({
images: [ /* up to 50 */ ],
licenseKey: 'photoswipe-pro-license',
apiKey: 'their-gemini-key' // BYOK
});Complete Documentation in README.md
- How to get free Gemini API key
- BYOK usage examples
- Batch processing guide
- Provider options (Gemini vs OpenRouter)
Installation (User Side)
Step 1: Download Package
Users receive the package via:
- Email delivery (Lemon Squeezy)
- Download link on your site
- Or manually:
releases/photoswipe-pro-5.4.4.tgz
Step 2: Install
npm install ./photoswipe-pro-5.4.4.tgz
Step 3: Use with BYOK
import { CaptionProvider } from 'photoswipe-pro';
// User provides their own Gemini key
const provider = new CaptionProvider({
baseUrl: '/api/ai',
apiKey: 'AIzaSyABC123...', // Their Gemini key
provider: 'gemini'
});
const result = await provider.generate({
url: 'photo.jpg',
licenseKey: 'their-photoswipe-pro-license'
});
console.log(result.alt); // Works! ✅
Build Process
The package is built via:
node build/build-pro-package.js
This script:
- ✅ Copies all files from
src/pro/todist-pro/src/ - ✅ Includes updated
CaptionProvider.jswith BYOK - ✅ Generates README with BYOK documentation
- ✅ Creates tarball in
releases/photoswipe-pro-5.4.4.tgz
Verification
# Check package contents
tar -tzf releases/photoswipe-pro-5.4.4.tgz
# Output includes:
# - package/src/ai/CaptionProvider.js (BYOK code)
# - package/README.md (BYOK docs)
What Users See in README
When users open photoswipe-pro-5.4.4.tgz, the README includes:
Quick Start Section
## 🚀 Quick Start with BYOK (Bring Your Own Key)
PhotoSwipe Pro uses **BYOK** - you provide your own AI API key.
### Step 1: Get Your Free Gemini API Key
1. Visit https://aistudio.google.com/app/apikey
2. Click "Create API Key"
3. Copy your key
**Cost**: FREE tier available!
Code Examples
// Example from README
const provider = new CaptionProvider({
baseUrl: '/api/ai',
apiKey: 'YOUR-GEMINI-API-KEY',
provider: 'gemini'
});
Provider Options
- Gemini (FREE tier, ~$0.001/image)
- OpenRouter (~$0.01/image, better quality)
Server Configuration (What You Run)
When users use the package, your server needs to:
- Validate PhotoSwipe Pro license (always required)
- Accept user's API key (BYOK)
- Proxy AI requests with their key
Your .env:
# License validation (required)
LEMON_SQUEEZY_API_KEY=your-ls-key
# No AI keys needed - users provide their own!
# GEMINI_API_KEY= # Leave empty
# OPENROUTER_API_KEY= # Leave empty
Business Model Recap
What You Sell
PhotoSwipe Pro License: $49/year
- Includes: Code, features, support
- Users get: downloadable
photoswipe-pro-5.4.4.tgz
What Users Provide
Gemini API Key: FREE
- They get it from Google
- They pay Google directly (~$0-10/year)
Your Costs
AI Costs: $0 (users use their own keys) ✅
Delivery Flow
- User purchases PhotoSwipe Pro license ($49)
- Lemon Squeezy sends download link
- User downloads
photoswipe-pro-5.4.4.tgz - User installs via npm
- User gets free Gemini API key
- User uses BYOK with PhotoSwipe Pro
- You pay $0 for AI ✅
Testing the Package
Extract and Verify
# Extract package
cd /tmp
tar -xzf /path/to/photoswipe-pro-5.4.4.tgz
# Check CaptionProvider has BYOK
cat package/src/ai/CaptionProvider.js | grep "apiKey"
# Should show: this.apiKey = opts.apiKey || null;
# Check README mentions BYOK
cat package/README.md | grep "BYOK"
# Should show: "BYOK - Bring Your Own Key"
Install and Test
# Install in test project
npm install ./photoswipe-pro-5.4.4.tgz
# Test import
node -e "import('photoswipe-pro').then(m => console.log(m))"
# Should show: { CaptionProvider, ... }
Update Checklist
- BYOK code added to
src/pro/ai/CaptionProvider.js - Build script updated with BYOK README
- Package rebuilt with
node build/build-pro-package.js - Verified
CaptionProvider.jsin package (4.8 KB) - Verified README in package (2.5 KB)
- Package size: 9.7 KB (includes BYOK docs)
- Update Lemon Squeezy download link
- Test download flow for new customers
- Update website/docs to mention BYOK
Next Steps for Deployment
1. Update Download Link
Point Lemon Squeezy delivery to:
https://your-site.com/releases/photoswipe-pro-5.4.4.tgz
2. Update Marketing
Website copy:
PhotoSwipe Pro: $49/year
✓ AI caption generation (BYOK)
✓ You provide free Gemini API key
✓ Your AI costs: $0-10/year
[Get Free Gemini Key →]
3. Customer Onboarding
Email template:
Thanks for purchasing PhotoSwipe Pro!
Download your package:
[Download photoswipe-pro-5.4.4.tgz]
Quick start:
1. Install: npm install ./photoswipe-pro-5.4.4.tgz
2. Get free Gemini key: https://aistudio.google.com/app/apikey
3. Follow README for usage
Your AI costs: ~$0-10/year (FREE tier available)
4. Support
Be ready to help users:
- How to get Gemini API key
- How to configure BYOK
- Troubleshooting API key issues
FAQ for Users
Q: Do I need my own API key?
A: Yes (BYOK). Get a free Gemini key from Google.
Q: How much do AI captions cost me?
A: $0-10/year with Gemini's FREE tier.
Q: Can I use OpenRouter instead?
A: Yes! Just provide your OpenRouter key instead.
Q: What if I don't want to get an API key?
A: You can ask the server owner to provide one (but this costs them money).
Q: Is my API key secure?
A: Yes. It's stored only in your browser (localStorage), never on the server.
Summary
✅ BYOK is fully included in the downloadable package
✅ Users get complete code with BYOK support
✅ README includes BYOK documentation
✅ You pay $0 for AI costs
✅ Users pay $0-10/year for Gemini
✅ Package is ready for customer delivery
The package users download when they have a license DOES include BYOK functionality! 🎉
Package Location: releases/photoswipe-pro-5.4.4.tgz
Package Size: 9.7 KB
Includes: BYOK code, batch processing, complete docs
Ready: ✅ YES - deploy immediately!