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 virtual machine (VM) in which the job is running. In the web console, the nvidia-smi quick-start configuration runs the same kind of workload with settings already filled in.
Prerequisites
Steps
Run a Serverless AI job
- In the sidebar, go to
Serverless AI → Jobs.
- Select the nvidia-smi quick start card.
The quick start configuration uses a verified container image and prefilled job settings.
- Click Create job.
Use nebius ai create to create a step by step in the terminal. The command prompts you to enter values to pass as parameters, shows the resulting configuration and then creates the .
- Run the following command:
Alternatively, you can run
nebius ai create and specify each value step by step with CLI prompts. The command pre-fills the following values:
--name: Job name.
--image: Container image to run. In the given example, the nvidia/cuda:13.1.1-runtime-ubuntu24.04 image 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.
--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.
- When the CLI prompts you to select a project, region or subnet, select from the values that are available.
- Review the resulting configuration, then confirm creation.
Send the following request:In the Authorization header, replace <access_token> with the access token that you got in the prerequisites.The request includes the following parameters:
metadata.parentId: Project ID.
metadata.name: Job name.
spec.image: Container image to run. In the given example, the nvidia/cuda:13.1.1-runtime-ubuntu24.04 image is used. It contains the Ubuntu 24.04 operating system as well as drivers and other components for GPUs.
spec.containerCommand: Terminal shell for commands to run.
spec.args: Arguments for docker run to pass to the entrypoint command. The specified arguments require the container to run nvidia-smi.
spec.platform: VM platform for the job. As Serverless AI jobs are based on containers over VMs, every job uses Compute platforms and presets.
spec.preset: Number of GPUs, vCPUs and RAM allocated to the container. The preset must match the selected platform.
spec.timeout: Duration after which the job is canceled if it has not completed.
spec.subnetId: Subnet ID.
spec.disk.type: Disk type for the container over VM.
spec.disk.sizeBytes: Disk size in bytes. The specified value is 250 GiB.
The response returns the job ID in the resourceId parameter. Save this value because you need it in later steps.
The job takes several minutes to complete. While the job is running, you can check its status and logs.
Check the job status and results
Checking job logs is available only in the web console and CLI.
- In the sidebar, go to
Serverless AI → Jobs.
- 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.
- Save the job ID to an environment variable:
- View information about the job:
The command output contains such data as the job status, start and finish times.
- 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.
- When the job has started, check its logs:
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.Get the job and check the status.state parameter in the response:In the request, specify:
- Your access token in the
Authorization header.
- In the request path, the job ID returned in the
resourceId parameter when you created the job.
If the state doesn’t indicate that the job has started, wait a few seconds and send the request again. You can repeat the request until the job reaches the COMPLETED state.
(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 completed job, you remove it from the list of Serverless AI jobs.
If you delete a running job, all the resources are released as well.
- In the sidebar, go to
Serverless AI → Jobs.
- Locate the job and then click
→ Delete.
- In the window that opens, confirm deleting the job.
To delete the job, run the following command: To delete the job, send the following request:In the request, specify:
- Your access token in the
Authorization header.
- In the request path, the job ID returned in the
resourceId parameter when you created the job.