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.

Use the correct project variable

For SDK or REST work, export the runtime project variable explicitly:

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 uses alpine:3.19, and the CLI quickstart uses ubuntu:latest. If either tag is absent, select an available image from contree images and record its UUID. Replace "alpine:3.19" in the Python example with that UUID, or pass the UUID to contree use in the CLI example. Choose an image with /bin/sh and the commands used by the example.

Continue