Skip to content

Cost per pack, guest and event

The owner pricing an event, and the operator who has to keep the provider balance above zero.

  • One pack costs about $0.42 of AI generation in the current pipeline (measured: $0.417 over 7 packs on the server; $0.414 over 10).
  • 70 guests ≈ $29–30. Rule of thumb: guests × $0.42, plus 20 %.
  • Almost all of it is image generation; vision checks are about 1 % of a pack.
  • A single job can never cost more than JOB_MAX_COST_USD (default $1.50). An empty provider balance pauses the system instead of burning guest time.
  • All figures are estimates from token counts recorded per call. The provider’s invoice is the truth; the two have agreed within a few dollars over the project.
Source What it holds
docs/COST_HISTORY.md Every pack and tool run of the first weeks, grouped by day, kind of work and pipeline stage
docs/cost_history.csv The same, row by row (92 rows; ;-separated) with a basis column: accounted or estimated
docs/LOAD_TEST_REPORT.md Cost of 7 consecutive packs on the server
HANDOFF.md, “Pack limit, cost accounting, admin panel” Token counts and price per call for each stage
The api_usage table Live accounting, one row per provider call

From the provider’s public price list as recorded in the repository on 2026-10-18. Re-check them before an event and update the PRICE_* variables — an empty price counts as zero and understates spend.

Model role Price
Image model, input $0.50 per million tokens
Image model, image output $60 per million tokens — a 1K image is 1 120 tokens, a 2K image 1 680
Image model, text output $3 per million tokens
Vision model, input $0.30 per million tokens
Vision model, output including reasoning $2.50 per million tokens

Rate-limited (429) and “no credits” (402) answers are not billed.

Consistency mode, layout 3x4 (HANDOFF.md):

Stage Model Resolution Cost per call Calls per pack Share
Appearance passport vision — $0.0017 1 under 1 %
Anchor portrait image 1K $0.0682 1, sometimes 2 about 16 %
Anchor verification vision — $0.0008 1 under 1 %
Sheet (four figures) image 2K $0.1023 3 about 73 %
Single-figure regeneration image 1K $0.0684 0–4 0–40 %
Pack check, regeneration check vision — $0.0012 / $0.0008 1–2 under 1 %

A pack with no regenerations costs about $0.38; each regenerated figure adds about $0.07. In the load test the split was: sheets $2.27, anchors $0.55, regenerations $0.14, all vision calls $0.03.

Completed packs only (COST_HISTORY.md, “Cost and time of a pack by stage”):

Pipeline stage Packs Cost per pack Images per pack Time, mean / median
Composite mode (head on a body), local 8 $0.258 2.5 81 / 86 s
First figure version with passport and identity check, local 4 $0.289 2.8 104 / 92 s
Production: figure mode, two sequential sheets, per-sheet check 26 $0.252 2.4 99 / 92 s
Consistency mode, layout 2x6, laptop 13 $0.486 5.8 118 / 124 s
Consistency mode, layout 3x4, laptop 7 $0.512 5.9 110 / 100 s
Consistency mode, 3x4, faster cutting, server 10 $0.414 4.4 60 / 56 s

Reading: consistency raised the price of a pack from about $0.25 to about $0.41 — the anchor, a third sheet and regenerations — and made it faster.

Two later changes move the figure slightly and have no recorded cost history yet:

  • The flat-cut detector (2026-11-10) is expected to add about one regeneration per pack: estimate +$0.07, giving about $0.48–0.50.
  • LIKENESS_MODE=classic or hybrid skips the anchor (−$0.07) and changes the checks. No measured average exists.

Record a fresh average after the next event with tools/cost_report.py.

Per guest = cost per pack × (packs per guest). With the one-pack limit that is the cost of a pack, plus the share of retries and operator test packs.

Per event — estimate:

AI cost = packs × cost_per_pack × 1.2
packs = expected guests × participation rate (use 1.0 if unknown)
  • cost_per_pack = $0.42 (measured) — use $0.50 if the flat-cut detector is on and you have no newer average.
  • The factor 1.2 covers operator test packs, manual retries and admin-granted second attempts. It is a planning margin, not a measurement.
Guests AI cost (× $0.42) With 20 % reserve Worst case (every job at the $1.50 cap)
70 $29 $35 $105
200 $84 $101 $300
500 $210 $252 $750
800 $336 $403 $1 200
2 000 $840 $1 008 $3 000

The worst case is a ceiling guaranteed by code, not a forecast: across the recorded history a pack cost between $0.38 and $0.82.

What is not in these numbers: the server, the domain, the tablet and stand, staff on site, and development. The repository holds no data on those.

The recorded history of the first weeks shows how spend splits between building and running (COST_HISTORY.md):

Kind of work Share of AI spend
Development experiments (layout A/B, consistency tuning, style comparison, previews) 43 %
Tests (local bot, load test, server measurements, stress) 34 %
Production packs 23 %

About 4 % of spend was wasted on failed, aborted or abandoned runs. Over half of the total was spent on one day of experiments — the reason the rule “live calls only with a stated budget” exists.

Guard Setting What it does
Cost cap per job JOB_MAX_COST_USD (1.5) Before each AI call the job’s accumulated estimate is checked; over the cap the job fails without retry and an alert is sent. A manual Retry gets a fresh cap.
Bounded retries fixed in code 2 attempts per job, a fixed number of attempts per sheet, 3 backoff pauses on a rate limit, 1 anchor retry, 1 regeneration per sticker, at most CONSISTENCY_MAX_REGEN (4) per pack.
One pack per account ALLOW_MULTIPLE_PACKS=0 A guest cannot multiply cost.
Auto-pause on empty balance automatic A 402 answer fails the job at once, alerts, and pauses new jobs until /resume.
Daily quota watch IMAGE_RPD_LIMIT, IMAGE_RPD_WARN_FRAC Counter in the admin panel; one alert per day at 70 %.
Balance display BUDGET_USD or the value typed into the admin panel Shows budget minus estimated spend. It is not the provider’s balance.
Test key separation EVENT_MODE, TEST_GEMINI_API_KEY Paid developer tools cannot use the production key on event day.
Tool budgets built into each paid tool Each live tool has a hard cap and asks for confirmation.

What is not protected: there is no ceiling per event or per day in money. The practical ceilings are the provider’s prepaid balance, a spend cap set in the provider’s console, and the daily quota.

Terminal window
# from a developer machine; read-only
python tools\cost_report.py --ssh root@<server> --days 2 --csv out\event_cost.csv
  • Admin panel: total and today’s spend, cost of each pack, cost by stage.
  • Compare with the provider’s billing page a day later — its report lags by hours, while the prepaid balance is debited immediately.

Last verified: 2026-11-13 against ai-sticker-pack@b715418 and ai-stickers-landing@e350ff5.