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

# Getting started with Serverless AI endpoints: Deploy an nginx server with authentication

Serverless AI lets you deploy and manage endpoints without handling infrastructure yourself. This quickstart shows how to validate basic endpoint functionality with minimal setup. In the web console, **Quick start Serverless endpoint** deploys a ready-made example with preconfigured settings.

## Prerequisites

<Tabs group="interfaces">
  <Tab title="Web console">
    * Make sure you are in a [group](/iam/authorization/groups/index) that has the `admin` role within your tenant; for example, the default `admins` group. You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

    * In the [Quota](https://console.nebius.com/quota) section of the web console, check the following quotas:

      * **Number of virtual machines** (VMs) under **Compute**: make sure that at least one VM is available.
      * **Total number of allocations** under **Virtual Private Cloud**: make sure that at least one allocation is available.

      If necessary, [increase the quotas](/overview/quotas#change-quotas).
  </Tab>

  <Tab title="CLI">
    * Make sure you are in a [group](/iam/authorization/groups/index) that has the `admin` role within your tenant; for example, the default `admins` group. You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

    * In the [Quota](https://console.nebius.com/quota) section of the web console, check the following quotas:

      * **Number of virtual machines** (VMs) under **Compute**: make sure that at least one VM is available.
      * **Total number of allocations** under **Virtual Private Cloud**: make sure that at least one allocation is available.

      If necessary, [increase the quotas](/overview/quotas#change-quotas).

    * [Install](/cli/install) and [configure](/cli/configure) 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
      ```
  </Tab>
</Tabs>

## Steps

### Create an endpoint

<Tabs group="interfaces">
  <Tab title="Web console">
    1. In the sidebar, go to <Icon icon="https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/sidebar/ai-services.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=ab4ff229f7690c99deb1dc52d3daf987" width="16" height="16" data-path="_assets/sidebar/ai-services.svg" /> **AI Services** → **Endpoints**.
    2. Click **Quick start Serverless endpoint**. The flow uses a preconfigured container image and default settings.
    3. Click **Create endpoint**.

    Wait for the endpoint to start running.
  </Tab>

  <Tab title="CLI">
    1. Create a token for authorization and save it to an environment variable:

       ```bash theme={null}
       export AUTH_TOKEN=$(openssl rand -hex 32)
       ```

    2. Get the ID of the default subnet where you create an endpoint:

       ```bash theme={null}
       nebius vpc subnet get-by-name --name default-subnet \
         --format jsonpath='{.metadata.id}'
       ```

    3. Create an endpoint with a simple HTTP server:

       ```bash theme={null}
       nebius ai endpoint create \
         --name qs-endpoint-nginx \
         --image nginx:alpine \
         --platform cpu-d3 \
         --preset 4vcpu-16gb \
         --public \
         --container-port 80 \
         --auth token \
         --token "$AUTH_TOKEN" \
         --subnet-id <subnet_ID>
       ```

    Wait for the endpoint to start running.
  </Tab>
</Tabs>

### Test the endpoint

<Tabs group="interfaces">
  <Tab title="Web console">
    1. Open <Icon icon="https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/sidebar/ai-services.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=ab4ff229f7690c99deb1dc52d3daf987" width="16" height="16" data-path="_assets/sidebar/ai-services.svg" /> **AI Services** → **Endpoints**.
    2. Click the endpoint name to open its details. In the **Network** section, copy the public IP address.
    3. In a terminal, send a request to the endpoint:

       ```bash theme={null}
       curl -v http://<public_IP_address>
       ```

    In the command, specify the public IP address that you copied earlier.

    The response should have HTTP status `200 OK`. The body is the default nginx welcome page, which confirms that the endpoint is serving traffic.
  </Tab>

  <Tab title="CLI">
    1. Save the endpoint ID to an environment variable:

       ```bash theme={null}
       export ENDPOINT_ID=$(nebius ai endpoint get-by-name \
         --name qs-endpoint-nginx --format jsonpath='{.metadata.id}')
       ```

    2. Get the endpoint IP address:

       ```bash theme={null}
       export ENDPOINT_IP=$(nebius ai endpoint get "$ENDPOINT_ID" \
         --format jsonpath='{.status.public_endpoints[0]}')
       ```

    3. Test the endpoint with authentication:

       ```bash theme={null}
       curl -v http://$ENDPOINT_IP -H "Authorization: Bearer $AUTH_TOKEN"
       ```

    4. Test the endpoint without a token:

       ```bash theme={null}
       curl -v http://$ENDPOINT_IP
       ```

       The test should fail with the error `401 Unauthorized` or `403 Forbidden`.
  </Tab>
</Tabs>

### View logs

<Tabs group="interfaces">
  <Tab title="Web console">
    1. In the sidebar, go to <Icon icon="https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/sidebar/ai-services.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=ab4ff229f7690c99deb1dc52d3daf987" width="16" height="16" data-path="_assets/sidebar/ai-services.svg" /> **AI Services** → **Endpoints**.
    2. In the endpoint list, next to the endpoint, click **View logs**. Alternatively, click <Icon icon="https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/button-vellipsis.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=e80b8e57c43bfd117679262e6a1334ad" width="12" height="24" data-path="_assets/button-vellipsis.svg" /> → **View logs**.
  </Tab>

  <Tab title="CLI">
    View endpoint logs:

    ```bash theme={null}
    nebius ai endpoint logs $ENDPOINT_ID
    ```
  </Tab>
</Tabs>

### Delete the endpoint

If you no longer need the endpoint, delete it. Once you delete the endpoint, you will not be charged for it.

<Tabs group="interfaces">
  <Tab title="Web console">
    1. In the sidebar, go to <Icon icon="https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/sidebar/ai-services.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=ab4ff229f7690c99deb1dc52d3daf987" width="16" height="16" data-path="_assets/sidebar/ai-services.svg" /> **AI Services** → **Endpoints**.
    2. In the endpoint list, find the endpoint and click <Icon icon="https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/button-vellipsis.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=e80b8e57c43bfd117679262e6a1334ad" width="12" height="24" data-path="_assets/button-vellipsis.svg" /> → **Delete**.
    3. Confirm the endpoint deletion.
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    nebius ai endpoint delete $ENDPOINT_ID
    ```
  </Tab>
</Tabs>

## Expected results

* A request without a token in the web console returns `200 OK`.
* A request without a token in the CLI returns `401 Unauthorized` or `403 Forbidden`.
* An endpoint can be deleted successfully.

## See also

* [Deploying a large language model and chatting with it by using Serverless AI endpoints](/serverless/tutorials/deploy-model)
