multi model generation cost estimate: Estimate only valid model configurations
A multi model generation cost estimate should begin with valid requests rather than a price label copied from a model name. The current adapters calculate credits from parsed parameters, and different models use different units. Keep the configuration beside every amount so the estimate remains auditable.
Use the actual credit functions
The image adapters charge linearly by n: nano-banana uses four credits per requested image, flux-pro uses five, and ideogram-v3 uses six. The accepted image count is an integer from one through four. These are gateway credit calculations, not measurements of visual quality or vendor-wide pricing promises.
Seedance uses the ceiling of duration in seconds multiplied by five and a resolution factor. The factor is one half for 720p and one for 1080p. Its schema accepts integer durations from three through fifteen. For five seconds at 720p, that expression yields thirteen credits because the fractional result is rounded upward.
Kling accepts five or ten seconds and charges thirty-five or seventy credits respectively. Its schema fixes resolution to 1080p. Veo accepts eight seconds and charges fifty credits at 720p or one hundred at 1080p. Do not estimate unsupported durations as if every video model priced arbitrary seconds.
Build a scenario sheet
Create columns for model identifier, count of jobs, effective parameters, credits per job, and subtotal. For images, distinguish jobs from requested image count. Two jobs with n equal to two represent four requested images, not two.
A fictional planning scenario can combine one nano-banana job requesting two images and one five-second Seedance job at 720p. The expected reservation is eight plus thirteen, or twenty-one credits. This is arithmetic from the current functions, not a real generation run or an observed success rate.
Leave a separate allowance for deliberate additional samples. Avoid hiding retries inside the base unit price because some retries are new work while downloading an existing output is not.
Preserve the limits
The adapters expose an internal usdCost estimate derived from credits. That value is not automatically the user’s credit purchase cost, a billing receipt, or a guarantee of current upstream invoicing. Keep customer-facing money conversions tied to an explicit acquisition-cost assumption.
Pricing uses standard parsed parameters. An extra collision that replaces upstream image count or duration can break the correspondence between the estimate and submitted work. Exclude such collisions from normal planning.
Acceptance review
Validate each row against the model schema, recompute its credits, and attach the pricing source revision or review date. Reject rows with unsupported durations, string counts, or omitted model identity.
Continue with pricing snapshots, numeric parameter validation, and cost per accepted asset when moving from planned reservations to observed production economics.
Continue with costs and billing
Where these facts come from
- codebase: src/ai/api/credits.ts
- codebase: src/credits/credits.ts
- codebase: src/ai/jobs/service.ts
- codebase: src/ai/jobs/db.ts
- codebase: src/ai/providers/nano-banana.ts
- codebase: src/ai/providers/flux.ts
- codebase: src/ai/providers/ideogram.ts
- codebase: src/ai/providers/seedance.ts
- codebase: src/ai/providers/kling.ts
- codebase: src/ai/providers/veo3.ts
- Editorial keyword hypothesis; search volume not measured