---
title: "Create a cloud server"
description: "Quote, order and wait for a server in Istanbul or Europe — safely, without ever ordering twice."
url: https://www.gyrohosting.com/developers/en/howto/create-server.html
language: en
openapi: https://www.gyrohosting.com/developers/openapi.json
api_version: 2.30.0
---

# Create a cloud server

Quote, order and wait for a server in Istanbul or Europe — safely, without ever ordering twice.

You need an API key with the `cloud_order` scope and enough account balance. Every order is paid from the balance, never from a card.


## 1. Get a quote (nothing is created)

**curl**

```bash
curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/servers \
  -H "Authorization: Bearer $GYRO_TOKEN" -H "Content-Type: application/json" \
  -d '{"plan":"standart-2-4","region":"tr-ist-1","image":"ubuntu-24.04","hostname":"web-1","dry_run":true}'
```

**CLI**

```bash
gyro server create web-1 --plan standart-2-4 --region tr-ist-1 --image ubuntu-24.04 --dry-run
```


## 2. Order with confirm + Idempotency-Key

**curl**

```bash
curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/servers \
  -H "Authorization: Bearer $GYRO_TOKEN" -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"plan":"standart-2-4","region":"tr-ist-1","image":"ubuntu-24.04","hostname":"web-1","ssh_keys":[12],"confirm":true}'
```

**CLI**

```bash
gyro server create web-1 --plan standart-2-4 --region tr-ist-1 --image ubuntu-24.04 --ssh-key ~/.ssh/id_ed25519.pub --wait
```

**Terraform**

```hcl
resource "gyro_server" "web" {
  plan          = "standart-2-4"
  region        = "tr-ist-1"
  image         = "ubuntu-24.04"
  hostname      = "web-1"
  ssh_key_ids   = [12]
  confirm_order = true   # creating a server spends account balance
}
```

A network error? Send the same request with the **same** Idempotency-Key: you get the first answer back, never a second server.


## 3. Wait until it runs

**curl**

```bash
curl -s https://www.gyrohosting.com/api/v1/client/cloud/servers/12345 -H "Authorization: Bearer $GYRO_TOKEN"
# ready when data.status = "active" and data.live.power_state = "running"; poll every 5-10 s
```

**CLI**

```bash
gyro server get 12345 -o json --query 'live.power_state'
```

Plans: `GET /cloud/products` (`gyro plan list`). Regions: `GET /cloud/locations`. Images: `GET /cloud/images`. Several servers in one order: `"quantity": 3` (`--count 3`).
