class

Cloud::VastAI

Inherits Cloud::Provider < Reference < Object

Constants

BASE_URL = "https://cloud.vast.ai"

Constructors

new(api_key : String)
Source

Instance methods

create(offer : Offer, label : String = "microgpt", disk_gb : Int32 = 16, image : String = "nvidia/cuda:13.1.0-runtime-ubuntu24.04") : Instance

Create an instance from an offer

Source
destroy(instance_id : Int64) : Bool

Destroy an instance (irreversible)

Source
exec(instance_id : Int64, command : String) : ExecResult

Execute a command on the instance

Source
list

List all active instances

Source
name

Human-readable provider name

Source
search(gpu : String | Nil = nil, min_gpu_ram : Int32 = 0, max_price : Float64 = 10.0, min_reliability : Float64 = 0.9, num_gpus : Int32 = 1, limit : Int32 = 10) : Array(Offer)

Search for available GPU offers

Source
status(instance_id : Int64) : Instance

Get current instance status

Source