Models

Run Model

Run the model's stored script (no generation).

Pass intent=test for an isolated result, even with default inputs; intent=refresh publishes approved defaults on success. Omission keeps the following legacy behavior for existing integrations. An empty body runs the declared defaults: that run is the live path, its result becomes what the model serves and cascades to the models that hold it. With inputs, unset keys take their defaults (see inputs_schema) and from_run_id starts from another run's inputs with inputs overlaid; unknown keys are rejected with the accepted keys named. Any run away from the defaults is a snapshot to compare, share or promote. inputs.start_date (YYYY-MM-DD) starts the backtest later than the data allows; earlier prices still feed lookbacks. Metered: one base unit plus one unit per second of sandbox time, charged once per run. 500 manual runs per account per day (429). Answers 202 with the queued run, or 200 with the finished run when wait=true. 409 run_conflict while a default run or a rebuild owns the model.

post/v1/models/{model}/runs

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}/runs
  • Auth: HTTP bearer

Path parameters

modelstring required

Model ID (model_... or legacy m-...), slug, symbol or exact name

Query parameters

waitboolean

Block until the run finishes

includestring[]

result: the finished model run payload (with wait=true)

Request body

inputsobject

Values for the declared inputs; see inputs_schema on the program. If declared, universe is an ordered JSON array of ticker symbols and/or owned model IDs. Overrides create a snapshot; promote a successful run to change live defaults and dependencies.

from_run_idstring nullable

Start from this run's inputs (and settings); inputs overlay it

labelstring nullable

A short name for the run, shown in lists and comparisons

intent'test' | 'refresh' nullable

test never changes the current model, even at default inputs. refresh uses approved defaults and publishes on success. Omission retains the legacy input-equality behavior.

Response

Completed inline (wait=true)

idstring required

Run ID (run_... or legacy mr-/r-...). Read kind for the program type.

kind'model' required
status'queued' | 'running' | 'complete' | 'failed' required
source'build' | 'manual' | 'scheduled' | 'cascade' | 'promote' required

build: the build's smoke run; manual: requested; scheduled: the nightly; cascade: a member changed; promote: after a promote

labelstring nullable
inputsobject required
is_defaultboolean required

Inputs equal the script's declared defaults

intent'test' | 'refresh' nullable
result_availableboolean

Whether the full result is retained and readable

revision_idstring nullable
result_contextobject nullable

Execution-time strategy, input schema, display window and data provenance. Unknown legacy values are omitted, never borrowed from the current model.

is_publicboolean
liveboolean

This run's result is what the program serves

data_as_ofstring nullable
script_hashstring nullable

SHA-256 of the script that ran; resolves to a build via getBuild

summaryobject nullable

Headline figures, kept even when the full result is pruned

estimate_centsinteger nullable

On the response that queued this run: what it holds against the balance, in cents, until usage replaces it. Null on other reads.

errorstring nullable
duration_msinteger nullable
created_atstring date-time required
started_atstring date-time nullable
completed_atstring date-time nullable
resultobject nullable

With include=result: the model backtest history, including dates, returns, positions, targets and metadata.

is_ownerboolean

True when the caller owns this run

Changes

No recorded changes to this operation across all 1 revision of this API.