Skip to main content
Retrieve and display a list of machines based on specified criteria.
This is a host method, used for managing machines you are renting out on Vast.ai.

Signature

VastAI.show_machines(quiet: bool = False, filter: Optional[str] = None) -> str

Parameters

quiet
bool
default:"False"
If True, limit the output to minimal details such as IDs.
filter
Optional[str]
A string used to filter the machines based on specific criteria.

Returns

str — Result from the API call.

Example

from vastai import VastAI

client = VastAI(api_key="YOUR_API_KEY")
result = client.show_machines()
print(result)