---
title: "Update Hosted Model"
method: PATCH
path: "/api/v1/hosted-providers/{provider}/models/{model_id}"
tags: ["hosted-providers"]
---

# Update Hosted Model

`PATCH /api/v1/hosted-providers/{provider}/models/{model_id}`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Otari-Key`
  - API key in header `x-api-key`

Reprice one offered model, toggle whether it is served, or both.

## Path parameters

- `provider` string, required
- `model_id` string, uuid, required

## Request body

- HostedModelUpdateRequest: Reprice an offered model, toggle whether it is served, or both. A price is the input/output pair or nothing: sending the pair writes a new pricing version, and the cache rates then follow ``POST /pricing``'s own semantics (a field the caller omits inherits the most recent stored value, an explicit null clears it). An omitted ``unit`` carries the stored one forward. ``enabled`` travels alone freely, so a toggle never re-sends rates it did not change.
  - `cache_read_price_per_million` number, nullable
  - `cache_write_price_per_million` number, nullable
  - `enabled` boolean, nullable
  - `input_price_per_million` number, nullable
  - `output_price_per_million` number, nullable
  - `unit` 'tokens' | 'requests' | 'images', nullable

## Response `200`

Successful Response

- HostedModelPublic: One offered model, with the price the deployment currently serves it at. ``price_source`` says which rung of the deployment's ladder answered: ``deployment`` for a rate an operator set, ``defaults`` for the community-maintained rate, whether this surface stored it or the fallback supplies it, and None when nothing prices the model yet. ``unit`` says what the rates are per, so a per-request rate is not read as a per-token one. ``enabled`` is the serving switch; a model offered without a discoverable price starts off.
  - `cache_read_price_per_million` number, nullable
  - `cache_write_price_per_million` number, nullable
  - `created_at` string, date-time, required
  - `enabled` boolean, required
  - `id` string, uuid, required
  - `input_price_per_million` number, nullable
  - `model` string, required
  - `output_price_per_million` number, nullable
  - `price_source` 'organization' | 'deployment' | 'defaults', nullable
  - `provider` string, required
  - `unit` string, nullable
  - `updated_at` string, date-time, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-16** `b53c45c6d0fc`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mozilla-ai/apis/otari/changes/api/v1/hosted-providers/:provider/models/:model_id/patch.md)

---

[API](https://skmtc.dev/mozilla-ai/apis/otari.md) · [All operations](https://skmtc.dev/mozilla-ai/apis/otari/llms.txt) · [OpenAPI document](https://skmtc.dev/mozilla-ai/apis/otari/revisions/2c95b115b0a8?raw)
