> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galtea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Model

> Update an existing model.

> [!WARNING]
>
> You are reading the docs of Galtea 5.12. [Read this page in the latest version](https://docs.galtea.ai/sdk/api/model/update.md).

## Returns

Returns the updated [Model](https://docs.galtea.ai/v5.12/concepts/model.md) object.

## Example

```python theme={"system"}
model = galtea.models.update(
    model_id=model_id,
    input_cost_per_token=0.000015,
    output_cost_per_token=0.000035,
)
```

## Parameters

**model\_id** `string` *required*

ID of the model to update.

**name** `string`

New name for the model.

**input\_cost\_per\_token** `float`

New cost in dollars per input token.

**output\_cost\_per\_token** `float`

New cost in dollars per output token.

**cache\_read\_input\_token\_cost** `float`

New cost in dollars per cached input token.

**cache\_creation\_input\_token\_cost** `float`

New cost in dollars per input token when creating a cache entry.

**input\_cost\_per\_token\_above\_128k\_tokens** `float`

New cost in dollars per input token for contexts larger than 128k tokens.

**output\_cost\_per\_token\_above\_128k\_tokens** `float`

New cost in dollars per output token for contexts larger than 128k tokens.

**tokenizer\_provider** `string`

New tokenizer provider (e.g., `"OpenAI"`, `"Anthropic"`).

**source** `string`

New pricing source. This can be a URL to the model's pricing page or documentation.

> [!NOTE]
>
> All fields except `model_id` default to `PydanticUndefined` (from `pydantic_core`).
> Omit a field (or pass `PydanticUndefined`) to leave it unchanged.
> Pass `None` to explicitly clear an optional field.
> Pass a value to update it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.