Registry / devops / vastai

vastai

JSON →
library1.0.12pypypi✓ verified 81d ago

Official CLI and Python SDK for Vast.ai GPU cloud service, enabling users to rent GPU instances, manage storage, and interact with the platform programmatically. Current version 1.0.12, release cadence is irregular (multiple releases in 2025).

pip install vastai
INSTALL
IMPORT
SIG · VASTAI
V
vastai
devopspythonv1.0.12
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

VastAI
from vastai import VastAI
import vast
AsyncClient
from vastai import AsyncClient
SyncClient
from vastai import SyncClient

Search for RTX 4090 instances and launch one for 1 hour.

import vast from vast import VastClient # Initialize client with API key client = VastClient(api_key=os.environ.get('VAST_API_KEY', '')) # Search for available instances instances = client.search_offers('nvidia-rtx-4090') for inst in instances[:3]: print(inst['id'], inst['price']['dph']) # Create instance instance = client.create_instance(offer_id=instances[0]['id'], duration_hours=1) print(f"Created instance {instance['id']}")
vast --version
Debug
Known issues
breakingAuto-update is now off by default as of v0.3.1. To enable it, set `should_check_for_update = True`.
fix
Create a configuration file or set environment variable as per documentation.
affects: >=0.3.1
gotchaThe `copy` command behavior changed in v0.4.0. Refer to https://docs.vast.ai/data-movement for new syntax.
fix
Use new data movement options as described in the docs.
affects: >=0.4.0
deprecatedPython 3.10 is minimum version as of v1.0.12 (requires>=3.10).
fix
Upgrade Python to 3.10 or later.
affects: >=1.0.0
gotchaAPI keys must be passed explicitly in code; reading from `VAST_API_KEY` environment variable is not automatic.
fix
Pass `api_key` argument to VastClient or set `VAST_API_KEY` and use `os.environ.get`.
affects: all
Upgrade
Version history
1.0.12latest on PyPI · released May 8, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
40 hits · last 30 days
node
34
Amazon
1
OpenAI (training)
1
Resources
vastai — pip install vastai · libregistry