---
title: "Apply Model Revision"
method: POST
path: "/v1/models/{model}/revisions/{revision_id}/apply"
tags: ["Models"]
---

# Apply Model Revision

`POST /v1/models/{model}/revisions/{revision_id}/apply`

## 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}/revisions/{revision_id}/apply`
- Auth: HTTP bearer

Atomically make the exact reviewed source, inputs, dependencies and result current. Requires a successful test and unchanged base strategy. Idempotent; no generation, extra test or charge. Dependent refreshes follow publication and retain their normal metering.

## Path parameters

- `model` string, required: Owned model ID, slug, symbol or exact name
- `revision_id` string, required: Revision ID returned by testing or listing model revisions

## Request body

- RevisionApplyRequest
  - `expected_base_revision_id` string, nullable, required: Approved revision against which the candidate was tested; null only for a model without approved source

## Response `200`

Successful Response

- ModelRevisionView
  - `id` string, required
  - `model_id` string, required
  - `number` integer, required
  - `status` 'queued' | 'running' | 'ready' | 'applied' | 'failed', required
  - `base_revision_id` string, nullable
  - `draft_version` integer, nullable
  - `prompt` string, required
  - `description` string
  - `inputs` object, required
  - `inputs_schema` object, nullable
  - `script` string, nullable
  - `script_hash` string, nullable
  - `build_id` string, nullable
  - `run_id` string, nullable
  - `label` string, nullable
  - `data_as_of` string, nullable
  - `result_available` boolean
  - `error` string, nullable
  - `timing` object, nullable
  - `usage` object, nullable
  - `created_at` string, date-time, required
  - `applied_at` string, date-time, nullable
  - `can_apply` boolean
  - `blocked_reason` string, nullable
  - `newer_data_available` boolean
  - `estimate_cents` integer, nullable

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