> ## 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 jobs: Run nvidia-smi within a job

You can use Serverless AI jobs to work with AI models and perform such operations as fine-tuning, scientific simulations, data processing or batch inference.

To get started with jobs, use the example below. It demonstrates how to run `nvidia-smi` in a Serverless AI job. As a result, you receive information about the GPUs of the [container over a virtual machine](/compute/virtual-machines/containers) in which the job is running. In the web console, **Quick start Serverless job** runs the same kind of workload with settings already filled in.

## Prerequisites

The preparations for this guide depend on your preferred interface.

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

    * On the [Administration → Limits → Quotas](https://console.nebius.com/quota) page of the web console, check the **Number of virtual machines** (VMs) quota, under **Compute**: it should have at least one VM available. If necessary, [increase the quota](/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.

    * On the [Administration → Limits → Quotas](https://console.nebius.com/quota) page of the web console, check the **Number of virtual machines** (VMs) quota, under **Compute**: it should have at least one VM available. If necessary, [increase the quota](/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

### Run a Serverless AI job

<Tabs>
  <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" alt="icon" width="16" height="16" data-path="_assets/sidebar/ai-services.svg" /> **AI Services** → **Jobs**.
    2. Click **Quick start Serverless job**. The flow uses a verified container image and prefilled job settings.
    3. Click **Create job**.
  </Tab>

  <Tab title="CLI">
    1. Get the ID of the default subnet where you create a job:

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

    2. Create a job:

       ```bash theme={null}
       nebius ai job create \
         --name my-job \
         --image nvidia/cuda:13.1.1-runtime-ubuntu24.04 \
         --container-command bash \
         --args "-c nvidia-smi" \
         --platform gpu-l40s-a \
         --preset 1gpu-8vcpu-32gb \
         --timeout 1h \
         --subnet-id <subnet_ID>
       ```

       The command contains the following parameters:

       * `--name`: Job name.
       * `--image`: Container image to run. In the given example, the [nvidia/cuda:13.1.1-runtime-ubuntu24.04](https://hub.docker.com/layers/nvidia/cuda/13.1.1-runtime-ubuntu24.04/images/sha256-7ced05425d3bdea47c018551ee001f28081dd409efe1283872cd968ad3c1e957) is used. It contains the Ubuntu 24.04 operating system as well as drivers and other components for GPUs.
       * `--container-command`: Terminal shell for commands to run.
       * `--args`: Arguments for `docker run` to pass to the entrypoint command. The specified arguments require the container to run `nvidia-smi`.
       * `--platform`: VM platform for the job. As Serverless AI jobs are based on containers over VMs, every job uses [Compute platforms and presets](/compute/virtual-machines/types).
       * `--preset`: Number of GPUs, vCPUs and RAM allocated to the container. The preset must match the selected platform.
       * `--timeout`: Duration after which the job is canceled if it has not completed.
       * `--subnet-id`: Subnet ID.
  </Tab>
</Tabs>

The job takes several minutes to complete. While the job is running, you can check its status and logs.

### Check the job results

<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** → **Jobs**.
    2. Next to the job, click **View logs**. Alternatively, select the job that you want to view the logs for and switch to the **Logs** tab.
  </Tab>

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

       ```bash theme={null}
       export JOB_ID=$(nebius ai job get-by-name --name my-job \
         --format jsonpath='{.metadata.id}')
       ```

    2. View information about the job:

       ```bash theme={null}
       nebius ai job get $JOB_ID
       ```

       The command output contains such data as the job status, start and finish times.

    3. If the output doesn't indicate that the job has started, wait a few seconds. Next, run the previous command again and check that the job is running now.

    4. When the job has started, check its logs:

       ```bash theme={null}
       nebius ai job logs $JOB_ID
       ```

       The logs contain information about the GPUs that `nvidia-smi` provides (in other words, the output of the `nvidia-smi` command).

    You can run `nebius ai job get $JOB_ID` and `nebius ai job logs $JOB_ID` multiple times to determine whether the job is complete, and the full output of `nvidia-smi` is returned in logs.
  </Tab>
</Tabs>

### (Optional) Delete the job

When the job is complete, Serverless AI automatically releases all allocated computing resources and the container disk of the job. When you delete a complete job, you remove it from the list of Serverless AI jobs.

If you delete a running job, all the resources are released as well.

<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** → **Jobs**.
    2. Locate the job and then 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. In the window that opens, confirm deleting the job.
  </Tab>

  <Tab title="CLI">
    To delete the job, run the following command:

    ```bash theme={null}
    nebius ai job delete $JOB_ID
    ```
  </Tab>
</Tabs>
