> ## 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.

# Get Undeploy Status

> Check the un-deployment status of an aligned model.


This endpoint retrieves the current un-deployment status of a model, including progress and completion information.


**Path Parameters:**

- `model_id`: Unique identifier of the model to check un-deployment status for


**Returns:**

- `model_id`: The model identifier
- `status`: Un-deployment status
  - `PENDING`: Undeployment in progress
  - `COMPLETED`: Successfully undeployed
  - `FAILED`: Undeployment failed
- `result`: Task result details (if completed or failed)
- `start_time`: Timestamp when undeployment started
- `end_time`: Timestamp when undeployment completed (null if still pending)


**Raises:**

- `404`: If model not found or doesn't belong to user


**Example Request:**

```json
GET /api/v3/models/undeploy-model/aligned-model-01kmqm4nrn9fw6r/status
Headers: {"Authorization": "Bearer <api_key>"}
```

**Example Response (Completed):**

```json
{
  "model_id": "aligned-model-01kmqm4nrn9fw6r",
  "status": "COMPLETED",
  "result": {
    "message": "Model successfully undeployed"
  },
  "start_time": "2024-02-24T10:00:00Z",
  "end_time": "2024-02-24T10:02:30Z"
}
```

**Notes:**

- Poll this endpoint to track un-deployment progress
- Un-deployment typically completes within a few minutes



## OpenAPI

````yaml https://api.nugen.in/openapi-public.json get /api/v3/models/undeploy-model/{model_id}/status
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/undeploy-model/{model_id}/status:
    get:
      tags:
        - Models
      summary: Get Undeploy Status
      description: >-
        Check the un-deployment status of an aligned model.



        This endpoint retrieves the current un-deployment status of a model,
        including progress and completion information.



        **Path Parameters:**


        - `model_id`: Unique identifier of the model to check un-deployment
        status for



        **Returns:**


        - `model_id`: The model identifier

        - `status`: Un-deployment status
          - `PENDING`: Undeployment in progress
          - `COMPLETED`: Successfully undeployed
          - `FAILED`: Undeployment failed
        - `result`: Task result details (if completed or failed)

        - `start_time`: Timestamp when undeployment started

        - `end_time`: Timestamp when undeployment completed (null if still
        pending)



        **Raises:**


        - `404`: If model not found or doesn't belong to user



        **Example Request:**


        ```json

        GET /api/v3/models/undeploy-model/aligned-model-01kmqm4nrn9fw6r/status

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

        ```


        **Example Response (Completed):**


        ```json

        {
          "model_id": "aligned-model-01kmqm4nrn9fw6r",
          "status": "COMPLETED",
          "result": {
            "message": "Model successfully undeployed"
          },
          "start_time": "2024-02-24T10:00:00Z",
          "end_time": "2024-02-24T10:02:30Z"
        }

        ```


        **Notes:**


        - Poll this endpoint to track un-deployment progress

        - Un-deployment typically completes within a few minutes
      operationId: get_undeploy_status
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: string
            title: Model Id
      responses:
        '200':
          description: Returns the current un-deployment status of an aligned model.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UndeployStatusResponse'
        '400':
          description: Bad request - invalid model ID or parameters
          content:
            application/json:
              example:
                detail: Bad request
        '404':
          description: Model not found
          content:
            application/json:
              example:
                detail: Model not found
        '422':
          description: Validation error - invalid request parameters
          content:
            application/json:
              example:
                detail:
                  - loc:
                      - path
                      - model_id
                    msg: field required
                    type: value_error.missing
      security:
        - HTTPBearer: []
components:
  schemas:
    UndeployStatusResponse:
      properties:
        model_id:
          type: string
          title: Model Id
          description: model ID that was undeployed
          example: model_abc123
        status:
          $ref: '#/components/schemas/DeployTaskStatus'
          description: >-
            Undeployment status: PENDING (in progress), COMPLETED (successfully
            undeployed), or FAILED (error)
          example: COMPLETED
        result:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Result
          description: Task result if COMPLETED
        start_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start Time
          description: start time of undeployment process
          example: '2024-02-24T10:00:00Z'
        end_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Time
          description: end time of undeployment process
          example: '2024-02-24T10:05:00Z'
      type: object
      required:
        - model_id
        - status
      title: UndeployStatusResponse
    DeployTaskStatus:
      type: string
      enum:
        - PENDING
        - COMPLETED
        - FAILED
      title: DeployTaskStatus
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````