## Delete a custom model

`models.delete(strmodel_id)  -> ModelDeleteResponse`

**delete** `/v5/models/{model_id}`

Permanently delete a custom model record and tear down its deployment at the serving vendor.

This is a hard delete: the model row is removed from your account entirely and cannot be restored afterward. Before the record is removed, if the model has an associated vendor deployment that deployment is torn down at its serving vendor. A model that is currently deploying cannot be deleted and the request fails until deployment finishes. This operates on the model records managed by this API, distinct from the `GET /v5/chat/completions/models` catalog of models callable for chat completions.

### Parameters

- `model_id: str`

### Returns

- `class ModelDeleteResponse: …`

  - `id: str`

  - `deleted: bool`

  - `object: Optional[Literal["model"]]`

    - `"model"`

### Example

```python
import os
from scale_gp_beta import SGPClient

client = SGPClient(
    api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
)
model = client.models.delete(
    "model_id",
)
print(model.id)
```

#### Response

```json
{
  "id": "id",
  "deleted": true,
  "object": "model"
}
```
