---
title: "create workergroup"
method: POST
path: "/api/v0/workergroups/"
tags: ["Serverless"]
---

# create workergroup

`POST /api/v0/workergroups/`

Creates a new workergroup configuration that manages worker instances for a serverless endpoint.

CLI Usage: `vastai create workergroup --template_hash <hash> --endpoint_name <name> [options]`

## Request body

- object
  - `endpoint_name` string — Name of the endpoint group
  - `endpoint_id` integer — ID of existing endpoint group (alternative to endpoint_name)
  - `template_hash` string — Hash ID of template to use for worker instances
  - `template_id` integer — ID of template (alternative to template_hash)
  - `search_params` string — Search query for finding worker instances (alternative to template)
  - `launch_args` string — Additional launch arguments for worker instances
  - `min_load` number — Minimum load threshold for scaling
  - `target_util` number — Target GPU utilization
  - `cold_mult` number — Cold start multiplier
  - `cold_workers` integer — Number of cold workers to maintain
  - `max_workers` integer — Maximum number of worker instances
  - `test_workers` integer — Number of test workers
  - `gpu_ram` integer — Minimum GPU RAM in GB

## Response `200`

Successfully created workergroup

- object
  - `success` boolean
  - `id` integer — ID of created autoscaling job

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `429` — Too Many Requests

---

[API](https://skmtc.net/vast/apis/vast-ai-api.md) · [All operations](https://skmtc.net/vast/apis/vast-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vast/vast-ai-api/versions/4ed14f79f796/schema)
