Skip to content

Cloud Tiers & Models

Teachback routes cloud AI sessions through a Cloudflare Worker that proxies to different LLM providers based on your subscription tier.
The X-Tier header is sent with every request so the worker picks the right upstream.


TierMonthly priceCloud modelSessions/monthBYOK
Free$0Gemini 2.5 Flash Lite50Gemini key
Standard$4.99Gemini 2.5 FlashUnlimitedGemini key
Pro$9.99GPT-4oUnlimitedOpenAI key
Ultimate$14.99Claude (Anthropic)UnlimitedAnthropic key

All tiers have unlimited local sessions (device-only, no cloud AI involved).


Flutter app
│ X-Tier: free | standard | pro | ultimate
Cloudflare Worker (tbapi.goappkit.com)
├─ free / standard ──▶ Google Gemini API
├─ pro ──▶ OpenAI API
└─ ultimate ──▶ Anthropic API

When a BYOK key is present for your tier, the Flutter app bypasses the worker entirely and calls the provider API directly.


Free-tier quota is enforced by a device_quota table in Supabase.
Each device is identified by a UUID stored in secure storage (iOS Keychain / Android EncryptedSharedPreferences).

The worker increments the session count via a Supabase RPC call on each successful completion.
When the count exceeds the tier limit, the worker returns HTTP 429 Too Many Requests.


  1. Open SettingsCurrent PlanUpgrade.
  2. Select a tier on the paywall screen.
  3. Complete the in-app purchase via the App Store or Google Play.
  4. Teachback verifies the purchase through RevenueCat and updates currentTierProvider in real time.