{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/runcrate/main/json-schema/runcrate-instance-schema.json",
  "title": "Instance",
  "x-generated": "2026-10-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/runcrate-api-openapi.json#/components/schemas/Instance",
  "type": "object",
  "required": [
    "id",
    "name",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "running",
        "starting",
        "deploying",
        "error",
        "terminated"
      ],
      "description": "Public lifecycle status. `starting` covers initial provisioning queue; `deploying` is the active boot phase; `running` means SSH-reachable; `error` is unrecoverable failure; `terminated` is post-delete."
    },
    "gpu_type": {
      "type": [
        "string",
        "null"
      ],
      "description": "GPU model id (e.g. `h100-sxm`)."
    },
    "gpu_count": {
      "type": [
        "integer",
        "null"
      ]
    },
    "cpu_cores": {
      "type": [
        "integer",
        "null"
      ]
    },
    "memory": {
      "type": [
        "integer",
        "null"
      ],
      "description": "GB"
    },
    "storage": {
      "type": [
        "integer",
        "null"
      ],
      "description": "GB"
    },
    "region": {
      "type": [
        "string",
        "null"
      ]
    },
    "ip": {
      "type": [
        "string",
        "null"
      ],
      "description": "Public IP / SSH host once status=running."
    },
    "os_image": {
      "type": [
        "string",
        "null"
      ]
    },
    "cost_per_hour": {
      "type": [
        "number",
        "null"
      ]
    },
    "deployed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}