vastai-sdk
DEPRECATED — use 'pip install vastai' instead. This package is a compatibility wrapper that installs vastai.
What it is and what it does
vastai-sdk is a Python client library for the Vast.ai GPU compute marketplace. It wraps the Vast.ai REST API to let you search available GPU instances, manage your rented compute, and interact with serverless inference endpoints. The package supports both synchronous instance management (searching, starting, stopping instances) and asynchronous serverless client operations for making inference requests.
The package is officially deprecated and has been merged into a unified vastai package; installing vastai-sdk now installs the same underlying package. It remains available as a compatibility wrapper for existing code. The library requires Python 3.9 or later and depends only on the vastai runtime package.
Use it for:
- Search and filter GPU compute offers by hardware specs, price, or availability.
- Start, stop, and monitor GPU instances programmatically for batch training or inference workloads.
- Call serverless inference endpoints for LLM completions or other model serving.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python bindings to the Vast.ai API for searching GPU compute offers, managing instances, and accessing serverless inference endpoints.
Yes, but with a caveat: install this only if you have existing code that imports from vastai-sdk. For new projects, use the vastai package instead. The deprecation signals this wrapper exists for backward compatibility only, though the underlying vastai package is actively maintained.
Install
vastai-sdk on PyPI
pip
pip install vastai-sdkuv
uv add vastai-sdkpoetry
poetry add vastai-sdkInstalling vastai-sdk
Before you install
Low install friction with a pure-Python wheel. Active maintenance as of 2 days ago, though officially deprecated—users should install vastai instead.
Quickstart
pip install vastai-sdk
from vastai_sdk import VastAI
vast = VastAI(api_key="YOUR_API_KEY")
vast.search_offers(query='gpu_name=RTX_4090 num_gpus>=4')
Requires VAST_API_KEY environment variable or explicit api_key parameter; asyncio event loop required for serverless client methods.
Verify before relying
- Whether the deprecated status affects long-term support or stability guarantees.
- Whether asyncio is required for all serverless client operations or only for specific methods.
- Whether vastai provides identical functionality to vastai-sdk.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — vastai |
| Maintenance | actively maintained — 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,218,711/month — #2,696 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: vastai_sdk-1.5.4-py3-none-any.whl
Tags
More Distributed Computing packages
gRPC Python is an HTTP/2-based RPC framework…
permissive · top 100 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
cloudpickleCloudpickle extends Python's standard pickle…
permissive · top 1,000 on PyPI
smart-openProvides a unified, open()-compatible Python…
permissive · top 1,000 on PyPI
portalockerPortalocker provides cross-platform file…
permissive · top 1,000 on PyPI
rayRay is a distributed computing framework that…
permissive · top 1,000 on PyPI
vastaiProvides a CLI and Python SDK for managing GPU…
permissive · top 5,000 on PyPI
azure-ai-inferenceUnified client library for chat completions,…
permissive · top 5,000 on PyPI
runpodRunpod is a Python SDK and API client library…
permissive · top 5,000 on PyPI
mistralaiPython client SDK for the Mistral AI API,…
unclear · top 1,000 on PyPI
google-cloudA deprecated umbrella package that once…
permissive · top 5,000 on PyPI
modalModal is a Python client library that lets you…
permissive · top 1,000 on PyPI
py3nvmlProvides Python 3 bindings to query NVIDIA GPU…
permissive · top 15,000 on PyPI
abstract-hugpy-devA self-hosted LLM console and OpenAI-compatible…
unclear · top 15,000 on PyPI
lithopsLithops is a Python framework for running…
permissive · top 15,000 on PyPI
fastapi-cloud-cliA command-line tool for deploying and managing…
permissive · top 1,000 on PyPI