Skip to main content
Complete these steps before running the Python, CLI, or REST examples.

Create an API key and find the project ID

  1. Open the Token Factory API keys page, create a key in the project that will run Sandboxes, and save the value when it is shown. The value cannot be opened again later.
  2. Open Project settings in Token Factory and copy the project ID shown under the project name. Organizations and projects explains project scope; Groups and access management explains how project membership grants access to resources.
Keep the API key outside source files and sandbox inputs.

Verify access with the CLI

This diagnostic step is optional for Python and REST users. It gives a quick way to distinguish an accepted credential from a missing Sandboxes permission. Install uv if needed, then install CLI 0.9.4 and register a profile:
The profile status distinguishes several setup failures: For activation help, send the project ID and profile status to contree@nebius.com. An inactive profile can mean either missing project activation or missing caller permission; do not send the API key.

Configure connection variables

For SDK work, export the connection variables explicitly:
All examples use NEBIUS_AI_PROJECT for the project ID. In REST requests, the shell expands this variable into the Project header.

Find an image UUID

List images available to the selected project:
The first column is the immutable image UUID. A tag:NAME reference is easier to discover, but a tag can later point to another image. Use the UUID in recorded experiments and REST examples. The Python quickstart and general SDK examples use tag:alpine:latest; the CLI quickstart uses tag:ubuntu:latest. If a tag is unavailable, select an image with /bin/sh and the commands needed by the example, and use its UUID instead. To bring a different image from a registry, see Import an image from a registry.

Continue