---
title: "Undeploy Model"
method: DELETE
path: "/api/v3/models/{model_id}/deployment"
tags: ["Models"]
---

# Undeploy Model

`DELETE /api/v3/models/{model_id}/deployment`

## Request

- Base URL: `https://api.nugen.in`
- URL: `https://api.nugen.in/api/v3/models/{model_id}/deployment`
- Auth: HTTP bearer

Undeploy a deployed aligned model.


This endpoint undeploys a deployed model, removing it from the inference service.


**Path Parameters:**

- `model_id`: Unique identifier of the model to undeploy


**Returns:**

- `model_id`: Identifier of the model being undeployed
- `message`: Confirmation message


**Raises:**

- `400`: If model is already undeployed
- `404`: If the model or its alignment project is not found
- `409`: If an evaluation of the model has not ended; the message names it


**Example Request:**

```json
DELETE /api/v3/models/alignment_01k4x9m2p7q3r8c1/deployment
Headers: {"Authorization": "Bearer <api_key>"}
```


**Example Response:**

```json
{"model_id": "alignment_01k4x9m2p7q3r8c1", "message": "Undeployment started for alignment_01k4x9m2p7q3r8c1."}
```


**Notes:**

- Poll `GET /api/v3/models/{model_id}/deployment/status` to track undeployment
- Once UNDEPLOYED, the model will no longer be available for inference
- The model can be redeployed later using the deploy endpoint

## Path parameters

- `model_id` string, required

## Response `200`

Successfully initiated model undeployment

- ModelUndeployResponse: Confirmation that undeployment has started, same shape as every delete.
  - `model_id` string, required: Identifier of the model being undeployed.
  - `message` string, required: Confirmation message.

## Other responses

- `400`: Bad request - model already UNDEPLOYED in progress
- `401`: Invalid API key
- `403`: Authorization header missing or not a Bearer token
- `404`: Model or alignment project not found
- `409`: An evaluation of this model is still running
- `422`: Validation Error

---

[API](https://skmtc.dev/nugen/apis/nugen-intelligence-api.md) - [All operations](https://skmtc.dev/nugen/apis/nugen-intelligence-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nugen/apis/nugen-intelligence-api/revisions/62baa7960a4a?raw)
