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

# How to delete an endpoint

> Delete a Serverless AI endpoint, its VM, and container disk.

If you no longer need an endpoint, delete it. Serverless AI automatically deletes its VM and container disk.

If the endpoint uses additional volumes, they aren't deleted with it. You can remove the mounted volumes manually. See the guides on [deleting a filesystem](https://docs.nebius.com/kubernetes/storage/filesystem-over-csi.md#how-to-delete-the-created-resources) and [deleting a bucket](https://docs.nebius.com/object-storage/buckets/manage.md#how-to-delete-buckets).

## Prerequisites

> [tab] Web console
>
> Make sure that you are in a [group](https://docs.nebius.com/iam/authorization/groups/index.md) that has the
> role within your
> .
> You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

> [tab] CLI
>
> * [Install and configure](https://docs.nebius.com/cli/install.md) the Nebius AI Cloud CLI.
>
>   Check that your project ID is saved in the Nebius AI Cloud CLI profile configuration:
>
>   ```bash theme={null}
>   cat ~/.nebius/config.yaml
>   ```
>
> * Make sure that you or the service account that you use is in a [group](https://docs.nebius.com/iam/authorization/groups/index.md) that has the
>   role within your
>   .
>   You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

> [tab] Go SDK
>
> * [Install and initialize the Nebius SDK for Go](https://docs.nebius.com/sdk/go/install-auth.md).
> * Make sure that you or the service account that you use is in a [group](https://docs.nebius.com/iam/authorization/groups/index.md) that has the
>   role within your
>   .
>   You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

> [tab] Python SDK
>
> * [Install and initialize the Nebius SDK for Python](https://docs.nebius.com/sdk/python/install-auth.md).
> * Make sure that you or the service account that you use is in a [group](https://docs.nebius.com/iam/authorization/groups/index.md) that has the
>   role within your
>   .
>   You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

> [tab] JavaScript SDK
>
> * [Install and initialize the Nebius SDK for JavaScript](https://docs.nebius.com/sdk/javascript/install-auth.md).
> * Make sure that you or the service account that you use is in a [group](https://docs.nebius.com/iam/authorization/groups/index.md) that has the
>   role within your
>   .
>   You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

> [tab] REST API
>
> * Get an access token to [authenticate to the REST API](https://docs.nebius.com/rest-api/authentication.md).
> * Make sure that you or the service account that you use is in a [group](https://docs.nebius.com/iam/authorization/groups/index.md) that has the
>   role within your
>   .
>   You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

## Steps

> [tab] Web console
>
> 1. In the sidebar, go to  **Serverless AI** → **Endpoints**.
> 2. Find the endpoint and then click  → **Delete**.
> 3. In the window that opens, confirm the deletion.

> [tab] CLI
>
> 1. To get the endpoint ID, list all endpoints:
>    ```bash theme={null}
>    nebius ai endpoint list
>    ```
>    In the output, copy the ID of the required endpoint.
> 2. Delete the endpoint:
>
>    ```bash theme={null}
>    nebius ai endpoint delete --id <endpoint_ID>
>    ```
>
>    If a static IP address is assigned to the endpoint, the prompt asks to confirm the address release. Enter `y` to confirm or `n` to keep the address allocated in a pool.

> [tab] Go SDK
>
> 1. List endpoints:
>
>    ```go theme={null}
>    listEndpointService := sdk.Services().Ai().V1().Endpoint()
>    endpoints, err := listEndpointService.List(
>        ctx,
>        &ai.ListEndpointsRequest{
>            ParentId: "<project_ID>",
>        },
>    )
>    if err != nil {
>        return fmt.Errorf("list endpoints: %w", err)
>    }
>    fmt.Println(endpoints)
>    ```
>
>    In `ai.ListEndpointsRequest`, set `ParentId` to the [project ID](https://docs.nebius.com/iam/manage-projects.md#how-to-get-a-project-id-go-sdk). In the response, copy the `Metadata.Id` of the required endpoint.
>
> 2. Delete the endpoint:
>
>    ```go theme={null}
>    deleteEndpointService := sdk.Services().Ai().V1().Endpoint()
>    deleteEndpointOperation, err := deleteEndpointService.Delete(
>        ctx,
>        &ai.DeleteEndpointRequest{
>            Id: "<endpoint_ID>",
>        },
>    )
>    if err != nil {
>        return fmt.Errorf("delete endpoint: %w", err)
>    }
>    if _, err = deleteEndpointOperation.Wait(ctx); err != nil {
>        return fmt.Errorf("wait for endpoint deletion: %w", err)
>    }
>    ```
>
>    In `ai.DeleteEndpointRequest`, set `Id` to the endpoint ID that you copied.

> [tab] Python SDK
>
> 1. List endpoints:
>
>    ```python theme={null}
>    list_endpoint_service = EndpointServiceClient(sdk)
>    endpoints = await list_endpoint_service.list(
>        ListEndpointsRequest(parent_id="<project_ID>"),
>    )
>    print(endpoints)
>    ```
>
>    In `ListEndpointsRequest`, set `parent_id` to the [project ID](https://docs.nebius.com/iam/manage-projects.md#how-to-get-a-project-id-python-sdk). In the response, copy the `metadata.id` of the required endpoint.
>
> 2. Delete the endpoint:
>
>    ```python theme={null}
>    delete_endpoint_service = EndpointServiceClient(sdk)
>    delete_endpoint_operation = await delete_endpoint_service.delete(
>        DeleteEndpointRequest(id="<endpoint_ID>"),
>    )
>    await delete_endpoint_operation.wait()
>    ```
>
>    In `DeleteEndpointRequest`, set `id` to the endpoint ID that you copied.

> [tab] JavaScript SDK
>
> 1. List endpoints:
>
>    ```ts theme={null}
>    const listEndpointService = new EndpointService(sdk);
>    const endpoints = await listEndpointService.list(
>      ListEndpointsRequest.create({
>        parentId: "<project_ID>",
>      }),
>    );
>    console.log(endpoints);
>    ```
>
>    In `ListEndpointsRequest`, set `parentId` to the [project ID](https://docs.nebius.com/iam/manage-projects.md#how-to-get-a-project-id-javascript-sdk). In the response, copy the `metadata.id` of the required endpoint.
>
> 2. Delete the endpoint:
>
>    ```ts theme={null}
>    const deleteEndpointService = new EndpointService(sdk);
>    const deleteEndpointOperation = await deleteEndpointService.delete(
>      DeleteEndpointRequest.create({
>        id: "<endpoint_ID>",
>      }),
>    ).result;
>    await deleteEndpointOperation.wait();
>    ```
>
>    In `DeleteEndpointRequest`, set `id` to the endpoint ID that you copied.

> [tab] REST API
>
> 1. List endpoints:
>
>    ```bash theme={null}
>    curl --request GET \
>      --url "https://api.nebius.cloud/ai/v1/endpoints?parentId=<project_ID>" \
>      --header "Authorization: Bearer <access_token>"
>    ```
>
>    In the request, specify:
>
>    * Your access token in the `Authorization` header.
>    * The [project ID](https://docs.nebius.com/iam/manage-projects.md#how-to-get-a-project-id) in the `parentId` query parameter.
>
>    In the response, copy the `metadata.id` of the required endpoint.
>
> 2. Delete the endpoint:
>
>    ```bash theme={null}
>    curl --request DELETE \
>      --url "https://api.nebius.cloud/ai/v1/endpoints/<endpoint_ID>" \
>      --header "Authorization: Bearer <access_token>"
>    ```
>
>    In the request, specify:
>
>    * Your access token in the `Authorization` header.
>    * The endpoint ID that you copied in the request path.
