{
 "openapi": "3.1.0",
 "info": {
  "title": "Gyro Public API",
  "version": "2.30.0",
  "summary": "Manage Gyro cloud servers, SSH keys and billing programmatically.",
  "x-summary-tr": "Gyro bulut sunucularınızı, SSH anahtarlarınızı ve faturalarınızı programla yönetin.",
  "contact": {
   "name": "Gyro Hosting",
   "url": "https://www.gyrohosting.com"
  },
  "license": {
   "name": "Proprietary",
   "identifier": "LicenseRef-Gyro-API-Terms"
  }
 },
 "servers": [
  {
   "url": "https://www.gyrohosting.com/api/v1/client",
   "description": "Production"
  }
 ],
 "paths": {
  "/cloud/containers": {
   "post": {
    "tags": [
     "Containers"
    ],
    "operationId": "createContainerEnvironments",
    "summary": "Create container environments (batch)",
    "x-summary-tr": "Kapsayıcı ortamı oluştur (toplu)",
    "x-scope": "cloud_order",
    "x-cli": {
     "command": "container create",
     "money": true
    },
    "description": "Orders 1..N environments of a plan in ONE order (`quantity`, default 1, max 25 per request). Prepaid: the order is 0 and usage is charged hourly from the balance; the balance must cover the first 24 hours of every environment and new accounts are limited in their first days. `name` (with `{n}`) and `tags` label every environment; `project_id` puts them in a project. Send `\"dry_run\": true` for a quote; a real order needs `\"confirm\": true` and an `Idempotency-Key` header.",
    "x-description-tr": "Bir paketten 1..N ortamı TEK siparişte açar (`quantity`, varsayılan 1, istek başına en çok 25). Ön ödemeli: sipariş 0'dır, kullanım saatlik bakiyeden düşer; bakiye her ortamın ilk 24 saatini karşılamalıdır, yeni hesaplar ilk günlerde sınırlıdır. `name` (`{n}` ile) ve `tags` her ortamı adlandırır; `project_id` projeye koyar. Teklif için `\"dry_run\": true`; gerçek sipariş `\"confirm\": true` ve `Idempotency-Key` başlığı ister.",
    "parameters": [
     {
      "$ref": "#/components/parameters/IdempotencyKey"
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "plan": {
          "type": "string",
          "example": "mini-1-1",
          "description": "plan from GET /cloud/containers/plans (mini-1-1, small-1-2, starter, standart, pro, serverless)",
          "x-description-tr": "GET /cloud/containers/plans paketi"
         },
         "product_id": {
          "type": "integer",
          "description": "product id instead of plan",
          "x-description-tr": "plan yerine ürün kimliği"
         },
         "quantity": {
          "type": "integer",
          "minimum": 1,
          "default": 1,
          "description": "environments to create in one order (--count), default 1, max 25",
          "x-description-tr": "tek siparişte açılacak ortam (--count), varsayılan 1, en çok 25"
         },
         "name": {
          "type": "string",
          "maxLength": 60,
          "example": "gyro-ecs-{n}",
          "description": "name (nickname); {n} = number in a batch",
          "x-description-tr": "ad (takma ad); toplu oluşturmada {n} = sıra no"
         },
         "tags": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "maxItems": 10,
          "description": "tags (max 10)",
          "x-description-tr": "etiketler (en çok 10)"
         },
         "project_id": {
          "type": [
           "integer",
           "null"
          ],
          "description": "project (0 = default project)",
          "x-description-tr": "proje (0 = Genel)"
         },
         "confirm": {
          "type": "boolean"
         },
         "dry_run": {
          "type": "boolean"
         }
        }
       },
       "example": {
        "plan": "mini-1-1",
        "quantity": 3,
        "name": "gyro-ecs-{n}",
        "tags": [
         "gyro-test"
        ],
        "confirm": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Dry-run quote"
     },
     "202": {
      "description": "Ordered; environments are being set up",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "type": "object",
           "properties": {
            "environments": {
             "type": "array",
             "items": {
              "type": "object"
             }
            },
            "quantity": {
             "type": "integer"
            },
            "plan": {
             "type": "string"
            },
            "order": {
             "type": "object"
            },
            "payment": {
             "type": [
              "object",
              "null"
             ]
            },
            "invoice": {
             "type": [
              "object",
              "null"
             ]
            }
           }
          }
         }
        }
       }
      }
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "422": {
      "description": "confirm_required | limit_exceeded (new-account limit of the prepaid cloud; details = LimitHint, raise it with a support ticket) | validation errors",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Error": {
    "type": "object",
    "required": [
     "error"
    ],
    "properties": {
     "error": {
      "type": "object",
      "required": [
       "code",
       "message"
      ],
      "properties": {
       "code": {
        "type": "string",
        "example": "server_not_found"
       },
       "message": {
        "type": "string"
       },
       "details": {
        "type": "object",
        "additionalProperties": true,
        "description": "Extra data. Limit refusals add the LimitHint fields (`limit_exceeded: true`, `limit_key`, `limit`, `current`, `how_to_increase`, `support_ticket`, `hint`): account limits are raised with a support ticket. Validation errors (length, format) never carry the limit hint.",
        "x-description-tr": "Ek veri. Sınır retlerinde LimitHint alanları gelir: hesap sınırları destek talebiyle artırılır. Doğrulama hataları (uzunluk, biçim) sınır ipucu taşımaz."
       }
      }
     }
    }
   }
  },
  "responses": {
   "Forbidden": {
    "description": "Key lacks the scope, IP not allowed, or feature disabled",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   }
  },
  "parameters": {
   "IdempotencyKey": {
    "name": "Idempotency-Key",
    "in": "header",
    "required": true,
    "schema": {
     "type": "string",
     "minLength": 8,
     "maxLength": 191
    },
    "description": "Unique per logical request (e.g. a UUID). Replays within 24 hours return the stored answer."
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}