Vast.ai API

Introduction

4min

Welcome to the vast.ai API documentation. Our API allows you to programmatically manage GPU instances, handle machine operations, and automate your AI/ML workflow. Whether you're running individual GPU instances or managing a fleet of machines, our API provides comprehensive control over all our platform features.

What You Can Do

With the our API, you can:

  • Manage GPU instances (create, monitor, stop, and destroy)
  • Handle SSH key operations and remote command execution
  • Control machine configurations and bidding
  • Manage team access and permissions
  • Search and filter available GPU offers
  • Monitor billing and instance usage
  • Scale operations with our autoscaler functionality

Getting Started

To use the API, you'll need:

  1. A vast.ai account
  2. An API key (generate this from your account settings)

Our API uses REST conventions with JSON payloads. Authentication is handled via API keys that should be included in your request headers.

Key Sections

  • Instances: Manage individual GPU instances and their configurations
  • Machines: Control machine settings and availability
  • Accounts: Handle user and subaccount management
  • Autoscaler: Automate scaling of GPU resources
  • Team: Manage team access and roles
  • Search: Find and filter available GPU offerings
  • Billing: Monitor costs and handle payments

Examples



Updated 07 Jan 2025
Did this page help you?