Overview
This page tracks the cost of every external service that powers the High IQ platform. The biggest cost center is the Strain Research Pipeline (Trigger.dev v2) — a 7-stage AI pipeline that researches, enriches, and generates images for cannabis strains. The Strain Music Pipeline adds AI-generated songs per strain. Other platform costs (auth, hosting, database) are documented at the bottom.Strain Research Pipeline (Trigger.dev v2)
The pipeline chains 7 stages, each with its own external API calls. Here’s exactly what happens per strain and what it costs.Pipeline Architecture
Stage 01: Search (Exa)
Stage 02: Filter (Local)
Stage 03: Scrape (Firecrawl)
Stage 04: Extract (Gemini)
Stage 05: Process (Claude AI)
Promise.all()). Copywriter and Image Prompts run sequentially with 6-second checkpointed waits between them.Stage 06: Imaging (Gemini)
Stage 07: Save (Supabase)
upsert_strain_dual_table RPC. Writes to both strains_master (JSONB) and strains_v2 (columns) in a single transaction.Per-Strain Cost: Direct Mode (Self-Serve)
Cost by Provider
Cost by Stage
Per-Strain Cost: Batch Mode (Reference)
Strain Music Pipeline
Auto-fires after research completes. Generates a unique AI song per strain using Google Lyria 3 Pro. Always runs in direct mode (no Lyria batch API exists).Stage 01: Analyze
Stage 02: Build Prompt (Gemini)
Stage 03: Generate (Lyria 3 Pro)
Stage 04: Upload
strain-music bucket) and updates strains_v2 with audio metadata. No AI call.Per-Strain Music Cost
Combined Per-Strain Total
Scale Projections
Self-Serve Model (Direct Mode — Production)
All strains researched on-demand at direct-mode pricing (0.087 music).Research Only ($0.57/strain)
Research + Music ($0.66/strain)
Batch Mode (Reference — Bulk Backfill)
If batch mode were used for a large backfill operation (0.087 music).Self-Serve Usage Estimates
Since the pipeline is now self-serve (triggered by user visits), actual costs depend on user traffic:Monthly Fixed Costs (Subscriptions)
These are paid regardless of usage volume.Credit Budgeting
Firecrawl Credit Budget
Firecrawl Credit Budget
- 100,000 credits/month included in Standard plan
- At ~10 URLs/strain: supports ~10,000 strains/month
- Extra credits if needed: 1.90 per 1,000 credits**
- At self-serve pace (25/day): ~750 strains/month — well within included credits
Trigger.dev Compute Budget
Trigger.dev Compute Budget
- $50 included usage/month on Pro plan
- At $0.021/strain compute: covers ~2,380 strains/month
- At self-serve pace (25/day): ~750 strains/month × 15.75/month** — well within budget
- Beyond included: billed at per-second machine rates
Exa Search Budget
Exa Search Budget
- First 1,000 searches/month free on paid plans
- Beyond free tier: $7 per 1,000 searches
- At self-serve pace (25/day): ~750/month — covered by free tier
Vendor Pricing Reference
Direct links to current pricing documentation for every external service used.AI Models
Search & Scraping
Infrastructure
Unit Pricing Tables
Detailed per-token / per-unit pricing for the specific models and tiers we use.Anthropic Claude (Direct vs Batch)
Google Gemini (Standard vs Batch)
Trigger.dev Compute (Pro Plan)
Cost Math: Worked Example
Here’s the full math for one strain researched in direct mode, showing exactly how each number is calculated.Stage 01: Exa Search — $0.007
Stage 01: Exa Search — $0.007
- 1 search call
- Exa pricing: $7 per 1,000 searches
- Cost: 1 / 1,000 × 0.007**
Stage 03: Firecrawl Scrape — $0.010
Stage 03: Firecrawl Scrape — $0.010
- ~10 URLs scraped (1 credit each)
- Standard plan: 100k credits for 0.00099/credit
- Cost: 10 × 0.010**
Stage 04: Gemini Extraction — $0.061
Stage 04: Gemini Extraction — $0.061
- ~10 articles × 12,500 input tokens = 125,000 input tokens
- ~10 articles × 2,000 output tokens = 20,000 output tokens
- Input: 125,000 / 1,000,000 × 0.03125
- Output: 20,000 / 1,000,000 × 0.03000
- Total: ~$0.061
Stage 05: Claude FactFinder (3 passes) — $0.075
Stage 05: Claude FactFinder (3 passes) — $0.075
- 3 passes × ~10k input tokens = 30,000 input tokens (Haiku 4.5)
- 3 passes × ~3k output tokens = 9,000 output tokens
- Input: 30,000 / 1,000,000 × 0.030
- Output: 9,000 / 1,000,000 × 0.045
- Total: $0.075
Stage 05: Claude Copywriter — $0.135
Stage 05: Claude Copywriter — $0.135
- ~15,000 input tokens (Sonnet 4.6)
- ~6,000 output tokens (max 8,192)
- Input: 15,000 / 1,000,000 × 0.045
- Output: 6,000 / 1,000,000 × 0.090
- Total: $0.135
Stage 05: Claude Image Prompts — $0.060
Stage 05: Claude Image Prompts — $0.060
- ~5,000 input tokens (Sonnet 4.6)
- ~3,000 output tokens (max 4,096)
- Input: 5,000 / 1,000,000 × 0.015
- Output: 3,000 / 1,000,000 × 0.045
- Total: $0.060
Stage 06: Gemini Imaging (2 × 2K) — $0.202
Stage 06: Gemini Imaging (2 × 2K) — $0.202
- 2 images at 2K resolution (2048×2048px)
- Each 2K image = 1,680 output tokens
- Per image: 1,680 / 1,000,000 × 0.1008
- Text input prompts (~4k tokens): 4,000 / 1,000,000 × 0.002
- Total: 2 × 0.002 = ~$0.202
Trigger.dev Compute — $0.021
Trigger.dev Compute — $0.021
- 8 task runs (orchestrator + 7 stages)
- Run invocations: 8 × 0.0002
- Compute (checkpointed waits are free):
- Orchestrator: ~3s × small-1x = $0.0001
- Stage 01: ~8s × small-1x = $0.0003
- Stage 02: ~3s × micro = $0.0001
- Stage 03: ~8s × medium-2x = $0.0014
- Stage 04: ~30s × medium-2x = $0.0051
- Stage 05: ~20s × medium-2x = $0.0034
- Stage 06: ~30s × large-1x = $0.0102
- Stage 07: ~3s × small-1x = $0.0001
- Total: ~$0.021
Music: Lyria 3 Pro — $0.087
Music: Lyria 3 Pro — $0.087
- Gemini prompt builder: ~2k in + ~2k out at Flash Lite pricing = ~$0.001
- Lyria 3 Pro: fixed $0.080 per full song
- Trigger.dev compute (5 runs, ~80s): ~$0.006
- Total: ~$0.087
