{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gpucloud-ca/json-schema/gpucloud-ca-reservation-schema.json",
  "title": "Reservation",
  "description": "A GPU reservation: GPU Cloud launches the server automatically as soon as the machine is back in stock (first come, first served per machine).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gpucloud-ca-openapi.json#/components/schemas/Reservation",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "productId": {
      "type": "string",
      "description": "Exact machine reserved (model and size)."
    },
    "productName": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "PROCESSING",
        "FULFILLED",
        "PAYMENT_FAILED",
        "EXPIRED",
        "CANCELLED"
      ]
    },
    "maxHourlyCad": {
      "type": "number",
      "description": "Highest hourly price accepted (CAD). Above it at launch time, the reservation waits."
    },
    "acceptAlternative": {
      "type": "boolean"
    },
    "templateId": {
      "type": [
        "string",
        "null"
      ]
    },
    "templateModel": {
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "queuePosition": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Place in the queue of this machine (1 = next) while waiting."
    },
    "waitingReason": {
      "type": [
        "string",
        "null"
      ],
      "description": "PRICE_ABOVE_MAX, BUDGET_LIMIT_REACHED, KEY_CAP_REACHED, SETUP_REQUIRED or SSH_KEY_MISSING while it waits for that reason."
    },
    "cancelRequested": {
      "type": "boolean"
    },
    "serverId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Server launched for it (FULFILLED)."
    },
    "fulfilledProductId": {
      "type": [
        "string",
        "null"
      ]
    },
    "fulfilledAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "source": {
      "type": "string",
      "enum": [
        "console",
        "api",
        "mcp"
      ]
    },
    "onFundsExhausted": {
      "type": "string",
      "enum": [
        "HIBERNATE",
        "DELETE"
      ],
      "description": "Action at the threshold of the server this reservation launches."
    }
  }
}