SPB Git

Repository Public

cost-model.md 4.0 KB 73 lines markdown

1# Cost model23All amounts in USD. Prices retrieved 2026-11-10 (see `provider-capabilities.md`). The ledger records what the4provider actually charged (`usage.cost_in_usd_ticks`, 1 USD = 10 000 000 000 ticks); the table below is only the5pre-flight estimate used by the budget gate.67## Unit prices used for estimates (`src/providers/pricing.ts`)89| Call | Estimate | Basis |10|---|---|---|11| Keyframe, `grok-imagine-image-2.0`, 1k low | $0.04 / image | API price table, confirmed by a live call |12| Video, `grok-imagine-video-1.5-lite`, 720p | $0.0325 / s | **measured** (4 s = $0.13); headline price is $0.020 / s |13| 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 |14| Video, `grok-imagine-video` | $0.05 / s headline | not measured |15| Narration, TTS | $15 / 1M characters | pricing page; computed, the API returns no usage |16| 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) |17| Fact check (Responses API + web search) | $5 / 1 000 searches + tokens | ≈ $0.33 for four lines (measured); informational films only |1819The estimator prefers the **observed** mean $/s for a (model, resolution) pair once at least one job exists in20`provider_jobs`; otherwise it uses the table and labels the estimate `list`. A price that cannot be derived is21shown as *unknown* in the studio and blocks autonomous execution (manual approval required).2223## Typical film (5 shots, ~30 s, narrated)2425| Item | Draft (1.5-lite) | Master (1.5) |26|---|---|---|27| LLM (pitches, script, storyboard, critique) | ≈ $0.20 (+ ≈ $0.35 fact check if informational) | same |28| 5 keyframes | $0.20 | $0.20 |29| 30 s of video at 720p | ≈ $0.98 | ≈ $4.25 |30| Narration (~450 characters) | < $0.01 | < $0.01 |31| **Total** | **≈ $1.40** | **≈ $4.70** |3233## Default ceilings (`budget_policy`, editable in /studio/settings)3435| Ceiling | Default |36|---|---|37| Per shot (all attempts) | $2.50 |38| Per film | $8.00 |39| Per day | $25.00 |40| Per month | $150.00 |41| Regenerations per shot before human approval | 2 |42| Concurrent paid jobs | 3 |43| Films started by the scheduler per day | 1 |4445CAD is shown next to USD using a rate stored with its timestamp in `settings.fx_usd_cad`; the rate is entered by46the operator (no rate is fetched or invented). Failed-generation cost (moderation blocks are billed) is tracked47separately in the dashboard. Storage is local disk: no provider storage charge; the dashboard reports bytes.4849## Measured in production (2026-11-10)5051| Film | Shots | Runtime | Cost | Notes |52|---|---|---|---|---|53| 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) |54| 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 |55| Weight on a Seed (fiction, FR) | 5 | — | $4.52 | **failed QA, not published**: the cost of a film the gate stopped |56| The Outward Bearing (fiction, FR) | 4 | — | $7.01 | **held by QA**; three shots regenerated once, then stopped by the per-shot ceiling |57| The Keeper's Debt (draft model, local test) | 5 | 28.8 s | $1.20 | `grok-imagine-video-1.5-lite` |5859Exact, current figures are in the studio (**Costs**) and in the `cost_entries` table.6061## Pipeline v2 (evening of 2026-11-10): 2k keyframes, native 1080p6263| Call | Price | Basis |64|---|---|---|65| Keyframe, 2k medium | $0.08 | measured |66| Keyframe by editing shot 1, 2k medium | $0.09 | measured |67| Video, `grok-imagine-video-1.5`, 1080p | $0.2517 / s | measured (6 s = $1.51, 7 s = $1.76, 8 s = $2.01) |68| Preview, `grok-imagine-video-1.5-lite`, 480p | ≈ $0.02 / s | list |69| Claude Code director | ≈ $0.76 per film | measured on the first run (43 turns) |7071A 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 and72$500 per month. Spend on 2026-11-10 across both passes: $63.34.73
Files main
Menu

Theme