skillfed

vastai-sdk

DEPRECATED — use 'pip install vastai' instead. This package is a compatibility wrapper that installs vastai.

vastai-sdk v1.5.4 3.2M downloads/30d#2,696 on PyPI211
License unclear Active released

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-sdk

uv

uv add vastai-sdk

poetry

poetry add vastai-sdk

Installing 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

Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

Tags

vast.ai python sdkgpu compute marketplace apiserverless inference clientgpu instance managementgpu rental api wrapper
gpu-computecloud-api

More Distributed Computing packages