---
title: "List Model Builds"
method: GET
path: "/v1/models/{model}/builds"
tags: ["Models"]
---

# List Model Builds

`GET /v1/models/{model}/builds`

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

Every build and rebuild attempt, newest first, without scripts. Owner only. `GET /builds/{build_id}` returns one with its script.

## Path parameters

- `model` string, required: Model ID (model_... or legacy m-...), slug, symbol or exact name

## Query parameters

- `limit` integer: Rows per page
- `offset` integer: Rows to skip

## Response `200`

Successful Response

- BuildSummaryPage
  - `data` BuildSummary[], required
    - `id` string, required: Build ID (build_... or legacy mb-/sb-/ab-/b-...). Read kind for the program type.
    - `kind` 'model', required
    - `program_id` string, required: The model built
    - `attempt` 'build' | 'rebuild' | 'revision', required: build: the first build; rebuild: a later generation; revision: a promote rewrote the script's defaults without generating
    - `status` 'succeeded' | 'failed' | 'cancelled', required
    - `prompt` string, nullable
    - `effort` 'min' | 'mid' | 'max', nullable
    - `script_hash` string, nullable: SHA-256 of the script this attempt produced; runs carry the same hash
    - `error` BuildError
      - `type` string, nullable: validation_failed: the request was rejected before any code was written (not billed). generation_failed: the generated script failed validation. execution_failed: the sandbox run failed. internal_error and cancelled are ours and not billed.
      - `message` string, required
      - `code_excerpt` string, nullable: The lines of the script around the failure, if any
      - `validation` ValidationError[], nullable: The rejection(s), present when the build failed validation
        - `type` string, required: Which rule rejected it: syntax, forbidden, price_source, nondeterministic, constants, entry_point, imports, inputs, members, universe, sources, metadata or other
        - `message` string, required: The rejection, written to teach the fix
        - `line` integer, nullable: The line named by the message, if any
    - `usage` BuildUsage: Billing usage for one generation.
      - `units` integer, required
      - `base` integer, nullable
      - `tokens` integer, nullable
      - `seconds` integer, nullable
      - `effort` 'min' | 'mid' | 'max', nullable: The effort the attempt was billed at
    - `trace_id` string, nullable
    - `started_at` string, date-time, nullable
    - `completed_at` string, date-time, required
  - `total` integer, required: Rows matching the filters, across every page

## 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)
