Skip to content

Reference

The user-facing surface of nebius_serverless. Import it as ns.

import nebius_serverless as ns
Area Look up
Jobs Job · Job.dry_run · Job.create · Job.wait · Job.cancel · jobs.get · JobSpec · JobSpec.from_yaml
Endpoints Endpoint · Endpoint.create · Endpoint.wait · stop · start · delete · endpoints.get · EndpointSpec
Tasks Task · Task.submit · TaskRun
Images Image · Image.build
Session and auth configure · whoami · close · configure_logging · diagnostics
  • CLI and API map: each parameter's nebius ai flag and API field.
  • Errors: the exceptions this package raises, and what to do about each.

Everywhere

Constructing a Job, Endpoint, Task, Image, JobSpec or EndpointSpec, loading YAML, or importing the package does not authenticate, upload, or create. Only create() creates a job or an endpoint. The Nebius SDK is imported on the call that resolves a profile or contacts Nebius.

Logs stay on the CLI: nebius ai job logs <id>. This package does not stream them.

Sync calls work in a notebook cell, and the awaited twins keep an event loop responsive: see Async and notebooks.

Supported imports

These imports are supported, and changes to them are called out in the release notes:

Import For
import nebius_serverless as ns, and every name in ns.__all__ Everyone. ns.JobSpec, ns.Task, ns.jobs.get(id), and the rest on these pages.
nebius_serverless.errors The same exceptions as ns.Error and its subclasses.
nebius_serverless.integrations.<name> An integration, such as nebius_serverless.integrations.prefect.
nebius_serverless.tasks.driver Writing an integration: the names in its __all__.

The package is organized by feature: jobs/, endpoints/, images/, tasks/, shared code in core/, and progress output in ui/. Those modules are importable, but they are implementation: a function there is not supported because it can be imported, and it may move or change in any release. tests/test_boundaries.py checks which package may import which, and tests/test_public_api.py checks that the names above do not change by accident.