Skip to main content

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.

To authenticate as a service account and perform operations on its behalf, use an authorized key pair.

Prerequisites

  1. Make sure that you, or the service account that you use on your behalf, is in a group that has the admin role within your tenant; for example, the default admins group. You can check this in the Administration → IAM section of the web console.
  2. Create a new service account if needed.

Create a key pair

If you are using the CLI, this step is optional. If you use the nebius iam auth-public-key generate command in the next step, the CLI creates the key pair for you.
Create a key pair on your local machine:
openssl genrsa -out private.pem 4096 && \
openssl rsa -in private.pem -outform PEM -pubout -out public.pem
This command creates the public.pem and private.pem key files in your local directory where you run the command.

Upload the public key

  1. In the web console, go to https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/sidebar/administration.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=e6411dc023fd6972922c0a12a59ccf21 AdministrationIAM.
  2. Open the Service accounts tab.
  3. Open the page of the required service account.
  4. Click https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/arrow-up-to-line.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=5ed27f4ff211ee66d1ee185f2af2955e Upload authorized key.
  5. Click https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/scraper.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=ff78334f556ea2b3be40db941b89c608 Attach file and then select public.pem.
  6. (Optional) Set an expiration date.
  7. Click Upload key.
The key is displayed on the Authorized keys tab.

Update the configuration

Update your configuration to use the authorized key you created:
If you used the web console to upload the public key, you do not need to update any additional configuration.
Create a new CLI profile:
  1. Initialize the Nebius AI Cloud CLI configuration:
    nebius profile create \
      --endpoint api.nebius.cloud \
      --service-account-file ~/.nebius/$SA_ID-credentials.json \
      --profile <profile_name>
    
  2. Check that your new profile has been created and set as default:
    nebius profile list
    
Now you can run Nebius AI Cloud CLI commands on behalf of the service account. To do this, add --profile <service_account_profile_name> to the commands.