SPB Git

Repository Public

cost-model.md 4.0 KB

# Cost model

All amounts in USD. Prices retrieved 2026-11-10 (see provider-capabilities.md). The ledger records what the provider actually charged (usage.cost_in_usd_ticks, 1 USD = 10 000 000 000 ticks); the table below is only the pre-flight estimate used by the budget gate.

# Unit prices used for estimates (src/providers/pricing.ts)

Call Estimate Basis
Keyframe, grok-imagine-image-2.0, 1k low $0.04 / image API price table, confirmed by a live call
Video, grok-imagine-video-1.5-lite, 720p $0.0325 / s measured (4 s = $0.13); headline price is $0.020 / s
Video, grok-imagine-video-1.5, 720p $0.1415 / s measured in production (6 s = $0.85, 7 s = $0.99); headline price is $0.080 / s
Video, grok-imagine-video $0.05 / s headline not measured
Narration, TTS $15 / 1M characters pricing page; computed, the API returns no usage
LLM, grok-4.7 $2.00 / $6.00 per 1M tokens charged from ticks; ≈ $0.08 per script, ≈ $0.04 per set of pitches (measured)
Fact check (Responses API + web search) $5 / 1 000 searches + tokens ≈ $0.33 for four lines (measured); informational films only

The estimator prefers the observed mean $/s for a (model, resolution) pair once at least one job exists in provider_jobs; otherwise it uses the table and labels the estimate list. A price that cannot be derived is shown as unknown in the studio and blocks autonomous execution (manual approval required).

# Typical film (5 shots, ~30 s, narrated)

Item Draft (1.5-lite) Master (1.5)
LLM (pitches, script, storyboard, critique) ≈ $0.20 (+ ≈ $0.35 fact check if informational) same
5 keyframes $0.20 $0.20
30 s of video at 720p ≈ $0.98 ≈ $4.25
Narration (~450 characters) < $0.01 < $0.01
Total ≈ $1.40 ≈ $4.70

# Default ceilings (budget_policy, editable in /studio/settings)

Ceiling Default
Per shot (all attempts) $2.50
Per film $8.00
Per day $25.00
Per month $150.00
Regenerations per shot before human approval 2
Concurrent paid jobs 3
Films started by the scheduler per day 1

CAD is shown next to USD using a rate stored with its timestamp in settings.fx_usd_cad; the rate is entered by the operator (no rate is fetched or invented). Failed-generation cost (moderation blocks are billed) is tracked separately in the dashboard. Storage is local disk: no provider storage charge; the dashboard reports bytes.

# Measured in production (2026-11-10)

Film Shots Runtime Cost Notes
What the Distance Keeps (informational, EN) 4 24.8 s $5.44 includes two script + research rounds ($0.42) and one regenerated shot ($1.03)
Noon Under the Tide (fiction, EN) 4 22.8 s $3.91 one clip failed with a provider internal error (not billed) and was retried
Weight on a Seed (fiction, FR) 5 — $4.52 failed QA, not published: the cost of a film the gate stopped
The Outward Bearing (fiction, FR) 4 — $7.01 held by QA; three shots regenerated once, then stopped by the per-shot ceiling
The Keeper's Debt (draft model, local test) 5 28.8 s $1.20 grok-imagine-video-1.5-lite

Exact, current figures are in the studio (Costs) and in the cost_entries table.

# Pipeline v2 (evening of 2026-11-10): 2k keyframes, native 1080p

Call Price Basis
Keyframe, 2k medium $0.08 measured
Keyframe by editing shot 1, 2k medium $0.09 measured
Video, grok-imagine-video-1.5, 1080p $0.2517 / s measured (6 s = $1.51, 7 s = $1.76, 8 s = $2.01)
Preview, grok-imagine-video-1.5-lite, 480p ≈ $0.02 / s list
Claude Code director ≈ $0.76 per film measured on the first run (43 turns)

A 5-shot, ~33 s film costs about $9.50–13 of xAI media. Ceilings are now $6 per shot, $25 per film, $100 per day and $500 per month. Spend on 2026-11-10 across both passes: $63.34.

Files main
Menu

Theme