Generate Strategy
Generate a Keel DSL strategy from a template kind + params payload.
Dispatches to libs/strategy_templates/<kind>.py via TEMPLATE_REGISTRY, then bakes a resolved universe into the generated DSL so the handoff strategy is never born failing validation (F-01-9 / Q-0847) AND reproduces the set the source surface actually showed (Q-0852, Mechanism A).
Reproducibility: when the payload carries a resolved set + as-of (params["resolved"] / params["resolved_at"] — the Momentum-Lab CTA now transmits its displayed top-N membership + the snapshot instant), that set is baked as a manual-style PIN — the EXACT assets the Lab showed, not a fresh live re-resolve. Without a transmitted set (a legacy Lab client), the shared helper live-resolves as the honest fallback (born valid, editor can re-resolve). The index kind already ships an explicit resolved basket, so the helper leaves it untouched. See ..universe_bake.bake_universe_resolution.
Currently registered kinds: screen, index.
Back-compat: if kind is omitted, the request is treated as a legacy momentum-lab screen request and the flat fields are forwarded to the screen generator. This shim will be removed after a deploy cycle.
Request
- Base URL: https://api.usekeel.io (the document declares no server; this is the origin it was published from)
- URL: https://api.usekeel.io/v1/strategies/generate
- Auth: none declared
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 2 revisions of this API.