The Vast.ai REST API gives you full control
Programmatically search offers, create instances, manage resources, track billing, and build custom automation around the Vast.ai platform.

Our REST API architecture
A simple request path makes the API predictable: your code sends a request, the API validates it, and the platform changes the requested resource.
Step 1
Your tooling
Scripts, services, CI jobs, notebooks, or internal dashboards send authenticated HTTPS requests.
Step 2
Vast.ai REST API
The API checks your key, validates the request, and routes the operation to the right platform service.
Step 3
GPU cloud resources
Offers, instances, templates, billing, keys, volumes, and serverless resources update through one API surface.
Quick example API call
Use a bearer token to make authenticated requests from any HTTP client.
# Search for available H100s
curl -s -H "Authorization: Bearer $VAST_API_KEY" \
"https://cloud.vast.ai/api/v0/bundles/?q=%7B%22gpu_name%22%3A%22H100_SXM%22%7D" \
| jq '.offers[:3] | .[] | {id, gpu_name, num_gpus, dph_total}'An endpoint for any operation
Key endpoints cover the common workflow: search capacity, create compute, manage running instances, and inspect account resources.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v0/bundles/ | Search available GPU offers |
| PUT | /api/v0/asks/{id}/ | Create instance from offer |
| GET | /api/v0/instances/ | List your instances |
| PUT | /api/v0/instances/{id}/ | Update instance |
| DELETE | /api/v0/instances/{id}/ | Destroy instance |
| GET | /api/v0/auth/apikeys/ | List API keys for your account |
Using your API key
All requests require an API key. Pass it as a Bearer token in the Authorization header or as a query parameter.
# Bearer token (recommended)
curl -H "Authorization: Bearer YOUR_API_KEY" https://cloud.vast.ai/api/v0/instances/
# Query parameter
curl "https://cloud.vast.ai/api/v0/instances/?api_key=YOUR_API_KEY"Got questions? We've got answers.
Visit our frequently asked questions for comprehensive answers to questions about the Vast.ai platform.
Explore the full API
Complete endpoint reference with request/response examples.