> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-docs-screenshot-updates.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> REST API for managing GPU instances, machines, templates, volumes, serverless endpoints, and billing on Vast.ai.

The Vast.ai REST API gives you programmatic control over the entire platform. It's the foundation that the [CLI](/cli/hello-world) and [SDK](/sdk/python/quickstart) are built on.

<Warning>
  The raw REST API is intended for advanced users only. Most users will have a better experience with the [CLI](/cli/hello-world) or [SDK](/sdk/python/quickstart), which handle authentication, retries, and request shape for you. Reach for the API directly when you need maximum flexibility, are integrating from a non-Python language, or are building tooling on top of Vast.
</Warning>

## Quickstart

New to the API? Start with the [API Hello World](/api-reference/hello-world), it walks through the full instance lifecycle (authenticate, search, rent, connect, clean up) using only `curl`.

## Reference sections

| Section                                                           | What's covered                                       |
| ----------------------------------------------------------------- | ---------------------------------------------------- |
| [Authentication](/api-reference/authentication)                   | Bearer-token auth, API key generation and management |
| [Permissions](/api-reference/permissions)                         | Scoped API keys, role-based access                   |
| [Rate limits & errors](/api-reference/rate-limits-and-errors)     | Per-endpoint limits, error codes, retry guidance     |
| [Creating instances](/api-reference/creating-instances-with-api)  | Search-and-rent flow, configuration options          |
| [Templates](/api-reference/creating-and-using-templates-with-api) | Template fields, creation, instance launch           |
| Endpoints                                                         | Full OpenAPI reference for every endpoint            |

## Base URL

```
https://console.vast.ai/api/v0
```

All endpoints require `Authorization: Bearer $VAST_API_KEY`. Get your key from the [Keys page](https://cloud.vast.ai/manage-keys/).
