---
title: "Get Runtime"
method: GET
path: "/v1/runtime/{kind}"
tags: ["Runtime"]
---

# Get Runtime

`GET /v1/runtime/{kind}`

## 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/runtime/{kind}`
- Auth: HTTP bearer

The contract a supplied script is validated against.

Constants, entry point, the harness interface as a stub with every
signature and docstring, the validation rules, and a skeleton. Describes
the Python interface used by the validator and execution sandbox.
Free; cacheable until the harness version changes.

## Path parameters

- `kind` 'models', required: models

## Response `200`

Successful Response

- Runtime: The contract a supplied script is validated against.
  - `kind` 'models', required
  - `version` string, required: Harness version; changes when the interface changes
  - `contract` RuntimeContract, required
    - `constants` string[], required: Module-level constants the script must declare
    - `entry_point` string, required: The function the sandbox calls, with its parameters
    - `builders` string[], required: Harness functions the entry point must return the output of
    - `import_path` string, required: The harness module the script imports from
    - `imports` string[], required: Every name the script may import from the harness
    - `reserved_inputs` string[], required: Input keys the platform supplies on every run; never declare them
    - `limits` RuntimeLimits, required
      - `inputs` integer, required: Maximum number of INPUTS entries
      - `script_chars` integer, required: Maximum script length in characters
  - `interface` string, required: The harness's public interface as a Python stub: every signature and docstring, plus the INPUTS spec grammar
  - `rules` RuntimeRule[], required: What validation rejects, one statement each
    - `type` string, required: The rule's name, the same word a validation rejection carries
    - `statement` string, required: What the rule requires
  - `skeleton` string, required: A minimal script that satisfies the contract

## Other responses

- `4XX`: The request was refused; `error.type` says why
- `5XX`: The server failed; quote `X-Request-Id` when reporting it

---

[API](https://skmtc.dev/ensemble/apis/ensemble-api.md) · [All operations](https://skmtc.dev/ensemble/apis/ensemble-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ensemble/apis/ensemble-api/revisions/4c0fbd80c197?raw)
