{
 "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/billing/estimate": {
   "post": {
    "operationId": "estimatePrepaidCost",
    "tags": [
     "Billing"
    ],
    "summary": "Hourly / daily / monthly cost of prepaid plans and serverless containers, and how long the balance lasts",
    "x-gyro-cli": [
     "billing",
     "estimate"
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "items": {
          "type": "array",
          "maxItems": 50,
          "items": {
           "type": "object",
           "properties": {
            "plan": {
             "type": "string",
             "example": "standart-2-4"
            },
            "product_id": {
             "type": "integer"
            },
            "region": {
             "type": "string",
             "example": "tr-ist-1",
             "description": "prepaid is tr-ist-1 only"
            },
            "count": {
             "type": "integer",
             "default": 1,
             "maximum": 100
            },
            "type": {
             "type": "string",
             "enum": [
              "serverless"
             ],
             "description": "serverless = a Gyro Containers Serverless container copy (send cpu_m + memory_mi instead of plan)"
            },
            "cpu_m": {
             "type": "integer",
             "enum": [
              250,
              500,
              1000,
              2000,
              4000
             ],
             "description": "serverless: CPU per copy in millicores"
            },
            "memory_mi": {
             "type": "integer",
             "example": 512,
             "description": "serverless: memory per copy in MiB (allowed values per cpu_m: GET /cloud/billing/container-sizes)"
            },
            "hours": {
             "type": "integer",
             "minimum": 1,
             "maximum": 744,
             "default": 730,
             "description": "serverless: running hours for `total` (default 730 = a full month; no monthly cap)"
            }
           }
          }
         },
         "plan": {
          "type": "string",
          "description": "single-item shortcut"
         },
         "count": {
          "type": "integer"
         },
         "cpu_m": {
          "type": "integer",
          "description": "serverless single-item shortcut"
         },
         "memory_mi": {
          "type": "integer"
         },
         "hours": {
          "type": "integer"
         },
         "type": {
          "type": "string",
          "enum": [
           "serverless"
          ]
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "items[], hourly, daily, monthly_cap, eur_rate, balance, hours_covered, order_requires (first 24 h), can_order"
     },
     "422": {
      "description": "unknown_plan | region_not_prepaid | too_many_items | invalid_cpu | invalid_memory | serverless_not_available"
     }
    },
    "x-scope": "billing_read",
    "x-provided-by": "GyroKredi",
    "description": "Prepaid (hourly, from the account balance) services: Gyro Containers (ECS) and Gyro Cloud Istanbul (tr-ist-1). Times are Europe/Istanbul. Usage is never invoiced: invoices are issued for balance top-ups. Server and dedicated-node plans: hourly = monthly / 672, capped at the monthly price (`capped: true`). Serverless containers (`{\"type\": \"serverless\", \"cpu_m\": 250, \"memory_mi\": 512, \"count\": 2, \"hours\": 730}`): charged by measured use with no monthly cap (`capped: false`), `monthly_cap` = a full month (730 hours) of running time, `total` = `hours` x hourly (`billed_hours` = `hours`). Errors 422: `unknown_plan`, `region_not_prepaid`, `too_many_items`, `invalid_cpu`, `invalid_memory`, `serverless_not_available`.",
    "x-description-tr": " Sunucu ve ayrılmış düğüm planları: saatlik = aylık / 672, aylık fiyatla sınırlı (`capped: true`). Sunucusuz kapsayıcı (`type: serverless`, `cpu_m`, `memory_mi`, `count`, `hours`): ölçülen kullanıma göre, aylık tavan yok (`capped: false`), `monthly_cap` = tam ay (730 saat) çalışma, `total` = `hours` x saatlik (`billed_hours` = `hours`)."
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}