How Does Renting a GPU on Vast.ai Work?

Updated

Renting a GPU on Vast.ai means adding credit, searching the marketplace for a GPU that matches your model, VRAM, price, and availability needs, then launching an instance through the console, CLI, SDK, or REST API. Vast.ai states you can start with as little as $5, there are no contracts or sales calls, and the sign-up-to-running-workload path takes under five minutes. It fits developers and AI teams who want on-demand GPU capacity without committing to a reserved contract.

What Vast.ai actually is

Vast.ai describes itself as "Agent-Ready AI Infrastructure" and a marketplace where prices are set by supply and demand across 20,000+ GPUs. The site reports 40+ data centers, 68+ GPU types, and 700K+ transactions per month, and says it is SOC 2 certified.

The core idea is that every GPU is provisioned through code. The same API developers use to deploy is the interface AI agents use to procure and optimize compute at scale.

The three-step rental flow

Vast.ai lays out the process as follows:

  1. Add credit and get your API key. Start with as little as $5. Grab your API key from the console. No contracts, no sales calls.
  2. Search GPUs. Filter by model, VRAM, price, and availability, either through the console or the API.
  3. Deploy. Launch instances in seconds and scale up or down programmatically.

Billing is per-second, and pricing is described as real-time and programmatically queryable. You can browse current rates on the pricing page rather than assuming a fixed rate.

Three ways to deploy

Vast.ai offers three deployment models on one platform:

Option What it's for How you interact
GPU Cloud On-demand instances with full control CLI, SDK, or API
Serverless Zero-ops inference endpoints Automatic benchmarking and optimization across GPU types; autoscales to zero
Clusters Large-scale training Dedicated multi-node clusters with InfiniBand networking

Serverless is the option to consider when you don't want to manage instances and want to pay only for compute time. Clusters matter when a single node isn't enough and you need multi-node networking.

Developer tools and entry points

Vast.ai documents three programmatic interfaces:

  • CLI — search, filter, and deploy from your terminal, no Python required:
    curl -fsSL https://vast.ai/install.sh | bash
    
  • Python SDK — provisioning in five lines of code:
    pip install vastai
    
  • REST API — the interface agents call to provision infrastructure:
    curl -H "Authorization: Bearer $VAST_API_KEY" https://cloud.vast.ai/api/v1/bundles/
    

The REST example shows the pattern: you authenticate with a bearer token and query the bundles endpoint to see what's available before deploying.

What you can run

Vast.ai lists use cases spanning AI/ML frameworks, text generation, image and video generation, AI agents, batch data processing, audio-to-text transcription, fine-tuning, virtual computing, GPU programming, and graphics rendering. It also provides pre-configured templates for popular open-source models, such as Qwen Image 2.1 for text-to-image and image editing, so you can launch a working setup without building the environment yourself.

What to check before you commit

  • Price is dynamic. Because prices are set by supply and demand, the rate for a given GPU type can move. Query it rather than relying on a remembered number.
  • Minimum entry is low, but not free. The $5 figure is a starting credit amount, not a free tier. Confirm current terms on the pricing page.
  • Pick the deployment model first. Full-control instances, serverless endpoints, and multi-node clusters solve different problems; choosing the wrong one adds work later.
  • API key handling matters. The REST example passes the key as a bearer token, so treat it as a credential and keep it out of shared code.