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

# Undeploy Model

> 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:**

String containing the model ID for tracking undeployment status


**Raises:**

- `400`: If model is already undeployed
- `404`: If model or alignment task not found


**Example Request:**

```json
DELETE /api/v3/models/undeploy-model/alignment-xyz789
Headers: {"Authorization": "Bearer <api_key>"}
```


**Example Response:**

```json
"alignment-xyz789"
```


**Notes:**

- Use `/models/aligned` to check deployment status after undeployment
- Once UNDEPLOYED, the model will no longer be available for inference
- The model can be redeployed later using the deploy endpoint



## OpenAPI

````yaml https://api.nugen.in/openapi-public.json delete /api/v3/models/{model_id}/deployment
openapi: 3.1.0
info:
  title: Nugen Intelligence API
  description: 'Nugen Intelligence : Powering Specialized Intelligence At Scale'
  version: 25.4.20
servers: []
security: []
paths:
  /api/v3/models/{model_id}/deployment:
    delete:
      tags:
        - General
      summary: Undeploy Model
      description: >-
        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:**


        String containing the model ID for tracking undeployment status



        **Raises:**


        - `400`: If model is already undeployed

        - `404`: If model or alignment task not found



        **Example Request:**


        ```json

        DELETE /api/v3/models/undeploy-model/alignment-xyz789

        Headers: {"Authorization": "Bearer <api_key>"}

        ```



        **Example Response:**


        ```json

        "alignment-xyz789"

        ```



        **Notes:**


        - Use `/models/aligned` to check deployment status after undeployment

        - Once UNDEPLOYED, the model will no longer be available for inference

        - The model can be redeployed later using the deploy endpoint
      operationId: models_undeploy
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: string
            title: Model Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````