{
 "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/balance": {
   "get": {
    "operationId": "getPrepaidBalance",
    "tags": [
     "Billing"
    ],
    "summary": "Balance, hourly cost of running prepaid services and estimated time left",
    "x-gyro-cli": [
     "billing",
     "balance"
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {
           "$ref": "#/components/schemas/PrepaidBalance"
          }
         }
        }
       }
      }
     },
     "403": {
      "description": "insufficient_scope | subkey_forbidden"
     }
    },
    "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."
   }
  }
 },
 "components": {
  "schemas": {
   "PrepaidBalance": {
    "type": "object",
    "properties": {
     "balance": {
      "$ref": "#/components/schemas/Money"
     },
     "hourly_cost": {
      "$ref": "#/components/schemas/Money"
     },
     "daily_cost": {
      "$ref": "#/components/schemas/Money"
     },
     "upcoming_invoices_7d": {
      "$ref": "#/components/schemas/Money"
     },
     "hours_left": {
      "type": "number",
      "nullable": true
     },
     "runs_out_at": {
      "type": "string",
      "format": "date-time",
      "nullable": true
     },
     "level": {
      "type": "string",
      "enum": [
       "ok",
       "low",
       "critical"
      ]
     },
     "services": {
      "type": "object",
      "properties": {
       "active": {
        "type": "integer"
       },
       "suspended": {
        "type": "integer"
       },
       "deleted": {
        "type": "integer"
       }
      }
     },
     "suspended_hourly_cost": {
      "$ref": "#/components/schemas/Money"
     },
     "eur_rate": {
      "type": "number"
     },
     "computed_at": {
      "type": "string",
      "format": "date-time"
     },
     "topup_url": {
      "type": "string"
     },
     "note": {
      "type": "string"
     }
    }
   },
   "Money": {
    "type": "object",
    "properties": {
     "amount": {
      "type": "number"
     },
     "currency": {
      "type": [
       "string",
       "null"
      ],
      "example": "TRY"
     }
    }
   }
  }
 },
 "security": [
  {
   "bearerAuth": []
  }
 ]
}