Skip to main content
Create multiple instances from a list of offer IDs.

Signature

Parameters

ids
List[int]
required
List of offer/contract IDs to create instances from.
template_hash
Optional[str]
Hash of the instance template to use.
user
Optional[str]
Subaccount username to create the instances under.
disk
float
default:"10"
Disk space to allocate in GB.
image
Optional[str]
Docker image name to use for the instance.
login
Optional[str]
Docker login credentials for private registry authentication.
label
Optional[str]
Label to attach to the instances.
onstart
Optional[str]
Filename of an onstart script to run on instance start.
onstart_cmd
Optional[str]
Shell command to run on instance start.
entrypoint
Optional[str]
Override the Docker image entrypoint.
ssh
bool
default:"False"
Enable SSH access to the instances.
jupyter
bool
default:"False"
Enable Jupyter notebook server.
direct
bool
default:"False"
Enable direct (peer-to-peer) connections.
jupyter_dir
Optional[str]
Directory to serve Jupyter from.
jupyter_lab
bool
default:"False"
Enable JupyterLab instead of classic Jupyter.
lang_utf8
bool
default:"False"
Set system language encoding to UTF-8.
python_utf8
bool
default:"False"
Set Python I/O encoding to UTF-8.
extra
Optional[str]
Extra Docker run arguments passed verbatim.
env
Optional[str]
Environment variables to set (formatted as Docker -e flags).
args
Optional[List[str]]
Additional positional arguments.
force
bool
default:"False"
Skip sanity checks when creating from an existing instance.
cancel_unavail
bool
default:"False"
Return an error if scheduling fails rather than creating a stopped instance.
bid_price
Optional[float]
Per-machine bid price in $/hour for interruptible (spot) instances.
create_volume
Optional[int]
Offer ID from “search volumes” to create a new local volume linked to each instance.
ID of an existing rented volume to link to each instance.
volume_size
Optional[int]
Size of the volume to create in GiB.
mount_path
Optional[str]
Filesystem path inside the instance where the volume is mounted.
volume_label
Optional[str]
Label to attach to the created volume.

Returns

str, Result from the API call.

Example