Scan types
scanType is always explicit - there is no default. A refused deep scan is never silently downgraded to free; it fails loudly (402 INSUFFICIENT_TOKENS or a service-disabled error).
While a deep run is still
PROCESSING, analysisTier reads basic until the deep sections land.
Use scanType (your request) as the in-flight signal and analysisTier as “is the deep result
ready yet”.Run lifecycle
readyForExport is separate from status: a run can be COMPLETED but still need enrichment before export. Free runs need Quick Take; deep runs need Quick Take, section briefings, Skeptic’s View, and both deferred Action Plan variants (building, hasUsers). The enrich route skips whatever already exists, so calling it twice never regenerates or double-spends.
Partial enrichment failures return HTTP 207 with a success-shaped body and a failures list - retry by calling enrich again.
The ideas-json export (schemaVersion 2)
Every tier gets the summary contract:verdict,score,risk,quote,evidencedetails.market(TAM/SAM/SOM),details.competitors,details.swot,details.risks,details.validationdetails.quickTake,details.actionPlanVariants,details.citations(deduped{ title, url })
details.sections- business model (+ scenario B), execution fit, go-to-market, lean canvas, Porter forces, VC scorecard, PMF signals, financial projections, synthesis (with pivot recommendation), consistency review, section briefings, Skeptic’s Viewdetails.pivots-{ suggestions, generatedAt }details.communityDemanddetails.founderFit,details.playbook,details.proofOfDemand- once the modules have been generated
null. Exports are deterministic: the same run state always serializes identically.
Batches
POST /api/agent/analysis-batches accepts up to 10 items, each with its own clientRunId and scanType (mix free and deep intentionally). The batch export includes only completed, export-ready items, plus omittedItems explaining every skipped item and aggregate counts.exported / counts.omitted.