Loading...
Loading...
Vast.ai API Documentation - Affordable GPU Cloud Marketplace
npx skill4agent add rawveg/skillsforge-marketplace vastai-apivastai# Create instance from an offer
vastai create instance <offer_id> \
--image pytorch/pytorch:latest \
--disk 50 \
--ssh# Show all instances
vastai show instances
# Show specific instance details
vastai show instance <instance_id># Stop an instance (pause GPU billing, storage still charged)
vastai stop instance <instance_id>
# Start a stopped instance
vastai start instance <instance_id>
# Reboot instance without losing GPU priority
vastai reboot instance <instance_id>
# Destroy instance permanently (irreversible)
vastai destroy instance <instance_id># Add your public SSH key
vastai create ssh-key "ssh-rsa AAAAB3NzaC1yc2EA... user@host"
# List all SSH keys
vastai show ssh-keys
# Attach SSH key to specific instance
vastai attach ssh <instance_id> <ssh_key># Search with filters
vastai search offers \
--gpu_name RTX_4090 \
--num_gpus 2 \
--disk_space 100
# Order by price
vastai search offers --order dph_total# Create encrypted environment variable
vastai create env-var MY_API_KEY "secret_value_here"
# List all environment variables
vastai show env-vars
# Update existing variable
vastai update env-var MY_API_KEY "new_secret_value"
# Delete environment variable
vastai delete env-var MY_API_KEY# Show invoices
vastai show invoices
# Show earnings (for hosts)
vastai show earnings
# Show deposit for specific instance
vastai show deposit <instance_id>
# Transfer credits to another user
vastai transfer credit recipient@email.com 25.00# Get last 100 lines of logs
vastai show logs <instance_id> --tail 100
# Filter logs with grep pattern
vastai show logs <instance_id> --filter "error"
# Get daemon system logs
vastai show logs <instance_id> --daemon-logs# Copy from one instance to another
vastai copy <src_id> <dst_id> /source/path /destination/path
# Cloud copy using rclone
vastai cloud copy <instance_id> remote:bucket/path /local/path# List machine with pricing
vastai list machine <machine_id> \
--price_gpu 0.50 \
--price_disk 0.10
# Unlist machine (stop renting)
vastai unlist machine <machine_id>
# Schedule maintenance window
vastai schedule maint <machine_id> \
--sdate "2025-11-01T10:00:00" \
--duration 3600startingrunningstoppedexitedrebootingrecyclingreferences/llms-txt.mdllms-full.mdllms.mdllms-txt.mdvastai