v1

latestOpenAPI 3.1.02026-07-13897404.3 KB
Search

search templates

Searches for templates using filter-based queries.

Use select_filters to search by specific field conditions. Results include both your own templates and publicly shared templates.

Available filter fields: creator_id, created_at, count_created, default_tag, docker_login_repo, id, image, jup_direct, hash_id, name, recent_create_date, recommended_disk_space, recommended, ssh_direct, tag, use_ssh

Operators: eq, neq, lt, lte, gt, gte, in, notin

For detailed usage, see Creating and Using Templates with API.

CLI Usage: vastai search templates

get/api/v0/template/

Query parameters

select_filtersstring

JSON-encoded filter object. Format: {"field": {"op": value}}. Example: {"use_ssh": {"eq": true}, "recommended": {"eq": true}} or {"count_created": {"gt": 100}}

select_colsstring

JSON-encoded array of columns to return. Example: ["*"] for all columns or ["id", "name", "hash_id"] for specific columns.

order_bystring

Column to order the results by.

Response

Successfully retrieved templates

successboolean required
templates_foundinteger required

Number of templates found.

Example response

{
  "success": true,
  "templates_found": 5
}