# Update Model

`PUT /api/agents/models/{model_id}`

Update model configuration. Superadmin only.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `model_id` | path | string | yes | Unique identifier of the LLM model configuration or catalog entry. |

## Request body

Content type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string \| null | no |  |
| `provider` | string \| null | no |  |
| `model_id` | string \| null | no |  |
| `api_key_id` | string \| null | no |  |
| `base_url` | string \| null | no |  |
| `input_cost_per_million` | number \| null | no |  |
| `output_cost_per_million` | number \| null | no |  |
| `cached_input_cost_per_million` | number \| null | no |  |
| `context_window` | integer \| null | no |  |
| `max_output_tokens` | integer \| null | no |  |
| `supports_vision` | boolean \| null | no |  |
| `supports_function_calling` | boolean \| null | no |  |
| `supports_streaming` | boolean \| null | no |  |
| `default_parameters` | object \| null | no |  |
| `is_active` | boolean \| null | no |  |
| `security_label` | string \| null | no |  |
| `intelligence_level` | integer \| null | no |  |

```json
{
  "name": "string",
  "provider": "string",
  "model_id": "string",
  "api_key_id": "string",
  "base_url": "string",
  "input_cost_per_million": 0,
  "output_cost_per_million": 0,
  "cached_input_cost_per_million": 0,
  "context_window": 0,
  "max_output_tokens": 0,
  "supports_vision": true,
  "supports_function_calling": true,
  "supports_streaming": true,
  "default_parameters": {},
  "is_active": true,
  "security_label": "string",
  "intelligence_level": 0
}
```

## Responses

### 200 — Successful Response

```json
null
```

### 400 — Bad Request - The request parameters or headers are invalid (e.g. unsupported API-Version).

### 401 — Unauthorized - Missing, invalid, or expired JWT Bearer token.

### 403 — Forbidden - Insufficient role permissions or resource access denied by RBAC policy.

### 404 — Not Found - The requested resource ID was not found.

### 422 — Validation Error

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `detail` | object[] | no |  |
| `detail[].loc` | string | integer[] | yes |  |
| `detail[].msg` | string | yes |  |
| `detail[].type` | string | yes |  |
| `detail[].input` | object | no |  |
| `detail[].ctx` | object | no |  |

```json
{
  "detail": [
    {
      "loc": [
        null
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
```

## Example

```bash
curl -X PUT "$PINTER_URL/api/agents/models/mdl_gpt4o_enterprise" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","provider":"string","model_id":"string","api_key_id":"string","base_url":"string","input_cost_per_million":0,"output_cost_per_million":0,"cached_input_cost_per_million":0,"context_window":0,"max_output_tokens":0,"supports_vision":true,"supports_function_calling":true,"supports_streaming":true,"default_parameters":{},"is_active":true,"security_label":"string","intelligence_level":0}'
```
