Skip to main content
To configure the Nebius AI Cloud CLI, use one of the authorization options:
  • A user account offers personalized access and accountability. It can be used when you, as a human user, need to manage and interact with resources.
  • A service account automates the interaction of applications and services with resources.

Authorize with a user account

To authorize quickly, follow the non-interactive flow. To control the authorization process, follow the interactive flow.
  1. Open your terminal.
  2. Create a name of your new profile in the Nebius AI Cloud CLI and save it to an environment variable:
    export NB_PROFILE_NAME=<new-profile-name>
    
  3. Copy your project ID from the web console and save it to an environment variable. To get the project ID, go to the web console and expand the top list of projects. Next to the project’s name, click https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/button-vellipsis.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=e80b8e57c43bfd117679262e6a1334ad → Copy project ID.
    export NB_PROJECT_ID=<project_ID>
    
  4. Run the following command:
    nebius profile create \
      --profile $NB_PROFILE_NAME \
      --endpoint api.nebius.cloud \
      --federation-endpoint auth.nebius.com \
      --parent-id $NB_PROJECT_ID
    
    If you are added to someone else’s tenant and know the ID of its federation, you can specify it either in the --federation-id parameter, or when logging in to the Nebius AI Cloud web console after running the command.
  5. In the browser tab that opens, log in to the web console if prompted. After logging in (or if you have already been logged in), you will see the following message:
    Login is successful, you may close the browser tab and go to the console
    
  6. Close the browser tab and go back to your terminal window. You will see the following message:
    Profile "<profile-name>" configured and activated
    
  7. Verify that your new profile has been created and set as the default:
    nebius profile list
    
    You should see the following output:
    default
    <profile-name> [default]
    

Authorize with a service account

Before authorization, create a service account. You can do it using a user account or another service account within 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. To authorize quickly, follow the non-interactive flow. To control the authorization process, follow the interactive flow.
  1. Open the service account page in the web console and view the service account details. You’ll need to view the service account’s details from there.
  2. Open your terminal.
  3. Open the service account page in the web console.
  4. Save the service account details to environment variables:
    export SA_ID=<service-account-id>
    export PUBLIC_KEY_ID=<...>
    export PRIVATE_KEY_PATH=<...>
    
  5. Create a name for your profile and save it to an environment variable:
    export SA_PROFILE_NAME=<...>
    
    For example, gpu-monitoring-sa.
    Use one profile per projectCreate a separate Nebius AI Cloud CLI profile for each project to ensure correct region-specific configuration.
  6. Copy your project ID from the web console and save it to an environment variable. To get the project ID, go to the web console and expand the top list of projects. Next to the project’s name, click https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/button-vellipsis.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=e80b8e57c43bfd117679262e6a1334ad → Copy project ID.
    export NB_PROJECT_ID=<project_ID>
    
  7. Run the following command:
    nebius profile create \
      --endpoint api.nebius.cloud \
      --service-account-id $SA_ID \
      --public-key-id $PUBLIC_KEY_ID \
      --private-key-file $PRIVATE_KEY_PATH \
      --profile $SA_PROFILE_NAME \
      --parent-id $NB_PROJECT_ID
    
    You will see the following message:
    Profile "<profile-name>" configured and activated
    
  8. Check that your new profile has been created and set as the default one:
    nebius profile list
    
    You should see the following output:
    default
    <profile-name> [default]