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.
Data snapshot (July 3, 2026): 2,525 strains researched, 2,750 in the unprocessed queue, and ~25,000 unmatched competitor strains tracked (Leafly/AllBud sitemaps). Pipeline throughput has been ≈0 strains/week recently — a restart decision is pending. At direct-mode pricing (0.57/strain),thetheoreticalcosttoprocessthecurrentqueueis 0.57/strain), the theoretical cost to process the current queue is **~1,568** for research + ~239formusic= 239** for music = **~1,807 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.
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.
3

Stage 03: Scrape (Firecrawl)

Batch-scrapes all filtered URLs to extract markdown content.
4

Stage 04: Extract (Gemini)

Structured data extraction from each scraped article — terpenes, effects, aromas, lineage, awards, cannabinoids.
5

Stage 05: Process (Claude AI)

Three-pass FactFinder + Copywriter + Image Prompt generation. This is the most expensive stage.5 API calls per strain:The 3 FactFinder passes run in parallel (Promise.all()). Copywriter and Image Prompts run sequentially with 6-second checkpointed waits between them.
6

Stage 06: Imaging (Gemini)

Generates 2 AI images per strain at 2K resolution (2048×2048px).
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.

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.

Cost by Provider

Cost by Stage


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.

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


Combined Per-Strain Total


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)

Research + Music ($0.66/strain)

Batch Mode (Reference — Bulk Backfill)

If batch mode were used for a large backfill operation (0.33research+0.33 research + 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

  • 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

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)

MTok = million tokens. Batch API gives a flat 50% discount on both input and output.

Google Gemini (Standard vs Batch)

Trigger.dev Compute (Pro Plan)

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