Models

Save Model Draft

Autosave changes without affecting current results. expected_version and base_hash protect concurrent edits; reset starts over from approved source. Free.

put/v1/models/{model}/draft

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

Path parameters

modelstring required

Owned model ID, slug, symbol or exact name

Request body

expected_versioninteger required

Optimistic lock. Use zero for a new working draft.

base_hashstring required

Strategy fingerprint returned with the draft; detects intervening changes.

promptstring nullable

Plain-language strategy instructions for the working draft

descriptionstring nullable

Short explanation of the model's purpose, published only on apply

inputsobject nullable

Candidate input values, validated against the draft's input schema

scriptstring nullable

Optional supplied candidate source. Null uses the stored source or generates from changed instructions.

effort'min' | 'mid' | 'max' nullable

Candidate generation effort; balanced (mid) by default

from_run_idstring nullable

Explicitly start from an owned historical result with recoverable source and inputs.

resetboolean

Replace the draft with the current approved strategy, subject to expected_version.

Response

Successful Response

model_idstring required
versioninteger required
base_revision_idstring nullable
base_hashstring required
promptstring required
descriptionstring
inputsobject required
inputs_schemaobject nullable
effort'min' | 'mid' | 'max'
latest_revision_idstring nullable
updated_atstring date-time nullable
outdatedboolean

Changes

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