Rebuild Model
Regenerate the model's implementation.
With prompt, the model is rewritten to the new description. With script, your implementation replaces the stored one (validated and smoke-run, no generation). With neither, the stored prompt is used again: a failed model is rebuilt from its own failure (the generator sees the script that broke and the error), a built model is simply regenerated. A built model keeps serving its current implementation until the new one succeeds; existing runs keep the script_hash they ran under. Answers 202 with run.kind rebuild; the model's run becomes null when work ends. Metered like a create. 409 rebuild_conflict while a build owns the model.
Request
- Base URL: https://api.ensemble.markets (the document declares no server; this is the origin it was published from)
- URL: https://api.ensemble.markets/v1/models/{model}/rebuild
- Auth: HTTP bearer
Path parameters
Model ID (model_... or legacy m-...), slug, symbol or exact name
Request body
Example request
{
"prompt": "Buy and hold SPY, rebalanced monthly",
"name": "My SPY Strategy",
"symbol": "SPY-BH",
"start_date": "2020-01-01"
}Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.