---
title: "Creates an instance group in the project and returns the created instance group."
method: POST
path: "/projects/{project_id}/compute/instance-groups"
tags: ["Instance Groups"]
---

# Creates an instance group in the project and returns the created instance group.

`POST /projects/{project_id}/compute/instance-groups`

## Path parameters

- `project_id` string, required

## Request body

- InstanceGroupPostRequest
  - `desired_count` integer, required — Desired number of instances for the new instance group.
  - `name` string, required — Name for the new instance group.
  - `template_id` string, required — ID of the instance template to create the group's instances from.

## Response `200`

- InstanceGroup
  - `active_instances` string[], required — List of IDs of running instances in the instance group.
  - `created_at` string, required — Creation timestamp of the instance group, in RFC3339 format.
  - `desired_count` integer, required — Desired number of instances for the instance group.
  - `id` string, required — ID of the instance group.
  - `inactive_instances` string[], required — List of IDs of non-running instances in the instance group.
  - `instances` string[], required — [To be deprecated] List of IDs of running instances in the instance group.
  - `name` string, required — Name of the instance group.
  - `project_id` string, required — ID of the project that owns the instance group.
  - `running_instance_count` integer, required — Number of running instances currently in the instance group.
  - `state` string, required — Current state of the instance group.
  - `template_id` string, required — ID of the instance template currently associated with the instance group.
  - `updated_at` string, required — Last update timestamp of the instance group, in RFC3339 format.

## Other responses

- `400` — Error Bad Request
- `401` — Error Authentication Failed
- `500` — Error Internal Server

---

[API](https://skmtc.net/crusoecloud/apis/crusoe-cloud-api-gateway.md) · [All operations](https://skmtc.net/crusoecloud/apis/crusoe-cloud-api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/crusoecloud/crusoe-cloud-api-gateway/revisions/a3fd2dedc72b/schema)
