Skip to main content

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.
Self-serve model (March 2026): The pipeline no longer runs in batch. When a user visits a strain page with no research, they tap a button to trigger on-demand research via direct mode. Results appear in ~5-10 minutes. This means all strain research runs at direct-mode pricing.
Full queue: ~19,000 unprocessed strains. Already researched: ~171 strains. At direct-mode pricing (0.57/strain),thetheoreticalcosttoprocesstheentirebacklogis 0.57/strain), the theoretical cost to process the entire backlog is **~10,830** for research + ~1,653formusic= 1,653** for music = **~12,483 total.

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

1

Stage 01: Search (Exa)

Neural search for web articles about the strain. Returns 25 results with extracted text snippets.
DetailValue
APIExa (search())
Calls per strain1
Results requested25
Search typeauto (hybrid neural + keyword)
Max chars/result5,000
Trigger.dev machinesmall-1x
2

Stage 02: Filter (Local)

Filters search results to URLs that actually mention the strain name. Uses 11 pattern variants (slugs, no-spaces, accent-normalized, spelling variants). No external API calls.
DetailValue
APINone (local pattern matching)
Typical output5-15 relevant URLs
3

Stage 03: Scrape (Firecrawl)

Batch-scrapes all filtered URLs to extract markdown content.
DetailValue
APIFirecrawl (asyncBatchScrapeUrls())
Calls per strain1 batch call
URLs per batch5-15 (avg ~10)
Credits consumed1 credit per URL (~10/strain)
FormatMarkdown only, main content
Trigger.dev machinemedium-2x
4

Stage 04: Extract (Gemini)

Structured data extraction from each scraped article — terpenes, effects, aromas, lineage, awards, cannabinoids.
DetailValue
APIGoogle Gemini
Modelgemini-3.1-flash-lite-preview
Calls per strain~10 (one per article, parallel)
Input tokens/article~12,500 (50k char limit)
Output tokens/article~2,000 (structured JSON)
Total tokens/strain~125k input + ~20k output
Trigger.dev machinemedium-2x (concurrency: 40)
5

Stage 05: Process (Claude AI)

Three-pass FactFinder + Copywriter + Image Prompt generation. This is the most expensive stage.5 API calls per strain:
PassModelMax TokensPurpose
FactFinder Coreclaude-haiku-4-5-202510014,096Strain type, lineage, cannabinoids
FactFinder Profileclaude-haiku-4-5-202510014,096Terpenes, effects, aromas
FactFinder Metaclaude-haiku-4-5-202510014,096Medical uses, awards, conflicts
Copywriterclaude-sonnet-4-68,192Marketing descriptions, Professor High insights
Image Promptsclaude-sonnet-4-64,096Hero + mascot image generation prompts
The 3 FactFinder passes run in parallel (Promise.all()). Copywriter and Image Prompts run sequentially with 6-second checkpointed waits between them.
DetailValue
Total Haiku tokens~30k input + ~9k output
Total Sonnet tokens~20k input + ~9k output
Trigger.dev machinemedium-2x (concurrency: 15)
6

Stage 06: Imaging (Gemini)

Generates 2 AI images per strain at 2K resolution (2048×2048px).
DetailValue
APIGoogle Gemini
Modelgemini-3.1-flash-image-preview
Images per strain2 (hero + mascot)
Resolution2K (2048×2048px, 1680 output tokens/image)
StorageSupabase (strain-images/ and mascot-images/ buckets)
Trigger.dev machinelarge-1x (4 vCPU, 8GB RAM for base64)
7

Stage 07: Save (Supabase)

Atomic dual-table write via upsert_strain_dual_table RPC. Writes to both strains_master (JSONB) and strains_v2 (columns) in a single transaction.
DetailValue
APISupabase RPC
CostIncluded in Supabase plan

Per-Strain Cost: Direct Mode (Self-Serve)

This is the production pricing model. Since we switched to self-serve (on-demand per user visit), all strains are processed in direct mode.
StageServiceUnitsCost
01 SearchExa (1 search, 25 results)1 API call$0.007
02 FilterLocal pattern matching$0.000
03 ScrapeFirecrawl (~10 URLs)~10 credits$0.010
04 ExtractGemini 3.1 Flash Lite (~10 articles)~125k in + ~20k out$0.061
05 FactFinderClaude Haiku 4.5 (×3 passes)~30k in + ~9k out$0.075
05 CopywriterClaude Sonnet 4.6~15k in + ~6k out$0.135
05 Image PromptsClaude Sonnet 4.6~5k in + ~3k out$0.060
06 ImagingGemini 3.1 Flash Image (2 × 2K)2 images$0.202
07 SaveSupabase RPC$0.000
ComputeTrigger.dev (8 runs, ~105s active)$0.021
Total~$0.57 / strain

Cost by Provider

ProviderCost/StrainShare
Anthropic (Claude)$0.27047%
Google (Gemini)$0.26346%
Trigger.dev$0.0214%
Firecrawl$0.0102%
Exa$0.0071%

Cost by Stage

StageCost/StrainShare
06 Imaging (Gemini)$0.20235%
05 Copywriter (Sonnet)$0.13524%
05 FactFinder (Haiku ×3)$0.07513%
04 Extract (Gemini)$0.06111%
05 Image Prompts (Sonnet)$0.06011%
Compute (Trigger.dev)$0.0214%
03 Scrape (Firecrawl)$0.0102%
01 Search (Exa)$0.0071%

Per-Strain Cost: Batch Mode (Reference)

Batch mode is no longer the primary processing model but remains available for bulk backfills or special operations. Batch discounts apply to Stage 05 (Anthropic Batch API, 50% off) and Stage 06 (Gemini Batch API, 50% off). Other stages are unchanged.
StageDirectBatchSavings
01 Search (Exa)$0.007$0.007
02 Filter (Local)$0.000$0.000
03 Scrape (Firecrawl)$0.010$0.010
04 Extract (Gemini)$0.061$0.061
05 FactFinder (Haiku ×3)$0.075$0.03850%
05 Copywriter (Sonnet)$0.135$0.06850%
05 Image Prompts (Sonnet)$0.060$0.03050%
06 Imaging (Gemini 2×2K)$0.202$0.10150%
07 Save (Supabase)$0.000$0.000
Compute (Trigger.dev)$0.021$0.018~14%
Total$0.571$0.33342%

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).
1

Stage 01: Analyze

Fetches strain data and downloads hero/mascot images for multimodal input. No AI call.
2

Stage 02: Build Prompt (Gemini)

AI generates a creative, strain-specific Lyria 3 prompt from the strain’s terpene profile, effects, aromas, and Professor High insight.
DetailValue
Modelgemini-3.1-flash-lite-preview
Tokens~2k input + ~2k output
3

Stage 03: Generate (Lyria 3 Pro)

Generates a full 3-minute song with lyrics. Takes the text prompt + hero image + mascot image as multimodal input.
DetailValue
Modellyria-3-pro-preview
Price$0.08 per song (fixed)
OutputMP3 audio (~4MB) + lyrics text
Concurrency3 (rate-limited)
4

Stage 04: Upload

Uploads MP3 to Supabase Storage (strain-music bucket) and updates strains_v2 with audio metadata. No AI call.

Per-Strain Music Cost

ComponentCost
Gemini 3.1 Flash Lite (prompt building)$0.001
Lyria 3 Pro (full song)$0.080
Trigger.dev (5 runs, ~80s active)$0.006
Supabase Storage (~4MB)~$0.000
Total~$0.087 / strain

Combined Per-Strain Total

PipelineDirect ModeBatch Mode
Research (7 stages)$0.571$0.333
Music (4 stages)$0.087$0.087
Combined$0.658$0.420

Scale Projections

Self-Serve Model (Direct Mode — Production)

All strains researched on-demand at direct-mode pricing (0.57research+0.57 research + 0.087 music).

Research Only ($0.57/strain)

StrainsCost
10$5.71
50$28.55
100$57.10
500$285.50
1,000$571
5,000$2,855
10,000$5,710
19,000$10,849

Research + Music ($0.66/strain)

StrainsCost
10$6.58
50$32.90
100$65.80
500$329
1,000$658
5,000$3,290
10,000$6,580
19,000$12,502

Batch Mode (Reference — Bulk Backfill)

If batch mode were used for a large backfill operation (0.33research+0.33 research + 0.087 music).
StrainsResearch OnlyResearch + Music
1,000$333$420
5,000$1,665$2,100
10,000$3,330$4,200
19,000$6,327$7,980

Self-Serve Usage Estimates

Since the pipeline is now self-serve (triggered by user visits), actual costs depend on user traffic:
Daily ResearchesMonthly Cost (Research)Monthly Cost (Research + Music)
5/day$85.50$98.70
10/day$171$197.40
25/day$427.50$493.50
50/day$855$987
100/day$1,710$1,974

Monthly Fixed Costs (Subscriptions)

These are paid regardless of usage volume.
ServicePlanMonthly CostWhat’s Included
Trigger.devPro$50$50 compute credit (~2,380 strains worth)
FirecrawlStandard$99100k scrape credits (~10,000 strains worth)
ExaPay-per-use$0 baseFirst 1,000 searches/month free
AnthropicPay-per-use$0 base
Google AI (Gemini + Lyria)Pay-per-use$0 base
SupabasePro (shared)Already payingIncluded with platform
VercelPro (3 projects)Already payingAPI + Website + Mobile Web hosting
ConvexProAlready payingUser data, real-time sync
ClerkProAlready payingAuthentication
Total fixed~$149/mo(pipeline-specific)

Credit Budgeting

  • 100,000 credits/month included in Standard plan
  • At ~10 URLs/strain: supports ~10,000 strains/month
  • Extra credits if needed: 57/30,000=57/30,000 = **1.90 per 1,000 credits**
  • At self-serve pace (25/day): ~750 strains/month — well within included credits
  • $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 × 0.021=0.021 = **15.75/month** — well within budget
  • Beyond included: billed at per-second machine rates
  • 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

VendorPricing PageModels We Use
Anthropic (Claude)anthropic.com/pricingHaiku 4.5, Sonnet 4.6
Google Geminiai.google.dev/pricing3.1 Flash Lite, 3.1 Flash Image
Google Lyria 3ai.google.dev/pricing (bottom of page)Lyria 3 Pro ($0.08/song)

Search & Scraping

VendorPricing PageWhat We Use
Exaexa.ai/pricingSearch endpoint ($7/1k)
Firecrawlfirecrawl.dev/pricingScrape (1 credit/page)

Infrastructure

VendorPricing PageWhat We Use
Trigger.devtrigger.dev/pricingPro plan, compute + invocations
Vercelvercel.com/pricingPro plan, 3 projects
Supabasesupabase.com/pricingPro plan, DB + Storage
Convexconvex.dev/pricingPro plan, user data
Clerkclerk.com/pricingPro plan, auth

Unit Pricing Tables

Detailed per-token / per-unit pricing for the specific models and tiers we use.

Anthropic Claude (Direct vs Batch)

ModelInput (Direct)Output (Direct)Input (Batch)Output (Batch)
Haiku 4.5 (claude-haiku-4-5-20251001)$1.00/MTok$5.00/MTok$0.50/MTok$2.50/MTok
Sonnet 4.6 (claude-sonnet-4-6)$3.00/MTok$15.00/MTok$1.50/MTok$7.50/MTok
MTok = million tokens. Batch API gives a flat 50% discount on both input and output.

Google Gemini (Standard vs Batch)

ModelInput (Std)Output (Std)Input (Batch)Output (Batch)
3.1 Flash Lite (text)$0.25/MTok$1.50/MTok$0.125/MTok$0.75/MTok
3.1 Flash Image (text input)$0.50/MTok$3.00/MTok$0.25/MTok$1.50/MTok
3.1 Flash Image (per 2K image)$0.101$0.050

Trigger.dev Compute (Pro Plan)

MachinevCPURAMCost/secCost/hour
micro0.250.25 GB$0.0000169$0.061
small-1x0.50.5 GB$0.0000338$0.122
medium-2x24 GB$0.0001700$0.612
large-1x48 GB$0.0003400$1.224
Run invocation: **0.000025/run(0.000025/run** (0.25 per 10,000 runs). Waits longer than 5 seconds are checkpointed and free (no compute charges).

Cost Math: Worked Example

Here’s the full math for one strain researched in direct mode, showing exactly how each number is calculated.
  • 1 search call
  • Exa pricing: $7 per 1,000 searches
  • Cost: 1 / 1,000 × 7=7 = **0.007**
  • ~10 URLs scraped (1 credit each)
  • Standard plan: 100k credits for 99=99 = 0.00099/credit
  • Cost: 10 × 0.00099= 0.00099 = **~0.010**
  • ~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.25=0.25 = 0.03125
  • Output: 20,000 / 1,000,000 × 1.50=1.50 = 0.03000
  • Total: ~$0.061
  • 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 × 1.00=1.00 = 0.030
  • Output: 9,000 / 1,000,000 × 5.00=5.00 = 0.045
  • Total: $0.075
  • ~15,000 input tokens (Sonnet 4.6)
  • ~6,000 output tokens (max 8,192)
  • Input: 15,000 / 1,000,000 × 3.00=3.00 = 0.045
  • Output: 6,000 / 1,000,000 × 15.00=15.00 = 0.090
  • Total: $0.135
  • ~5,000 input tokens (Sonnet 4.6)
  • ~3,000 output tokens (max 4,096)
  • Input: 5,000 / 1,000,000 × 3.00=3.00 = 0.015
  • Output: 3,000 / 1,000,000 × 15.00=15.00 = 0.045
  • Total: $0.060
  • 2 images at 2K resolution (2048×2048px)
  • Each 2K image = 1,680 output tokens
  • Per image: 1,680 / 1,000,000 × 60.00=60.00 = 0.1008
  • Text input prompts (~4k tokens): 4,000 / 1,000,000 × 0.50=0.50 = 0.002
  • Total: 2 × 0.101+0.101 + 0.002 = ~$0.202
  • 8 task runs (orchestrator + 7 stages)
  • Run invocations: 8 × 0.000025=0.000025 = 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
  • 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

Potential Cost Optimizations

Ranked by impact, for future consideration:
OptimizationSavings/StrainImpactTrade-off
Switch to 1K images (1024px)~$0.06812%Lower image quality
Use Haiku for Image Prompts~$0.0407%Potentially less creative prompts
Use Gemini Batch for extraction~$0.0305%Adds latency (bad for self-serve)
Reduce search to 15 results~$0.0204%Fewer source articles
Use Lyria 3 Clip (30s) instead of Pro~$0.040Music: 46%Short clips instead of full songs
Most batch-mode optimizations don’t apply to the self-serve model since users expect results in 5-10 minutes. The Anthropic Batch API takes hours and is incompatible with on-demand research.

Other Platform Costs

Services that are already paid and shared across the platform (not per-strain).
ServicePlanMonthlyPurpose
VercelPro (3 projects)~$60API, Website, Mobile Web hosting
SupabasePro~$25PostgreSQL, Storage, Auth
ConvexPro~$25Real-time user data sync
ClerkPro~$25Authentication
MintlifyStarter~$0Documentation site
SentryTeam~$26Error monitoring
EAS (Expo)Production~$99iOS builds and submissions
These are approximate monthly costs. Actual amounts may vary based on usage tiers and billing cycles. Check each vendor dashboard for current billing.

Version History

DateChange
March 29, 2026Initial cost analysis — all models verified from code, pricing from vendor docs