CLI
Commands
63min
cli commands usage vastai \[ h] \[ url url] \[ retry retry] \[ raw] \[ explain] \[ api key api key] command positional arguments command command to run one of help print this help message attach ssh attach an ssh key to an instance this will allow you to connect to the instance with the ssh key cancel copy cancel a remote copy in progress, specified by dst id cancel sync cancel a remote copy in progress, specified by dst id change bid change the bid price for a spot/interruptible instance copy copy directories between instances and/or local vm copy copy vm image from one vm instance to another cloud copy copy files/folders to and from cloud providers create api key create a new api key with restricted permissions can be sent to other users and temmates in the future create autogroup create a new autoscale group create endpoint create a new endpoint group create instance create a new instance create subaccount create a subaccount create team create a new team create team role add a new role to your create template create a new template delete api key remove an api key delete ssh key remove an ssh key delete autogroup delete an autoscaler group delete endpoint delete an endpoint group delete env var delete a user environment variable delete template delete a template destroy instance destroy an instance (irreversible, deletes data) destroy instances destroy a list of instances (irreversible, deletes data) destroy team destroy your team detach ssh detach an ssh key from an instance execute execute a (constrained) remote command on a machine get endpt logs fetch logs for a specific serverless endpoint group invite team member invite a team member label instance assign a string label to an instance launch instance launch the top instance from the search offers based on the given parameters logs get the logs for an instance prepay instance deposit credits into reserved instance reboot instance reboot (stop/start) an instance recycle instance recycle (destroy/create) an instance remove team member remove a team member remove team role remove a role from your team reports get the user reports for a given machine reset api key reset your api key (get new key from website) start instance start a stopped instance start instances start a list of instances stop instance stop a running instance stop instances stop a list of instances search benchmarks search for benchmark results using custom query search invoices search for benchmark results using custom query search offers search for instance types using custom query search templates search for template results using custom query ssh url ssh url helper scp url scp url helper show api key show an api key show api keys list your api keys associated with your account show audit logs display account's history of important actions show ssh keys list your ssh keys associated with your account show autogroups display user's current autoscaler groups show connections displays user's cloud connections show earnings get machine earning history reports show env vars show user environment variables show invoices get billing history reports show instance display user's current instances show instances display user's current instances show ipaddrs display user's history of ip addresses show user get current user data show subaccounts get current subaccounts show team members show your team members show team role show your team role show team roles show roles for a team transfer credit transfer credits to another account update autogroup update an existing autoscale group update endpoint update an existing endpoint group update env var update an existing user environment variable update instance update recreate an instance from a new/updated template update team role update an existing team role update template update an existing template update ssh key update an existing ssh key cancel maint \[host] cancel maint window cleanup machine \[host] remove all expired storage instances from the machine, freeing up space delete machine \[host] delete machine if the machine is not being used by clients host jobs on their own machines are disregarded and machine is force deleted list machine \[host] list a machine for rent list machines \[host] list machines for rent remove defjob \[host] delete default jobs set defjob \[host] create default jobs for a machine set min bid \[host] set the minimum bid/rental price for a machine schedule maint \[host] schedule upcoming maint window show machine \[host] show hosted machines show machines \[host] show hosted machines unlist machine \[host] unlist a listed machine options h, help show this help message and exit \ url url server rest api url \ retry retry setry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / config/vastai/ vast api key use 'vastai command help' for more info about a command client commands cancel copy cancel a remote copy in progress, specified by dst id usage vastai cancel copy dst positional arguments dst instance id /path to target of copy operation options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key use this command to cancel any/all current remote copy operations copying to a specific named instance, given by dst examples vastai cancel copy 12371 the first example cancels all copy operations currently copying data into instance 12371 cancel sync cancel a remote copy in progress, specified by dst id usage vastai cancel sync dst positional arguments dst instance id /path to target of sync operation options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key use this command to cancel any/all current remote cloud sync operations copying to a specific named instance, given by dst examples vastai cancel sync 12371 the first example cancels all copy operations currently copying data into instance 12371 change bid change the bid price for a spot/interruptible instance usage vastai change bid id \[ price price] positional arguments id id of instance type to change bid options h, help show this help message and exit \ price price per machine bid price in $/hour \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key change the current bid price of instance id to price if price is not specified, then a winning bid price is used as the default cloud copy copy files/folders to and from cloud providers usage vastai cloud copy src dst cloud service instance id cloud service selected transfer options h, help show this help message and exit \ src src path to source of object to copy \ dst dst path to target of copy operation \ instance instance id of the instance \ connection connection id of cloud connection on your account \ transfer transfer type of transfer, possible options include instance to cloud and cloud to instance \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key copies a directory from a source location to a target location each of source and destination directories can be either local or remote, subject to appropriate read and write permissions required to carry out the action the format for both src and dst is \[instance id ]path you can find more information about the cloud copy operation here https //docs vast ai/instances/cloud sync examples vastai cloud copy src folder dst /workspace cloud service "amazon s3" instance id 6003036 cloud service selected 52 transfer "instance to cloud" the example copies all contents of /folder into /workspace on instance 6003036 from amazon s3 copy copy directories between instances and/or local usage vastai copy src dst positional arguments src instance id /path to source of object to copy dst instance id /path to target of copy operation options h, help show this help message and exit i identity, identity identity location of ssh private key \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key copies a directory from a source location to a target location each of source and destination directories can be either local or remote, subject to appropriate read and write permissions required to carry out the action the format for both src and dst is \[instance id ]path you should not copy to /root or / as a destination directory, as this can mess up the permissions on your instance ssh folder, breaking future copy operations (as they use ssh authentication) you can see more information about constraints here https //docs vast ai/instances/data movement examples vastai copy 6003036 /workspace/ 6003038 /workspace/ vastai copy 11824 /data/test data/test vastai copy data/test 11824 /data/test the first example copy syncs all files from the absolute directory '/workspace' on instance 6003036 to the directory '/workspace' on instance 6003038 the second example copy syncs the relative directory 'data/test' on the local machine from '/data/test' in instance 11824 the third example copy syncs the directory '/data/test' in instance 11824 from the relative directory 'data/test' on the local machine create api key create a new api key with restricted permissions using the format found on permissions and authorization docid\ lknufybdrxm1mgwerc3 t usage vastai create api key options h, help show this help message and exit \ permissions permissions file path for json encoded permissions, look in the docs for more information \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key create autoscaler create a new autoscale group usage vastai autoscaler create \[options] options h, help show this help message and exit \ min load min load minimum floor load in perf units/s (token/s for llms) \ target util target util target capacity utilization (fraction, max 1 0, default 0 9) \ cold mult cold mult cold/stopped instance capacity target as multiple of hot capacity target (default 2 5) \ gpu ram gpu ram estimated gpu ram req (independent of search string) \ template hash template hash template hash (optional) \ template id template id template id (optional) \ search params search params search param string for search offers ex "gpu ram>=23 num gpus=2 gpu name=rtx 4090 inet down>200 direct port count>2 disk space>=64" \ launch args launch args launch args string for create instance ex " onstart onstart wget sh env ' e onstart path=https //s3 amaz onaws com/vast ai/onstart ooba sh' image atinoda/text generation webui\ default nightly disk 64" \ endpoint name endpoint name deployment endpoint name (allows multiple autoscale groups to share same deployment endpoint) \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key create a new autoscaling group to manage a pool of worker instances example vastai create autoscaler min load 100 target util 0 9 cold mult 2 0 search params "gpu ram>=23 num gpus=2 gpu name=rtx 4090 inet down>200 direct port count>2 disk space>=64" launch args " onstart onstart wget sh env ' e onstart path=https //s3 amazonaws com/vast ai/onstart ooba sh' image atinoda/text generation webui\ default nightly disk 64" gpu ram 32 0 endpoint name "llama" create instance create a new instance usage vastai create instance id \[options] \[ args ] positional arguments id id of instance type to launch (returned from search offers) options h, help show this help message and exit \ price price per machine bid price in $/hour \ disk disk size of local disk partition in gb \ image image docker container image to launch \ login login docker login arguments for private repo authentication, surround with '' \ label label label to set on the instance \ onstart onstart filename to use as onstart script \ onstart cmd onstart cmd contents of onstart script as single argument \ entrypoint entrypoint override entrypoint for args launch instance \ ssh launch as an ssh instance type \ jupyter launch as a jupyter instance instead of an ssh instance \ direct use (faster) direct connections for jupyter & ssh \ jupyter dir jupyter dir for runtype 'jupyter', directory in instance to use to launch jupyter defaults to image's working directory \ jupyter lab for runtype 'jupyter', launch instance with jupyter lab \ lang utf8 workaround for images with locale problems install and generate locales before instance launch, and set locale to c utf 8 \ python utf8 workaround for images with locale problems set python's locale to c utf 8 \ env env env variables and port mapping options, surround with '' \ args list of arguments passed to container entrypoint onstart is recommended for this purpose \ create from create from existing instance id to use as basis for new instance instance configuration should usually be identical, as only the difference from the base image is copied \ force skip sanity checks when creating from an existing instance \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key performs the same action as pressing the "rent" button on the website at https //console vast ai/create/ creates an instance from an offer id (which is returned from "search offers") each offer id can only be used to create one instance besides the offer id, you must pass in an ' image' argument as a minimum examples vastai create instance 6995713 image pytorch/pytorch disk 40 env ' p 8081 80801/udp h billybob' ssh direct onstart cmd "env | grep >> /etc/environment; echo 'starting up'"; vastai create instance 384827 image bobsrepo/pytorch\ latest login ' u bob p 9d8df!fd89ufz docker io' jupyter direct env ' e tz=pdt e xname=xx4 p 22 22 p 8080 8080' disk 20 return value returns a json reporting the instance id of the newly created instance example {'success' true, 'new contract' 7835610} create subaccount create a subaccount usage vastai create subaccount email email username username password password type type options h, help show this help message and exit \ email email email address to use for login \ username username username to use for login \ password password password to use for login \ type type host/client \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key creates a new account that is considered a child of your current account as defined via the api key create team create a new team usage vastai create team team name team name options h, help show this help message and exit \ team name team name name of the team \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key create team role add a new role to your usage vastai create team role name permissions permissions options h, help show this help message and exit \ name name name of the role \ permissions permissions file path for json encoded permissions, look in the docs for more information \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key delete api key remove an api key usage vastai delete api key id positional arguments id id of apikey to remove options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key delete autoscaler delete an autoscaler group usage vastai delete autoscaler id positional arguments id id of group to delete options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key note that deleteing an autoscaler group doesn't automatically destroy all the instances that are associated with your autoscaler group example vastai delete autoscaler 4242 destroy instance destroy an instance (irreversible, deletes data) usage vastai destroy instance id \[ h] \[ api key api key] \[ raw] positional arguments id id of instance to delete options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key perfoms the same action as pressing the "destroy" button on the website at https //console vast ai/instances/ example vastai destroy instance 4242 destroy instances destroy a list of instances (irreversible, deletes usage vastai destroy instances \[ raw] \<id> positional arguments ids ids of instance to destroy options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key destroy team destroy your team usage vastai destroy team options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key execute execute a (constrained) remote command on a machine usage vastai execute id command positional arguments id id of instance to execute on command bash command surrounded by single quotes options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key examples vastai execute 99999 'ls l o r' vastai execute 99999 'rm r home/delete this txt' vastai execute 99999 'du d2 h' available commands ls list directory contents rm remote files or directories du summarize device usage for a set of files return value returns the output of the command which was executed on the instance, if successful may take a few seconds to retrieve the results generate pdf invoices usage vastai generate pdf invoices \[options] options h, help show this help message and exit q, quiet only display numeric ids s start date, start date start date start date and time for report many formats accepted (optional) e end date, end date end date end date and time for report many formats accepted (optional) c, only charges show only charge items p, only credits show only credit items \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key invite team member invite a team member usage vastai invite team member email email role role options h, help show this help message and exit \ email email email of user to be invited \ role role role of user to be invited \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key label instance assign a string label to an instance usage vastai label instance \<id> \<label> positional arguments id id of instance to label label label to set options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key logs get the logs for an instance usage vastai logs \[options] instance id positional arguments instance id id of instance options h, help show this help message and exit \ tail tail number of lines to show from the end of the logs (default '1000') \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key prepay instance deposit credits into reserved instance usage vastai prepay instance \<id> \<amount> positional arguments id id of instance to prepay for amount amount of instance credit prepayment (default discount func of 0 2 for 1 month, 0 3 for 3 months) options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key reboot instance reboot (stop/start) an instance usage vastai reboot instance \<id> \[ raw] positional arguments id id of instance to reboot options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key instance is stopped and started without any risk of losing gpu priority remove team member remove a team member usage vastai remove team member id positional arguments id id of user to remove options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key remove team role remove a role from your team usage vastai remove team role name positional arguments name name of the role options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key reports get the user reports for a given machine usage vastai reports m id positional arguments m id machine id options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key reset api key reset your api key (get new key from website) usage vastai reset api key options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key scp url scp url helper usage vastai scp url id positional arguments id id options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key search offers search for instance types using custom query usage vastai search offers \[ help] \[ api key api key] \[ raw] \<query> positional arguments query query to search for default 'external=false rentable=true verified=true', pass n to ignore default options h, help show this help message and exit t type, type type show 'on demand', 'reserved', or 'bid'(interruptible) pricing default on demand i, interruptible alias for type=bid b, bid alias for type=bid r, reserved alias for type=reserved d, on demand alias for type=on demand n, no default disable default query \ disable bundling show identical offers this request is more heavily rate limited \ storage storage amount of storage to use for pricing, in gib default=5 0gib o order, order order comma separated list of fields to sort on postfix field with to sort desc ex o 'num gpus,total flops ' default='score ' \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key query syntax query = comparison comparison comparison = field op value field = \<name of a field> op = one of <, <=, ==, !=, >=, >, in, notin value = \<bool, int, float, etc> | 'any' bool true, false note to pass '>' and '<' on the command line, make sure to use quotes note to encode a string query value (ie for gpu name), replace any spaces ' ' with underscore ' ' examples \# search for somewhat reliable single rtx 3090 instances, filter out any duplicates or offers that conflict with our existing stopped instances vastai search offers 'reliability > 0 98 num gpus=1 gpu name=rtx 3090 rented=false' \# search for datacenter gpus with minimal compute cap and total flops vastai search offers 'compute cap > 610 total flops > 5 datacenter=true' \# search for reliable machines with at least 4 gpus, unverified, order by num gpus, allow duplicates vastai search offers 'reliability > 0 99 num gpus>=4 verified=false rented=any' o 'num gpus ' available fields name type description bw nvlink float bandwidth nvlink compute cap int cuda compute capability 100 (ie 650 for 6 5, 700 for 7 0) cpu cores int # virtual cpus cpu cores effective float # virtual cpus you get cpu ram float system ram in gigabytes cuda vers float machine max supported cuda version (based on driver version) datacenter bool show only datacenter offers direct port count int open ports on host's router disk bw float disk read bandwidth, in mb/s disk space float disk storage space, in gb dlperf float dl perf score (see faq for explanation) dlperf usd float dl perf/$ dph float $/hour rental cost driver version string machine's nvidia driver version as 3 digit string ex "535 86 05" duration float max rental duration in days external bool show external offers in addition to datacenter offers flops usd float tflops/$ geolocation string two letter country code works with operators =, !=, in, not in (e g geolocation not in \[xv,xz]) gpu mem bw float gpu memory bandwidth in gb/s gpu name string gpu model name (no quotes, replace spaces with underscores, ie rtx 3090 rather than 'rtx 3090') gpu ram float gpu ram in gb gpu frac float ratio of gpus in the offer to gpus in the system gpu display active bool true if the gpu has a display attached has avx bool cpu supports avx instruction set id int instance unique id inet down float internet download speed in mb/s inet down cost float internet download bandwidth cost in $/gb inet up float internet upload speed in mb/s inet up cost float internet upload bandwidth cost in $/gb machine id int machine id of instance min bid float current minimum bid price in $/hr for interruptible num gpus int # of gpus pci gen float pcie generation pcie bw float pcie bandwidth (cpu to gpu) reliability float machine reliability score (see faq for explanation) rentable bool is the instance currently rentable rented bool allow/disallow duplicates and potential conflicts with existing stopped instances storage cost float storage cost in $/gb/month static ip bool is the ip addr static/stable total flops float total tflops from all gpus ubuntu version string host machine ubuntu os version verified bool is the machine verified set api key set api key (get your api key from the console/cli) usage vastai set api key apikey positional arguments new api key api key to set as currently logged in user options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key show api key show an api key usage vastai show api key positional arguments id id of apikey to get options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key show api keys list your api keys associated with your account usage vastai show api keys options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key show autoscalers display user's current autoscaler groups usage vastai show autoscalers \[ api key api key] options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key example vastai show autoscalers show connections displays user's cloud connections usage vastai show connections \[ api key api key] \[ raw] options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key show earnings get machine earning history reports usage vastai show earnings \[options] options h, help show this help message and exit q, quiet only display numeric ids s start date, start date start date start date and time for report many formats accepted e end date, end date end date end date and time for report many formats accepted m machine id, machine id machine id machine id (optional) \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key show instance display user's current instances usage vastai show instance \[ api key api key] \[ raw] positional arguments id id of instance to get options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key show instances display user's current instances usage vastai show instances \[options] \[ api key api key] \[ raw] options h, help show this help message and exit q, quiet only display numeric ids \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key show invoices get billing history reports usage vastai show invoices \[options] options h, help show this help message and exit q, quiet only display numeric ids s start date, start date start date start date and time for report many formats accepted (optional) e end date, end date end date end date and time for report many formats accepted (optional) c, only charges show only charge items p, only credits show only credit items \ instance label instance label filter charges on a particular instance label (useful for autoscaler groups) \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key show ipaddrs display user's history of ip addresses usage vastai show ipaddrs \[ api key api key] \[ raw] options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key show subaccounts get current subaccounts usage vastai show subaccounts \[options] options h, help show this help message and exit q, quiet display subaccounts from current user \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key show team members show your team members usage vastai show team members options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key show team role show your team role usage vastai show team role name positional arguments name name of the role options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key show team roles show roles for a team usage vastai show team roles options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key show user get current user data usage vastai show user \[options] options h, help show this help message and exit q, quiet display information about user \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key shows stats for logged in user these include user balance, email, and ssh key does not show api key ssh url ssh url helper usage vastai ssh url id positional arguments id id of instance options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key start instance start a stopped instance usage vastai start instance \<id> \[ raw] positional arguments id id of instance to start/restart options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key this command attempts to bring an instance from the "stopped" state into the "running" state this is subject to resource availability on the machine that the instance is located on if your instance is stuck in the "scheduling" state for more than 30 seconds after running this, it likely means that the required resources on the machine to run your instance are currently unavailable examples vastai start instances $(vastai show instances q) vastai start instance 329838 start instances start a list of instances usage vastai start instances \[ raw] id0 id1 id2 positional arguments ids ids of instance to start options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key stop instance stop a running instance usage vastai stop instance \[ raw] id positional arguments id id of instance to stop options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key this command brings an instance from the "running" state into the "stopped" state when an instance is "stopped" all of your data on the instance is preserved, and you can resume use of your instance by starting it again once stopped, starting an instance is subject to resource availability on the machine that the instance is located on there are ways to move data off of a stopped instance, which are described here https //docs vast ai/instances/data movement stop instances stop a list of instances usage vastai stop instances \[ raw] id0 id1 id2 positional arguments ids ids of instance to stop options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key examples vastai stop instances $(vastai show instances q) vastai stop instances 329838 984849 transfer credit transfer credits to another account usage vastai transfer credit recipient amount positional arguments recipient email of recipient account amount $dollars of credit to transfer options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key transfer (amount) credits to account with email (recipient) update autoscaler update an existing autoscale group usage vastai update autoscaler id \[options] positional arguments id id of autoscale group to update options h, help show this help message and exit \ min load min load minimum floor load in perf units/s (token/s for llms) \ target util target util target capacity utilization (fraction, max 1 0, default 0 9) \ cold mult cold mult cold/stopped instance capacity target as multiple of hot capacity target (default 2 5) \ gpu ram gpu ram estimated gpu ram req (independent of search string) \ template hash template hash template hash \ template id template id template id \ search params search params search param string for search offers ex "gpu ram>=23 num gpus=2 gpu name=rtx 4090 inet down>200 direct port count>2 disk space>=64" \ launch args launch args launch args string for create instance ex " onstart onstart wget sh env ' e onstart path=https //s3 amaz onaws com/vast ai/onstart ooba sh' image atinoda/text generation webui\ default nightly disk 64" \ endpoint name endpoint name deployment endpoint name (allows multiple autoscale groups to share same deployment endpoint) \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key example vastai update autoscaler 4242 min load 100 target util 0 9 cold mult 2 0 search params "gpu ram>=23 num gpus=2 gpu name=rtx 4090 inet down>200 direct port count>2 disk space>=64" launch args " onstart onstart wget sh env ' e onstart path=https //s3 amazonaws com/vast ai/onstart ooba sh' image atinoda/text generation webui\ default nightly disk 64" gpu ram 32 0 endpoint name "llama" update team role update an existing team role usage vastai update team role id name name permissions permissions positional arguments id id of the role options h, help show this help message and exit \ name name name of the template \ permissions permissions file path for json encoded permissions, look in the docs for more information \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key host commands list machine \[host] list a machine for rent usage vastai list machine id \[ price gpu price gpu] \[ price inetu price inetu] \[ price inetd price inetd] \[ api key api key] positional arguments id id of machine to list options h, help show this help message and exit g price gpu, price gpu price gpu per gpu rental price in $/hour (price for active instances) s price disk, price disk price disk storage price in $/gb/month (price for inactive instances), default $0 15/gb/month u price inetu, price inetu price inetu price for internet upload bandwidth in $/gb d price inetd, price inetd price inetd price for internet download bandwidth in $/gb r discount rate, discount rate discount rate max long term prepay discount rate fraction, default 0 4 m min chunk, min chunk min chunk minimum amount of gpus e end date, end date end date unix timestamp of the available until date (optional) \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key performs the same action as pressing the "list" button on the site https //cloud vast ai/host/machines on the end date the listing will expire and your machine will unlist however any existing client jobs will still remain until ended by their owners once you list your machine and it is rented, it is extremely important that you don't interfere with the machine in any way if your machine has an active client job and then goes offline, crashes, or has performance problems, this could permanently lower your reliability rating we strongly recommend you test the machine first and only list when ready remove defjob \[host] delete default jobs usage vastai remove defjob id positional arguments id id of machine to remove default instance from options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key schedule maint \[host] schedule upcoming maint window usage vastai schedule maintenance id \[ sdate start date duration duration] positional arguments id id of machine to schedule maintenance for options h, help show this help message and exit \ sdate sdate maintenance start date in unix epoch time (utc seconds) \ duration duration maintenance duration in hours \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key the proper way to perform maintenance on your machine is to wait until all active contracts have expired or the machine is vacant for unplanned or unscheduled maintenance, use this schedule maint command that will notify the client that you have to take the machine down and that they should save their work you can specify a date and duration example vastai schedule maint 8207 sdate 1677562671 duration 0 5 set defjob \[host] create default jobs for a machine usage vastai set defjob id \[ api key api key] \[ price gpu price gpu] \[ price inetu price inetu] \[ price inetd price inetd] \[ image image] \[ args ] positional arguments id id of machine to launch default instance on options h, help show this help message and exit \ price gpu price gpu per gpu rental price in $/hour \ price inetu price inetu price for internet upload bandwidth in $/gb \ price inetd price inetd price for internet download bandwidth in $/gb \ image image docker container image to launch \ args list of arguments passed to container launch \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key performs the same action as creating a background job at https //cloud vast ai/host/create set min bid \[host] set the minimum bid/rental price for a machine usage vastai set min bid id \[ price price] positional arguments id id of machine to set min bid price for options h, help show this help message and exit \ price price per gpu min bid price in $/hour \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key change the current min bid price of machine id to price show machines \[host] show hosted machines usage vastai show machines \[options] options h, help show this help message and exit q, quiet only display numeric ids \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key unlist machine \[host] unlist a listed machine usage vastai unlist machine \<id> positional arguments id id of machine to unlist options h, help show this help message and exit \ url url server rest api url \ retry retry retry limit \ raw output machine readable json \ explain output verbose explanation of mapping of cli calls to https api endpoints \ api key api key api key defaults to using the one stored in / vast api key