Documentation Index
Fetch the complete documentation index at: https://docs.tesslate.com/llms.txt
Use this file to discover all available pages before exploring further.

Overview
OpenSail uses a multi-source credit system for AI usage, a four-tier subscription model for platform access, and a per-app, per-dimension billing engine for published apps on the marketplace. Payments run through Stripe with idempotent webhook fulfillment.Four credit pools
Daily, bundled, signup bonus, and purchased, consumed in priority order
Four tiers
Free, Basic, Pro, Ultra, with increasing limits and BYOK on Pro+
Per-dimension app billing
Three dimensions (AI, compute, platform fee), four modes per dimension
Creator payouts
90% to creator, 10% platform, via Stripe Connect
Credits
Credits are the unified currency for AI usage. One credit equals one US cent. Costs are calculated in cents with Decimal arithmetic so no rounding drift compounds over long runs.The four credit pools
| Pool | Source | Expiration | Priority |
|---|---|---|---|
| Daily | Free-tier allowance, 5 credits per day | Resets at UTC midnight | 1st (consumed first) |
| Bundled | Monthly allowance from your subscription tier | Resets every 30 days on your billing date | 2nd |
| Signup bonus | One-time gift at registration, 15,000 credits | Expires after 60 days | 3rd |
| Purchased | Credit packages you buy | Never expire | 4th (consumed last) |
How deduction works
Pre-request check
Before the agent calls the model,
check_credits(user, model_name) verifies you have sufficient credits. BYOK routes always pass this check since no platform credits are charged.Cost calculation
calculate_cost_cents(model, tokens_in, tokens_out) looks up the current per-token prices (fetched live from LiteLLM, cached 5 minutes), multiplies, and rounds up with ceiling arithmetic. Non-zero usage always costs at least 1 cent.Deduction
deduct_credits pulls from pools in priority order under a SELECT FOR UPDATE lock. Concurrent requests are serialized; the balance never goes negative.Credit packages
Buy credits that never expire:| Package | Credits | Price |
|---|---|---|
| Small | 500 | $5 |
| Medium | 2,500 | $25 |
| Large | 10,000 | $100 |
| Team | 50,000 | $500 |
Subscription tiers
| Feature | Free | Basic ($20/mo) | Pro ($49/mo) | Ultra ($149/mo) |
|---|---|---|---|---|
| Monthly bundled credits | 0 | 500 | 2,000 | 8,000 |
| Daily credits | 5 | 0 | 0 | 0 |
| Max projects | 3 | 7 | 15 | 40 |
| Max deployments | 1 | 3 | 5 | 20 |
| BYOK | No | No | Yes | Yes |
| Support | Community | Priority | Priority | |
| Annual billing | N/A | Available | Available | Available |
Exact tier pricing and credit allocations are configured in the platform and can vary per deployment. Self-hosted instances can set their own tier structure.
Upgrading
Stripe Checkout
You’re redirected to Stripe’s secure checkout. Card details never touch OpenSail servers.
Canceling
Cancellation takes effect at the end of the current period. You keep all tier benefits until then. Purchased credits are never affected by tier changes; they persist forever.Team billing
Teams have their own billing scope: a separate subscription tier, a separate credit balance, and a separate Stripe customer. Team admins manage billing at Settings, Team Billing. Individual team members use the team’s credits when running agents on team-owned projects, and their personal credits for personal projects. For teams with billing admins separate from platform admins, the permissions system (orchestrator/app/permissions.py) scopes billing actions to the admin role.
App billing: three dimensions, four modes
Published apps on the Tesslate Apps marketplace have their own billing model, separate from platform credits. When a user installs your app, the creator decides who pays for what.The three dimensions
- AI compute
- General compute
- Platform fee
All model calls the app’s bundled agents make during execution. Priced per token, calculated through the same dynamic LiteLLM pricing used by the core credit system.
The four modes per dimension
Each dimension can be set to one of four modes, independently:| Mode | Who pays | When to use |
|---|---|---|
| Creator pays | The app creator pays this dimension | Free-to-try apps, lead-gen apps, demos |
| Installer pays | The user installing pays this dimension | Standard marketplace apps |
| Platform subsidized | Tesslate covers this dimension | Featured apps, promotional launches |
| BYOK (bring your own key) | Installer uses their own provider key, bypassing routing entirely | Power users, enterprise installations |
Promotional budgets
Creators can sponsor the first N installers by funding a promotional budget. While the fund lasts, all three dimensions are free to the installer. When the fund runs out, billing flips to whatever mode the creator configured. This is the go-to pattern for launches: free for the first 1,000 installers, then installer-pays. Installers get a taste, creators get distribution.Caps and overage
Each dimension has its own caps and overage behavior configurable per app:- Hard cap: stop executing when the cap is hit
- Soft cap: warn, prompt for an override, continue
- No cap: run until the subscriber’s credits are exhausted
Creator payouts
Usage tracking
Summary view
See total cost, tokens in/out, request count for the current billing period, broken down by model and by agent.
Detail view
Click into usage logs for per-request records with model, tokens, cost, agent, project, BYOK status, and timestamp.
Stripe reliability
OpenSail’s Stripe integration is built for idempotency and reliability under webhook replay:- Every fulfillment path checks the
stripe_payment_intentfor duplicate processing - Verify-checkout on redirect is a safe no-op if the webhook already fulfilled
- Subscription updates, tier changes, and cancellations all log to the audit table
- Transfer and invoice creation include
idempotency_keyto prevent upstream replay
Test cards (for self-hosted and dev)
| Card | Behavior |
|---|---|
4242 4242 4242 4242 | Succeeds |
4000 0000 0000 0002 | Declined |
4000 0025 0000 3155 | Requires 3D Secure |
4000 0000 0000 9995 | Insufficient funds |
Troubleshooting
Payment declined
Payment declined
Card declined at the bank. Update payment method in Settings, Billing, or through the Stripe Customer Portal.
Credits didn't post after purchase
Credits didn't post after purchase
Wait 30 seconds for the webhook to fire. Refresh the page (verify-checkout fallback). Check Transaction History for status. Contact support with the Stripe session ID if still missing.
Bundled credits didn't reset
Bundled credits didn't reset
The daily reset loop runs hourly. Free-tier users reset at UTC midnight. Paid-tier users reset on their billing date; the Stripe webhook is the primary trigger, with a safety-net hourly sweep.
Credits depleting fast
Credits depleting fast
Check usage by model in Settings, Billing, Usage. Switch heavy tasks to cheaper models (Haiku, Flash, Qwen-Coder). Add BYOK on Pro or Ultra to bypass credits entirely. Set per-run cost limits on specific agents.
Next steps
Model Management
Pick cost-effective models and understand BYOK
API Keys
Add BYOK provider keys and external API keys
Publishing Apps
Set up the three billing dimensions and promotional budgets
Marketplace
Browse apps and see pricing in the wild