Skip to main content
POST
Error

Authorizations

Authorization
string
header
required

IAM bearer token issued by the Nebius IAM service. Sent as Authorization: Bearer <iam-token>. Must be combined with the Project header (see IAMProjectHeader).

This is the recommended authentication scheme for new clients.

Project
string
header
required

Nebius project ID associated with the IAM token. Required together with IAMBearerAuth. Identifies the project context the request is scoped to.

Path Parameters

operationId
string<uuid>
required

The ID of the operation A UUID string

Example:

"12345678-9abc-baba-deda-0123456789ab"

Body

application/json

Process-execution surface shared between InstanceSpawnRequest (the main process) and POST /operations/{operationId}/subprocesses (additional subprocesses). VM-level concerns (image, hostname, resources_limits, files, timeout, disposable, preserve_env) live on InstanceSpawnRequest only.

command
string
required

The command to execute. Same semantics as in InstanceSpawnRequest.command — when shell=true it is a shell expression, otherwise a path to an executable.

Example:

"/bin/app"

args
string[]

Arguments to pass to the command if shell is set to false.

Example:
shell
boolean
default:false

Run command through a shell expression (args must be empty).

env
object | null

Environment variables to set in the child process.

cwd
string
default:""

Working directory; empty string means image / server default.

Pattern: ^((/[^/]*)+/?)?$
uid
integer
default:0

User ID to run the process as.

Required range: x >= 0
gid
integer
default:0

Group ID to run the process as.

Required range: x >= 0
stdin
object

Bytes fed to the child's stdin — honored for both the main process and exec'd subprocesses. With close=false the pipe stays open and more data can be written via POST /operations/{operationId}/subprocesses/{spid}/stdin.

truncate_output_at
integer
default:1048576

Maximum number of bytes of stdout / stderr to keep. Defaults to 1 MiB; capped at 10 MiB.

Example:

65535

Response

Created — subprocess started. Location references the new subprocess result.

spid
integer
required

Spawn id assigned by the worker.

Required range: x >= 2