{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "Panes API",
    "version": "2026-11-15",
    "description": "Windows computers for AI agents, operated by Renaissance Superintelligence Corporation. Prepay before compute. Check catalog readiness before buying credit for an Office task. Public customer routes only; internal host/operator/webhook interfaces are not customer tools.",
    "contact": {
      "name": "Panes support",
      "email": "support@usepanes.com",
      "url": "https://usepanes.com/support"
    }
  },
  "servers": [
    {
      "url": "https://api.usepanes.com"
    }
  ],
  "security": [
    {
      "ApiKey": []
    }
  ],
  "tags": [
    {
      "name": "Discovery"
    },
    {
      "name": "Accounts"
    },
    {
      "name": "Funding"
    },
    {
      "name": "Computers"
    },
    {
      "name": "Commands"
    },
    {
      "name": "Files"
    },
    {
      "name": "Desktop"
    },
    {
      "name": "Snapshots"
    },
    {
      "name": "Templates"
    },
    {
      "name": "Usage"
    },
    {
      "name": "Dashboard"
    }
  ],
  "paths": {
    "/v1/health": {
      "get": {
        "operationId": "get_v1_health",
        "summary": "Control-plane health",
        "tags": [
          "Discovery"
        ],
        "description": "Control-plane health",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                },
                "example": {
                  "ok": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": []
      }
    },
    "/v1/catalog": {
      "get": {
        "operationId": "get_v1_catalog",
        "summary": "Public prices, payment methods and template readiness",
        "tags": [
          "Discovery"
        ],
        "description": "Public prices, payment methods and template readiness",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "string"
                    },
                    "operator": {
                      "type": "string"
                    },
                    "templates": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Template"
                      }
                    },
                    "prices": {
                      "$ref": "#/components/schemas/Prices"
                    },
                    "payment_methods": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "signup_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "docs_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "openapi_url": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                },
                "example": {
                  "product": "Panes",
                  "operator": "Renaissance Superintelligence Corporation",
                  "templates": [
                    {
                      "id": "windows-16gb",
                      "name": "windows-16gb",
                      "private": false,
                      "vcpus": 4,
                      "memory_mb": 16384,
                      "hourly_usd": 0.75,
                      "apps": [
                        "powershell",
                        "edge",
                        "excel",
                        "word",
                        "powerpoint"
                      ],
                      "office_ready": false,
                      "office_status": "sign_in_required"
                    }
                  ],
                  "prices": {
                    "stopped_machine_hour": 0.002,
                    "machine_4gb_hour": 0.33,
                    "machine_8gb_hour": 0.4,
                    "machine_16gb_hour": 0.75,
                    "backup_gb_month": 0.018,
                    "backup_copy_gb": 0.00035,
                    "backup_restore_gb": 0.0003
                  },
                  "payment_methods": [
                    "stripe_mpp",
                    "usdc_x402",
                    "checkout"
                  ],
                  "signup_url": "https://api.usepanes.com/v1/signup",
                  "docs_url": "https://usepanes.com/docs.md",
                  "openapi_url": "https://usepanes.com/openapi.json"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": []
      }
    },
    "/v1/payment-methods": {
      "get": {
        "operationId": "get_v1_payment_methods",
        "summary": "Available prepayment methods and amount bounds",
        "tags": [
          "Discovery"
        ],
        "description": "Available prepayment methods and amount bounds",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "currency": {
                      "type": "string"
                    },
                    "minimum_cents": {
                      "type": "integer"
                    },
                    "maximum_cents": {
                      "type": "integer"
                    },
                    "methods": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "docs_url": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                },
                "example": {
                  "currency": "usd",
                  "minimum_cents": 1000,
                  "maximum_cents": 1000000,
                  "methods": [
                    "stripe_mpp",
                    "usdc_x402",
                    "checkout"
                  ],
                  "docs_url": "https://usepanes.com/docs#funding"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": []
      }
    },
    "/v1/signup": {
      "post": {
        "operationId": "post_v1_signup",
        "summary": "Send an email sign-in code",
        "tags": [
          "Accounts"
        ],
        "description": "Creates an account or recovers access through an API-readable inbox. Codes expire in 10 minutes, with five attempts. The provider code is never returned. Limit: three requests per address, replenishing one per minute.",
        "responses": {
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "challenge_id": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "next_action": {
                      "type": "string"
                    },
                    "verify_url": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "required": [
                    "challenge_id",
                    "expires_at",
                    "next_action",
                    "verify_url"
                  ]
                },
                "example": {
                  "challenge_id": "signup_example",
                  "expires_at": "2026-11-15T12:10:00Z",
                  "next_action": "read_email_code",
                  "verify_url": "https://api.usepanes.com/v1/signup/verify"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "key_name": {
                    "type": "string",
                    "maxLength": 60
                  }
                },
                "required": [
                  "email"
                ]
              },
              "example": {
                "email": "agent@example.com",
                "key_name": "Office agent"
              }
            }
          }
        }
      }
    },
    "/v1/signup/verify": {
      "post": {
        "operationId": "post_v1_signup_verify",
        "summary": "Verify email code and issue an account key",
        "tags": [
          "Accounts"
        ],
        "description": "Consumes one email code. Only an active single-organization administrator may recover an account key. The key is shown once; a lost reply requires another email challenge. No free credit.",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "info": {
                      "$ref": "#/components/schemas/Key"
                    },
                    "org": {
                      "type": "string"
                    },
                    "balance_usd": {
                      "type": "number"
                    },
                    "next_action": {
                      "type": "string"
                    },
                    "account_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "topups_url": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "required": [
                    "key",
                    "info",
                    "org",
                    "balance_usd",
                    "next_action",
                    "account_url",
                    "topups_url"
                  ]
                },
                "example": {
                  "key": "pk_EXAMPLE_STORE_IN_SECRET_MANAGER",
                  "info": {
                    "id": "key_example",
                    "name": "Agent",
                    "hint": "abcd",
                    "created": "2026-11-15T12:00:00Z"
                  },
                  "org": "org_example",
                  "balance_usd": 0,
                  "next_action": "prepay",
                  "account_url": "https://api.usepanes.com/v1/account",
                  "topups_url": "https://api.usepanes.com/v1/topups"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "challenge_id": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^[0-9]{6}$"
                  }
                },
                "required": [
                  "challenge_id",
                  "code"
                ]
              },
              "example": {
                "challenge_id": "signup_example",
                "code": "123456"
              }
            }
          }
        }
      }
    },
    "/v1/account": {
      "get": {
        "operationId": "get_v1_account",
        "summary": "Balance, prices, counts and limits",
        "tags": [
          "Accounts"
        ],
        "description": "Balance, prices, counts and limits",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                },
                "example": {
                  "org": "org_example",
                  "name": "agent@example.com",
                  "balance_usd": 10,
                  "running": 0,
                  "max_running": 1000000,
                  "prices": {
                    "stopped_machine_hour": 0.002,
                    "machine_4gb_hour": 0.33,
                    "machine_8gb_hour": 0.4,
                    "machine_16gb_hour": 0.75,
                    "backup_gb_month": 0.018,
                    "backup_copy_gb": 0.00035,
                    "backup_restore_gb": 0.0003
                  },
                  "machines": 0,
                  "max_machines": 1000000,
                  "snapshots": 0,
                  "max_snapshots": 1000000,
                  "templates": 0,
                  "max_templates": 1000000,
                  "admission_runway_minutes": 15,
                  "limits_mode": "prepaid_and_capacity",
                  "topups_url": "https://api.usepanes.com/v1/topups",
                  "payment_methods": [
                    "stripe_mpp",
                    "usdc_x402",
                    "checkout"
                  ],
                  "limits_rise_on_first_payment": false,
                  "support_email": "support@usepanes.com",
                  "auto_stop_minutes": 15,
                  "billing_required": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        }
      }
    },
    "/v1/account/keys": {
      "get": {
        "operationId": "get_v1_account_keys",
        "summary": "List API keys",
        "tags": [
          "Accounts"
        ],
        "description": "List API keys",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Key"
                  }
                },
                "example": [
                  {
                    "id": "key_example",
                    "name": "Agent",
                    "hint": "abcd",
                    "created": "2026-11-15T12:00:00Z"
                  }
                ]
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        }
      },
      "post": {
        "operationId": "post_v1_account_keys",
        "summary": "Issue an API key",
        "tags": [
          "Accounts"
        ],
        "description": "Returns key plaintext once. Store it securely.",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewKey"
                },
                "example": {
                  "key": "pk_EXAMPLE_STORE_IN_SECRET_MANAGER",
                  "info": {
                    "id": "key_example",
                    "name": "Agent",
                    "hint": "abcd",
                    "created": "2026-11-15T12:00:00Z"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  }
                },
                "required": [
                  "name"
                ]
              },
              "example": {
                "name": "worker"
              }
            }
          }
        }
      }
    },
    "/v1/account/keys/{id}": {
      "delete": {
        "operationId": "delete_v1_account_keys_id",
        "summary": "Revoke an API key",
        "tags": [
          "Accounts"
        ],
        "description": "Revoke an API key",
        "responses": {
          "204": {
            "description": "Success; empty body"
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "key_example"
          }
        ]
      }
    },
    "/v1/keys": {
      "get": {
        "operationId": "get_v1_keys",
        "summary": "List API keys",
        "tags": [
          "Dashboard"
        ],
        "description": "List API keys Dashboard only. API keys cannot authenticate this route.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Key"
                  }
                },
                "example": [
                  {
                    "id": "key_example",
                    "name": "Agent",
                    "hint": "abcd",
                    "created": "2026-11-15T12:00:00Z"
                  }
                ]
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": [
          {
            "Session": []
          }
        ],
        "x-browser-only": true
      },
      "post": {
        "operationId": "post_v1_keys",
        "summary": "Issue an API key",
        "tags": [
          "Dashboard"
        ],
        "description": "Returns key plaintext once. Store it securely. Dashboard only. API keys cannot authenticate this route.",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewKey"
                },
                "example": {
                  "key": "pk_EXAMPLE_STORE_IN_SECRET_MANAGER",
                  "info": {
                    "id": "key_example",
                    "name": "Agent",
                    "hint": "abcd",
                    "created": "2026-11-15T12:00:00Z"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": [
          {
            "Session": []
          }
        ],
        "x-browser-only": true,
        "parameters": [
          {
            "name": "X-Panes-Csrf",
            "in": "header",
            "required": true,
            "schema": {
              "const": "1"
            },
            "example": "1"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  }
                },
                "required": [
                  "name"
                ]
              },
              "example": {
                "name": "worker"
              }
            }
          }
        }
      }
    },
    "/v1/keys/{id}": {
      "delete": {
        "operationId": "delete_v1_keys_id",
        "summary": "Revoke an API key",
        "tags": [
          "Dashboard"
        ],
        "description": "Revoke an API key Dashboard only. API keys cannot authenticate this route.",
        "responses": {
          "204": {
            "description": "Success; empty body"
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": [
          {
            "Session": []
          }
        ],
        "x-browser-only": true,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "key_example"
          },
          {
            "name": "X-Panes-Csrf",
            "in": "header",
            "required": true,
            "schema": {
              "const": "1"
            },
            "example": "1"
          }
        ]
      }
    },
    "/v1/topups": {
      "post": {
        "operationId": "post_v1_topups",
        "summary": "Create or retrieve an immutable prepaid quote",
        "tags": [
          "Funding"
        ],
        "description": "Reusing a key returns the original quote (HTTP 200); a changed amount/method returns 409. Quote expires in 30 minutes. No charge until authorized. Check /v1/payment-methods before choosing a method.",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Topup"
                },
                "example": {
                  "id": "top_agent_example",
                  "amount_cents": 1000,
                  "currency": "usd",
                  "method": "stripe_mpp",
                  "status": "quoted",
                  "expires_at": "2026-11-15T12:30:00Z",
                  "refunded_cents": 0,
                  "status_url": "https://api.usepanes.com/v1/topups/top_agent_example",
                  "pay_url": "https://api.usepanes.com/v1/topups/top_agent_example/pay",
                  "balance_usd": 0,
                  "next_action": "authorize_payment",
                  "payment": {
                    "id": "challenge_example",
                    "realm": "api.usepanes.com",
                    "method": "stripe",
                    "intent": "charge",
                    "request": {
                      "amount": "1000",
                      "currency": "usd",
                      "externalId": "top_agent_example",
                      "methodDetails": {
                        "networkId": "profile_example",
                        "paymentMethodTypes": [
                          "card"
                        ]
                      }
                    },
                    "expires": "2026-11-15T12:30:00Z",
                    "opaque": "eyJ0b3B1cCI6InRvcF9hZ2VudF9leGFtcGxlIn0",
                    "header": "Payment-Authorization",
                    "description": "Panes prepaid credit"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Topup"
                },
                "example": {
                  "id": "top_agent_example",
                  "amount_cents": 1000,
                  "currency": "usd",
                  "method": "stripe_mpp",
                  "status": "quoted",
                  "expires_at": "2026-11-15T12:30:00Z",
                  "refunded_cents": 0,
                  "status_url": "https://api.usepanes.com/v1/topups/top_agent_example",
                  "pay_url": "https://api.usepanes.com/v1/topups/top_agent_example/pay",
                  "balance_usd": 0,
                  "next_action": "authorize_payment",
                  "payment": {
                    "id": "challenge_example",
                    "realm": "api.usepanes.com",
                    "method": "stripe",
                    "intent": "charge",
                    "request": {
                      "amount": "1000",
                      "currency": "usd",
                      "externalId": "top_agent_example",
                      "methodDetails": {
                        "networkId": "profile_example",
                        "paymentMethodTypes": [
                          "card"
                        ]
                      }
                    },
                    "expires": "2026-11-15T12:30:00Z",
                    "opaque": "eyJ0b3B1cCI6InRvcF9hZ2VudF9leGFtcGxlIn0",
                    "header": "Payment-Authorization",
                    "description": "Panes prepaid credit"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            },
            "example": "office-credit-20261115-01"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount_cents": {
                    "type": "integer",
                    "minimum": 1000,
                    "maximum": 1000000
                  },
                  "method": {
                    "enum": [
                      "stripe_mpp",
                      "usdc_x402",
                      "checkout"
                    ]
                  }
                },
                "required": [
                  "amount_cents",
                  "method"
                ]
              },
              "example": {
                "amount_cents": 1000,
                "method": "stripe_mpp"
              }
            }
          }
        }
      }
    },
    "/v1/topups/{id}": {
      "get": {
        "operationId": "get_v1_topups_id",
        "summary": "Read and reconcile payment status",
        "tags": [
          "Funding"
        ],
        "description": "Resumes the stored payment when pending. Paid credit is granted exactly once. Do not submit a new payment after a lost response; poll this URL. pending recommends three seconds between reads.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Topup"
                },
                "example": {
                  "id": "top_agent_example",
                  "amount_cents": 1000,
                  "currency": "usd",
                  "method": "stripe_mpp",
                  "status": "paid",
                  "expires_at": "2026-11-15T12:30:00Z",
                  "refunded_cents": 0,
                  "status_url": "https://api.usepanes.com/v1/topups/top_agent_example",
                  "pay_url": "https://api.usepanes.com/v1/topups/top_agent_example/pay",
                  "balance_usd": 10,
                  "payment_intent": "pi_example"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "top_agent_example"
          }
        ]
      }
    },
    "/v1/topups/{id}/pay": {
      "post": {
        "operationId": "post_v1_topups_id_pay",
        "summary": "Authorize one prepaid quote",
        "tags": [
          "Funding"
        ],
        "description": "Use one payment header and keep Authorization for the Panes key. Missing payment returns 402 with WWW-Authenticate (MPP) or PAYMENT-REQUIRED (x402) and payment in the JSON body. Stripe SPT payload is {spt,externalId}; x402 v2 payload includes resource, accepted requirements, signature and EIP-3009 authorization. The exact issued quote must match. A pending or uncertain payment must be polled, never repaid. Checkout returns a browser URL.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Topup"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "checkout_url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "browser_required": {
                          "type": "boolean"
                        },
                        "status_url": {
                          "type": "string",
                          "format": "uri"
                        }
                      },
                      "required": [
                        "id",
                        "status",
                        "checkout_url",
                        "browser_required",
                        "status_url"
                      ]
                    }
                  ]
                },
                "example": {
                  "id": "top_agent_example",
                  "amount_cents": 1000,
                  "currency": "usd",
                  "method": "stripe_mpp",
                  "status": "paid",
                  "expires_at": "2026-11-15T12:30:00Z",
                  "refunded_cents": 0,
                  "status_url": "https://api.usepanes.com/v1/topups/top_agent_example",
                  "pay_url": "https://api.usepanes.com/v1/topups/top_agent_example/pay",
                  "balance_usd": 10,
                  "payment_intent": "pi_example"
                }
              }
            },
            "headers": {
              "Payment-Receipt": {
                "schema": {
                  "type": "string"
                },
                "description": "Protocol receipt after verified settlement."
              },
              "PAYMENT-RESPONSE": {
                "schema": {
                  "type": "string"
                },
                "description": "Protocol receipt after verified settlement."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "description": "Authorize the quote using the advertised protocol.",
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string"
                },
                "description": "MPP Payment challenge; send credential in Payment-Authorization."
              },
              "PAYMENT-REQUIRED": {
                "schema": {
                  "type": "string"
                },
                "description": "Base64-encoded x402 v2 requirements."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Topup"
                },
                "example": {
                  "id": "top_agent_example",
                  "amount_cents": 1000,
                  "currency": "usd",
                  "method": "stripe_mpp",
                  "status": "quoted",
                  "expires_at": "2026-11-15T12:30:00Z",
                  "refunded_cents": 0,
                  "status_url": "https://api.usepanes.com/v1/topups/top_agent_example",
                  "pay_url": "https://api.usepanes.com/v1/topups/top_agent_example/pay",
                  "balance_usd": 0,
                  "next_action": "authorize_payment",
                  "payment": {
                    "id": "challenge_example",
                    "realm": "api.usepanes.com",
                    "method": "stripe",
                    "intent": "charge",
                    "request": {
                      "amount": "1000",
                      "currency": "usd",
                      "externalId": "top_agent_example",
                      "methodDetails": {
                        "networkId": "profile_example",
                        "paymentMethodTypes": [
                          "card"
                        ]
                      }
                    },
                    "expires": "2026-11-15T12:30:00Z",
                    "opaque": "eyJ0b3B1cCI6InRvcF9hZ2VudF9leGFtcGxlIn0",
                    "header": "Payment-Authorization",
                    "description": "Panes prepaid credit"
                  }
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          },
          "202": {
            "description": "Pending or requires reconciliation; do not pay again.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "status_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "next_action": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "status_url",
                    "next_action"
                  ]
                },
                "example": {
                  "id": "top_agent_example",
                  "status": "pending",
                  "status_url": "https://api.usepanes.com/v1/topups/top_agent_example",
                  "next_action": "poll_status_do_not_pay_again"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "top_agent_example"
          },
          {
            "name": "Payment-Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Payment BASE64URL_MPP_CREDENTIAL"
          },
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "BASE64_X402_PAYMENT_PAYLOAD"
          }
        ]
      }
    },
    "/v1/machines": {
      "post": {
        "operationId": "post_v1_machines",
        "summary": "Start a computer from a template",
        "tags": [
          "Computers"
        ],
        "description": "Persist a unique Idempotency-Key and exact body before calling. require_office_ready rejects an unverified template before provisioning. Creation needs 15 minutes of resulting aggregate running credit and capacity. prevent_cloning protects the new identity.",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Machine"
                },
                "example": {
                  "id": "m_example",
                  "name": "office-report",
                  "template": "windows-16gb",
                  "state": "running",
                  "vcpus": 4,
                  "memory_mb": 16384,
                  "created": "2026-11-15T12:00:00Z",
                  "updated": "2026-11-15T12:00:00Z",
                  "auto_stop_minutes": 15,
                  "prevent_cloning": true,
                  "require_dedicated": false,
                  "stopped_hourly_usd": 0,
                  "timings_ms": {
                    "total": 60000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 128
            },
            "example": "office-computer-20261115-01"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "template": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 128
                  },
                  "auto_stop_minutes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10080,
                    "default": 15
                  },
                  "prevent_cloning": {
                    "type": "boolean"
                  },
                  "require_dedicated": {
                    "type": "boolean"
                  },
                  "require_office_ready": {
                    "type": "boolean"
                  },
                  "max_stopped_hourly_usd": {
                    "type": "number",
                    "minimum": 0
                  }
                },
                "required": [
                  "template"
                ]
              },
              "example": {
                "template": "windows-16gb",
                "name": "office-report",
                "auto_stop_minutes": 15,
                "prevent_cloning": true,
                "require_office_ready": true
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_v1_machines",
        "summary": "List kept computers",
        "tags": [
          "Computers"
        ],
        "description": "List kept computers",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Machine"
                  }
                },
                "example": [
                  {
                    "id": "m_example",
                    "name": "office-report",
                    "template": "windows-16gb",
                    "state": "running",
                    "vcpus": 4,
                    "memory_mb": 16384,
                    "created": "2026-11-15T12:00:00Z",
                    "updated": "2026-11-15T12:00:00Z",
                    "auto_stop_minutes": 15,
                    "prevent_cloning": true,
                    "require_dedicated": false,
                    "stopped_hourly_usd": 0,
                    "timings_ms": {
                      "total": 60000
                    }
                  }
                ]
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        }
      }
    },
    "/v1/machines/{id}": {
      "get": {
        "operationId": "get_v1_machines_id",
        "summary": "Read a computer",
        "tags": [
          "Computers"
        ],
        "description": "Read a computer",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Machine"
                },
                "example": {
                  "id": "m_example",
                  "name": "office-report",
                  "template": "windows-16gb",
                  "state": "running",
                  "vcpus": 4,
                  "memory_mb": 16384,
                  "created": "2026-11-15T12:00:00Z",
                  "updated": "2026-11-15T12:00:00Z",
                  "auto_stop_minutes": 15,
                  "prevent_cloning": true,
                  "require_dedicated": false,
                  "stopped_hourly_usd": 0,
                  "timings_ms": {
                    "total": 60000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          }
        ]
      },
      "patch": {
        "operationId": "patch_v1_machines_id",
        "summary": "Change auto-stop or backup settings",
        "tags": [
          "Computers"
        ],
        "description": "Change auto-stop or backup settings",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "auto_stop_minutes": {
                      "type": "integer"
                    },
                    "backup": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean"
                        },
                        "restoring": {
                          "type": "string"
                        },
                        "restore_error": {
                          "type": "string"
                        },
                        "bytes": {
                          "type": "integer"
                        },
                        "copies": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "bytes": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "gb_month_usd": {
                          "type": "number"
                        },
                        "copy_gb_usd": {
                          "type": "number"
                        },
                        "restore_gb_usd": {
                          "type": "number"
                        }
                      }
                    }
                  },
                  "required": [
                    "id",
                    "auto_stop_minutes"
                  ]
                },
                "example": {
                  "id": "m_example",
                  "auto_stop_minutes": 15
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "auto_stop_minutes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10080
                  },
                  "backup": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "auto_stop_minutes": 15,
                "backup": false
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_v1_machines_id",
        "summary": "Permanently erase a computer and its key",
        "tags": [
          "Computers"
        ],
        "description": "Irreversible. Backups are deleted too. Snapshots and forks retain their own state and encryption keys.",
        "responses": {
          "204": {
            "description": "Success; empty body"
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          }
        ]
      }
    },
    "/v1/machine-requests/{key}": {
      "get": {
        "operationId": "get_v1_machine_requests_key",
        "summary": "Find the result of an uncertain create",
        "tags": [
          "Computers"
        ],
        "description": "Read-only request-key lookup; never creates another computer.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Machine"
                },
                "example": {
                  "id": "m_example",
                  "name": "office-report",
                  "template": "windows-16gb",
                  "state": "running",
                  "vcpus": 4,
                  "memory_mb": 16384,
                  "created": "2026-11-15T12:00:00Z",
                  "updated": "2026-11-15T12:00:00Z",
                  "auto_stop_minutes": 15,
                  "prevent_cloning": true,
                  "require_dedicated": false,
                  "stopped_hourly_usd": 0,
                  "timings_ms": {
                    "total": 60000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "request-example"
          }
        ]
      }
    },
    "/v1/machine-requests/{key}/stop": {
      "post": {
        "operationId": "post_v1_machine_requests_key_stop",
        "summary": "Cancel a create request and stop its computer",
        "tags": [
          "Computers"
        ],
        "description": "Cancels the request key before locating/stopping a possibly created computer. A cancelled key cannot be reused.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Machine"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string"
                        },
                        "request_canceled": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "state",
                        "request_canceled"
                      ]
                    }
                  ]
                },
                "example": {
                  "state": "stopped",
                  "request_canceled": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "request-example"
          }
        ]
      }
    },
    "/v1/machines/{id}/stop": {
      "post": {
        "operationId": "post_v1_machines_id_stop",
        "summary": "Stop a computer and retain state",
        "tags": [
          "Computers"
        ],
        "description": "Read stop_warning/resume_warning before continuing work. A cold recovery can preserve disk without unsaved memory. Stop ends running charges; optional stopped storage/backups retain their rates.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Machine"
                },
                "example": {
                  "id": "m_example",
                  "name": "office-report",
                  "template": "windows-16gb",
                  "state": "stopped",
                  "vcpus": 4,
                  "memory_mb": 16384,
                  "created": "2026-11-15T12:00:00Z",
                  "updated": "2026-11-15T12:00:00Z",
                  "auto_stop_minutes": 15,
                  "prevent_cloning": true,
                  "require_dedicated": false,
                  "stopped_hourly_usd": 0,
                  "timings_ms": {
                    "total": 60000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          }
        ]
      }
    },
    "/v1/machines/{id}/start": {
      "post": {
        "operationId": "post_v1_machines_id_start",
        "summary": "Resume a kept computer",
        "tags": [
          "Computers"
        ],
        "description": "Read stop_warning/resume_warning before continuing work. A cold recovery can preserve disk without unsaved memory. New admission requires prepaid runway and physical capacity.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Machine"
                },
                "example": {
                  "id": "m_example",
                  "name": "office-report",
                  "template": "windows-16gb",
                  "state": "running",
                  "vcpus": 4,
                  "memory_mb": 16384,
                  "created": "2026-11-15T12:00:00Z",
                  "updated": "2026-11-15T12:00:00Z",
                  "auto_stop_minutes": 15,
                  "prevent_cloning": true,
                  "require_dedicated": false,
                  "stopped_hourly_usd": 0,
                  "timings_ms": {
                    "total": 60000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          }
        ]
      }
    },
    "/v1/machines/{id}/exec": {
      "post": {
        "operationId": "post_v1_machines_id_exec",
        "summary": "Run PowerShell or a program",
        "tags": [
          "Commands"
        ],
        "description": "Choose script or argv. desktop:true is required for native Office. Default is SYSTEM. HTTP 200 is transport success; inspect exit_code, stderr and timed_out. Never blindly repeat after a lost reply.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecResult"
                },
                "example": {
                  "exit_code": 0,
                  "stdout": "2026-11-15T12:00:00Z\r\n",
                  "stderr": "",
                  "ms": 125,
                  "timed_out": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExecRequest"
              },
              "example": {
                "script": "Get-Date -Format o",
                "desktop": true,
                "timeout_s": 30
              }
            }
          }
        }
      }
    },
    "/v1/machines/{id}/health": {
      "get": {
        "operationId": "get_v1_machines_id_health",
        "summary": "Read guest readiness",
        "tags": [
          "Computers"
        ],
        "description": "Read guest readiness",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuestHealth"
                },
                "example": {
                  "ok": true,
                  "version": "0.1.0",
                  "hostname": "PANES-EXAMPLE",
                  "desktop": true,
                  "time": "2026-11-15T12:00:00Z",
                  "agent_uptime_s": 60
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          }
        ]
      }
    },
    "/v1/machines/{id}/files": {
      "get": {
        "operationId": "get_v1_machines_id_files",
        "summary": "Download a file",
        "tags": [
          "Files"
        ],
        "description": "Download a file",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                },
                "example": "<raw file bytes>"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "C:/work/report.xlsx"
          }
        ]
      },
      "put": {
        "operationId": "put_v1_machines_id_files",
        "summary": "Upload raw file bytes",
        "tags": [
          "Files"
        ],
        "description": "Writes atomically and creates parent directories. URL-encode the absolute Windows path. Body is bytes, not JSON.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bytes": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "bytes"
                  ]
                },
                "example": {
                  "bytes": 1024
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "C:/work/report.xlsx"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              },
              "example": "<raw file bytes>"
            }
          }
        }
      }
    },
    "/v1/machines/{id}/screenshot": {
      "get": {
        "operationId": "get_v1_machines_id_screenshot",
        "summary": "Read a PNG of the desktop",
        "tags": [
          "Desktop"
        ],
        "description": "Read a PNG of the desktop",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                },
                "example": "<PNG bytes>"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          }
        ]
      }
    },
    "/v1/machines/{id}/input": {
      "post": {
        "operationId": "post_v1_machines_id_input",
        "summary": "Send mouse and keyboard actions",
        "tags": [
          "Desktop"
        ],
        "description": "Coordinates are screenshot pixels. Scroll dy is notches, positive down. Body limit 64 KiB. Inspect the screen before repeating uncertain input.",
        "responses": {
          "204": {
            "description": "Success; empty body"
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "actions": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/InputAction"
                    }
                  }
                },
                "required": [
                  "actions"
                ]
              },
              "example": {
                "actions": [
                  {
                    "type": "click",
                    "x": 640,
                    "y": 360
                  },
                  {
                    "type": "key",
                    "keys": [
                      "ctrl",
                      "s"
                    ]
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/v1/machines/{id}/viewer": {
      "post": {
        "operationId": "post_v1_machines_id_viewer",
        "summary": "Create a private one-hour viewer URL",
        "tags": [
          "Desktop"
        ],
        "description": "Create a private one-hour viewer URL",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "expires_in": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url",
                    "expires_in"
                  ]
                },
                "example": {
                  "url": "https://api.usepanes.com/view/m_example?token=EXAMPLE",
                  "expires_in": "1h"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          }
        ]
      }
    },
    "/v1/machines/{id}/ssh": {
      "post": {
        "operationId": "post_v1_machines_id_ssh",
        "summary": "Create an SSH-over-WebSocket transport grant",
        "tags": [
          "Desktop"
        ],
        "description": "This URL transports SSH bytes. End-to-end SSH authentication and host-key verification are still required.",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "url",
                    "expires_at"
                  ]
                },
                "example": {
                  "url": "wss://api.usepanes.com/v1/machines/m_example/ssh?token=EXAMPLE",
                  "expires_at": "2026-11-15T12:00:00Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          }
        ]
      },
      "get": {
        "operationId": "get_v1_machines_id_ssh",
        "summary": "Use a signed desktop transport",
        "tags": [
          "Desktop"
        ],
        "description": "Obtain a short-lived URL through the authenticated viewer or SSH grant endpoint. Treat it as a private bearer credential. VNC and SSH require a WebSocket upgrade.",
        "responses": {
          "101": {
            "description": "WebSocket upgrade; binary transport stream."
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          },
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "EXAMPLE_SIGNED_TOKEN"
          }
        ]
      }
    },
    "/v1/machines/{id}/snapshot": {
      "post": {
        "operationId": "post_v1_machines_id_snapshot",
        "summary": "Snapshot memory and disk",
        "tags": [
          "Snapshots"
        ],
        "description": "Snapshot memory and disk",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Snapshot"
                },
                "example": {
                  "id": "snap_example",
                  "machine": "m_example",
                  "vcpus": 4,
                  "memory_mb": 16384,
                  "created": "2026-11-15T12:00:00Z",
                  "bytes": 1048576,
                  "ms": 3000
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          }
        ]
      }
    },
    "/v1/machines/{id}/fork": {
      "post": {
        "operationId": "post_v1_machines_id_fork",
        "summary": "Snapshot and start copies",
        "tags": [
          "Snapshots"
        ],
        "description": "Protected computers refuse cloning. Partial failures return the snapshot and all copies that started; retain their IDs before retrying.",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "snapshot": {
                      "$ref": "#/components/schemas/Snapshot"
                    },
                    "machines": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Machine"
                      }
                    },
                    "ms": {
                      "type": "integer"
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "snapshot": {
                    "id": "snap_example",
                    "machine": "m_example",
                    "vcpus": 4,
                    "memory_mb": 16384,
                    "created": "2026-11-15T12:00:00Z",
                    "bytes": 1048576,
                    "ms": 3000
                  },
                  "machines": [
                    {
                      "id": "m_example",
                      "name": "office-report",
                      "template": "windows-16gb",
                      "state": "running",
                      "vcpus": 4,
                      "memory_mb": 16384,
                      "created": "2026-11-15T12:00:00Z",
                      "updated": "2026-11-15T12:00:00Z",
                      "auto_stop_minutes": 15,
                      "prevent_cloning": true,
                      "require_dedicated": false,
                      "stopped_hourly_usd": 0,
                      "timings_ms": {
                        "total": 60000
                      }
                    }
                  ],
                  "ms": 1200,
                  "error": ""
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 32,
                    "default": 1
                  }
                }
              },
              "example": {
                "count": 1
              }
            }
          }
        }
      }
    },
    "/v1/machines/{id}/template": {
      "post": {
        "operationId": "post_v1_machines_id_template",
        "summary": "Replace a setup computer with a private template",
        "tags": [
          "Templates"
        ],
        "description": "Replaces the source computer. Private templates copy files and signed-in identities; remove credentials before saving. Protected computers refuse this operation.",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                },
                "example": {
                  "id": "tpl_example",
                  "name": "office-tools",
                  "private": true,
                  "vcpus": 4,
                  "memory_mb": 16384,
                  "hourly_usd": 0.75,
                  "apps": [
                    "powershell",
                    "edge",
                    "excel",
                    "word",
                    "powerpoint"
                  ],
                  "office_ready": false,
                  "office_status": "unknown"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "name"
                ]
              },
              "example": {
                "name": "office-tools"
              }
            }
          }
        }
      }
    },
    "/v1/templates": {
      "get": {
        "operationId": "get_v1_templates",
        "summary": "List shared and private templates",
        "tags": [
          "Templates"
        ],
        "description": "List shared and private templates",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Template"
                  }
                },
                "example": [
                  {
                    "id": "windows-16gb",
                    "name": "windows-16gb",
                    "private": false,
                    "vcpus": 4,
                    "memory_mb": 16384,
                    "hourly_usd": 0.75,
                    "apps": [
                      "powershell",
                      "edge",
                      "excel",
                      "word",
                      "powerpoint"
                    ],
                    "office_ready": false,
                    "office_status": "sign_in_required"
                  }
                ]
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        }
      }
    },
    "/v1/templates/{id}": {
      "delete": {
        "operationId": "delete_v1_templates_id",
        "summary": "Erase a private template",
        "tags": [
          "Templates"
        ],
        "description": "Erase a private template",
        "responses": {
          "204": {
            "description": "Success; empty body"
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "snap_example"
          }
        ]
      }
    },
    "/v1/snapshots": {
      "get": {
        "operationId": "get_v1_snapshots",
        "summary": "List snapshots",
        "tags": [
          "Snapshots"
        ],
        "description": "List snapshots",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Snapshot"
                  }
                },
                "example": [
                  {
                    "id": "snap_example",
                    "machine": "m_example",
                    "vcpus": 4,
                    "memory_mb": 16384,
                    "created": "2026-11-15T12:00:00Z",
                    "bytes": 1048576,
                    "ms": 3000
                  }
                ]
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        }
      }
    },
    "/v1/snapshots/{id}": {
      "delete": {
        "operationId": "delete_v1_snapshots_id",
        "summary": "Erase a snapshot",
        "tags": [
          "Snapshots"
        ],
        "description": "Erase a snapshot",
        "responses": {
          "204": {
            "description": "Success; empty body"
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "snap_example"
          }
        ]
      }
    },
    "/v1/snapshots/{id}/machines": {
      "post": {
        "operationId": "post_v1_snapshots_id_machines",
        "summary": "Start a copy from a snapshot",
        "tags": [
          "Snapshots"
        ],
        "description": "Start a copy from a snapshot",
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Machine"
                },
                "example": {
                  "id": "m_example",
                  "name": "office-report",
                  "template": "windows-16gb",
                  "state": "running",
                  "vcpus": 4,
                  "memory_mb": 16384,
                  "created": "2026-11-15T12:00:00Z",
                  "updated": "2026-11-15T12:00:00Z",
                  "auto_stop_minutes": 15,
                  "prevent_cloning": true,
                  "require_dedicated": false,
                  "stopped_hourly_usd": 0,
                  "timings_ms": {
                    "total": 60000
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "snap_example"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "auto_stop_minutes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10080
                  }
                }
              },
              "example": {
                "name": "snapshot-copy",
                "auto_stop_minutes": 15
              }
            }
          }
        }
      }
    },
    "/v1/machines/{id}/restore": {
      "post": {
        "operationId": "post_v1_machines_id_restore",
        "summary": "Restore a stopped computer from a backup",
        "tags": [
          "Computers"
        ],
        "description": "Requires a stopped computer with this account's backup copy. Poll the machine until backup.restoring clears; inspect backup.restore_error before starting.",
        "responses": {
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "backup": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean"
                        },
                        "restoring": {
                          "type": "string"
                        },
                        "restore_error": {
                          "type": "string"
                        },
                        "bytes": {
                          "type": "integer"
                        },
                        "copies": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "bytes": {
                                "type": "integer"
                              }
                            }
                          }
                        },
                        "gb_month_usd": {
                          "type": "number"
                        },
                        "copy_gb_usd": {
                          "type": "number"
                        },
                        "restore_gb_usd": {
                          "type": "number"
                        }
                      }
                    }
                  },
                  "required": [
                    "id",
                    "backup"
                  ]
                },
                "example": {
                  "id": "m_example",
                  "backup": {
                    "enabled": true,
                    "restoring": "copy_example"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "copy": {
                    "type": "string"
                  }
                },
                "required": [
                  "copy"
                ]
              },
              "example": {
                "copy": "copy_example"
              }
            }
          }
        }
      }
    },
    "/v1/usage": {
      "get": {
        "operationId": "get_v1_usage",
        "summary": "Read spending by computer",
        "tags": [
          "Usage"
        ],
        "description": "Read spending by computer",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                },
                "example": {
                  "to": "2026-11-15T12:00:00Z",
                  "machines": [],
                  "usd": 0,
                  "balance_usd": 10,
                  "prices": {
                    "stopped_machine_hour": 0.002,
                    "machine_4gb_hour": 0.33,
                    "machine_8gb_hour": 0.4,
                    "machine_16gb_hour": 0.75,
                    "backup_gb_month": 0.018,
                    "backup_copy_gb": 0.00035,
                    "backup_restore_gb": 0.0003
                  },
                  "from": "2026-11-15T12:00:00Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2026-11-01T00:00:00Z"
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2026-11-15T12:00:00Z"
          }
        ]
      }
    },
    "/v1/billing": {
      "get": {
        "operationId": "get_v1_billing",
        "summary": "Read dashboard billing and invoices",
        "tags": [
          "Dashboard"
        ],
        "description": "Read dashboard billing and invoices Dashboard only. API keys cannot authenticate this route.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean"
                    },
                    "test_mode": {
                      "type": "boolean"
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "blocked": {
                      "type": "boolean"
                    },
                    "balance_usd": {
                      "type": "number"
                    },
                    "usage_usd": {
                      "type": "number"
                    },
                    "period_start": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "prices": {
                      "$ref": "#/components/schemas/Prices"
                    },
                    "invoices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "number": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "amount_paid": {
                            "type": "integer"
                          },
                          "hosted_invoice_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "invoice_pdf": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    },
                    "payment_status": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "enabled": true,
                  "test_mode": false,
                  "ready": true,
                  "blocked": false,
                  "balance_usd": 10,
                  "usage_usd": 0,
                  "period_start": "2026-11-01T00:00:00Z",
                  "prices": {
                    "stopped_machine_hour": 0.002,
                    "machine_4gb_hour": 0.33,
                    "machine_8gb_hour": 0.4,
                    "machine_16gb_hour": 0.75,
                    "backup_gb_month": 0.018,
                    "backup_copy_gb": 0.00035,
                    "backup_restore_gb": 0.0003
                  },
                  "invoices": [],
                  "payment_status": ""
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": [
          {
            "Session": []
          }
        ],
        "x-browser-only": true,
        "parameters": [
          {
            "name": "checkout",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "cs_example"
          }
        ]
      }
    },
    "/v1/billing/checkout": {
      "post": {
        "operationId": "post_v1_billing_checkout",
        "summary": "Open dashboard prepaid Checkout",
        "tags": [
          "Dashboard"
        ],
        "description": "Open dashboard prepaid Checkout Dashboard only. API keys cannot authenticate this route.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "required": [
                    "url"
                  ]
                },
                "example": {
                  "url": "https://checkout.stripe.com/c/pay/EXAMPLE"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": [
          {
            "Session": []
          }
        ],
        "x-browser-only": true,
        "parameters": [
          {
            "name": "X-Panes-Csrf",
            "in": "header",
            "required": true,
            "schema": {
              "const": "1"
            },
            "example": "1"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cents": {
                    "enum": [
                      1000,
                      2500,
                      5000
                    ]
                  },
                  "attempt": {
                    "type": "string",
                    "minLength": 36,
                    "maxLength": 36
                  }
                },
                "required": [
                  "cents",
                  "attempt"
                ]
              },
              "example": {
                "cents": 1000,
                "attempt": "00000000-0000-4000-8000-000000000000"
              }
            }
          }
        }
      }
    },
    "/v1/billing/portal": {
      "post": {
        "operationId": "post_v1_billing_portal",
        "summary": "Open customer billing portal",
        "tags": [
          "Dashboard"
        ],
        "description": "Open customer billing portal Dashboard only. API keys cannot authenticate this route.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "required": [
                    "url"
                  ]
                },
                "example": {
                  "url": "https://billing.stripe.com/p/session/EXAMPLE"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": [
          {
            "Session": []
          }
        ],
        "x-browser-only": true,
        "parameters": [
          {
            "name": "X-Panes-Csrf",
            "in": "header",
            "required": true,
            "schema": {
              "const": "1"
            },
            "example": "1"
          }
        ]
      }
    },
    "/auth/me": {
      "get": {
        "operationId": "get_auth_me",
        "summary": "Read the current dashboard user",
        "tags": [
          "Dashboard"
        ],
        "description": "Read the current dashboard user Dashboard only. API keys cannot authenticate this route.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "org": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "user_example",
                  "email": "agent@example.com",
                  "name": "Agent",
                  "org": "org_example"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": [
          {
            "Session": []
          }
        ],
        "x-browser-only": true
      }
    },
    "/logout": {
      "post": {
        "operationId": "post_logout",
        "summary": "End dashboard and WorkOS sign-in",
        "tags": [
          "Dashboard"
        ],
        "description": "End dashboard and WorkOS sign-in",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ]
                },
                "example": {
                  "url": "/"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": []
      }
    },
    "/login": {
      "get": {
        "operationId": "get_login",
        "summary": "Start browser WorkOS authentication",
        "tags": [
          "Dashboard"
        ],
        "description": "Browser redirect flow. API signup uses /v1/signup instead. Callback parameters state and code come from WorkOS.",
        "responses": {
          "302": {
            "description": "Browser redirect",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                },
                "example": "https://api.workos.com/user_management/authorize?... "
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": [],
        "x-browser-only": true
      }
    },
    "/auth/callback": {
      "get": {
        "operationId": "get_auth_callback",
        "summary": "Complete browser WorkOS callback",
        "tags": [
          "Dashboard"
        ],
        "description": "Browser redirect flow. API signup uses /v1/signup instead. Callback parameters state and code come from WorkOS.",
        "responses": {
          "302": {
            "description": "Browser redirect",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                },
                "example": "https://api.workos.com/user_management/authorize?... "
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": [],
        "x-browser-only": true
      }
    },
    "/view/{id}": {
      "get": {
        "operationId": "get_view_id",
        "summary": "Use a signed desktop transport",
        "tags": [
          "Desktop"
        ],
        "description": "Obtain a short-lived URL through the authenticated viewer or SSH grant endpoint. Treat it as a private bearer credential. VNC and SSH require a WebSocket upgrade.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                },
                "example": "<browser HTML>"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "snap_example"
          },
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "EXAMPLE_SIGNED_TOKEN"
          }
        ]
      }
    },
    "/v1/machines/{id}/vnc": {
      "get": {
        "operationId": "get_v1_machines_id_vnc",
        "summary": "Use a signed desktop transport",
        "tags": [
          "Desktop"
        ],
        "description": "Obtain a short-lived URL through the authenticated viewer or SSH grant endpoint. Treat it as a private bearer credential. VNC and SSH require a WebSocket upgrade.",
        "responses": {
          "101": {
            "description": "WebSocket upgrade; binary transport stream."
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "m_example"
          },
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "EXAMPLE_SIGNED_TOKEN"
          }
        ]
      }
    },
    "/.well-known/panes.json": {
      "get": {
        "operationId": "get_well_known_panes_json",
        "summary": "Supplemental agent discovery metadata",
        "tags": [
          "Discovery"
        ],
        "description": "Panes-specific discovery metadata. This well-known file is supplemental, not an MCP protocol standard.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "operator": {
                      "type": "string"
                    },
                    "docs": {
                      "type": "string",
                      "format": "uri"
                    },
                    "openapi": {
                      "type": "string",
                      "format": "uri"
                    },
                    "llms": {
                      "type": "string",
                      "format": "uri"
                    },
                    "mcp": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "transport": {
                          "type": "string"
                        },
                        "authentication": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "name": "Panes",
                  "operator": "Renaissance Superintelligence Corporation",
                  "docs": "https://usepanes.com/docs.md",
                  "openapi": "https://usepanes.com/openapi.json",
                  "llms": "https://usepanes.com/llms.txt",
                  "mcp": {
                    "url": "https://api.usepanes.com/mcp/agent",
                    "transport": "streamable-http",
                    "authentication": "Discovery and signup are public. Account tools require Authorization: Bearer <Panes API key>."
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        },
        "security": []
      }
    },
    "/mcp/agent": {
      "post": {
        "operationId": "post_mcp_agent",
        "summary": "Autonomous Streamable HTTP MCP transport",
        "tags": [
          "Discovery"
        ],
        "description": "Standard MCP JSON-RPC over Streamable HTTP. Discovery/signup are public. Account tools require a Panes bearer API key on each HTTP request; cookies cannot authorize tools. Use an MCP client for initialization, protocol negotiation and cancellation. Tool parameters mirror REST, with JSON request payload nested under body. The separate ChatGPT endpoint is /mcp with OAuth and per-action approvals.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jsonrpc": {
                      "const": "2.0"
                    },
                    "id": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "integer"
                        }
                      ]
                    },
                    "result": {},
                    "error": {}
                  },
                  "required": [
                    "jsonrpc"
                  ]
                },
                "example": {
                  "jsonrpc": "2.0",
                  "id": 1,
                  "result": {
                    "tools": []
                  }
                }
              }
            }
          },
          "202": {
            "description": "Notification accepted; no response body."
          },
          "400": {
            "description": "MCP protocol or JSON-RPC request error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jsonrpc": {
                      "type": "string"
                    },
                    "id": {},
                    "error": {}
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "jsonrpc": "2.0",
                  "id": 1,
                  "error": {
                    "code": -32600,
                    "message": "Invalid request"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Origin is not allowed."
          },
          "405": {
            "description": "Unsupported MCP HTTP method."
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/json, text/event-stream"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Bearer pk_EXAMPLE"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "jsonrpc": {
                    "const": "2.0"
                  },
                  "id": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "integer"
                      }
                    ]
                  },
                  "method": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object"
                  }
                },
                "required": [
                  "jsonrpc",
                  "method"
                ]
              },
              "example": {
                "jsonrpc": "2.0",
                "id": 1,
                "method": "tools/list",
                "params": {}
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Panes pk_ API key"
      },
      "Session": {
        "type": "apiKey",
        "in": "cookie",
        "name": "panes_session",
        "description": "Dashboard session; writes also require X-Panes-Csrf: 1"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "retryable": {
            "type": "boolean"
          },
          "uncertain": {
            "type": "boolean"
          },
          "topups_url": {
            "type": "string"
          },
          "payment_methods_url": {
            "type": "string"
          },
          "balance_usd": {
            "type": "number"
          },
          "required_balance_usd": {
            "type": "number"
          }
        },
        "required": [
          "error"
        ]
      },
      "Prices": {
        "type": "object",
        "properties": {
          "stopped_machine_hour": {
            "type": "number"
          },
          "machine_4gb_hour": {
            "type": "number"
          },
          "machine_8gb_hour": {
            "type": "number"
          },
          "machine_16gb_hour": {
            "type": "number"
          },
          "backup_gb_month": {
            "type": "number"
          },
          "backup_copy_gb": {
            "type": "number"
          },
          "backup_restore_gb": {
            "type": "number"
          }
        },
        "required": [
          "machine_4gb_hour",
          "machine_8gb_hour",
          "machine_16gb_hour",
          "stopped_machine_hour"
        ]
      },
      "Key": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "hint": {
            "type": "string"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "last_used": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "hint",
          "created"
        ]
      },
      "NewKey": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "info": {
            "$ref": "#/components/schemas/Key"
          }
        },
        "required": [
          "key",
          "info"
        ]
      },
      "Template": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "private": {
            "type": "boolean"
          },
          "vcpus": {
            "type": "integer"
          },
          "memory_mb": {
            "type": "integer"
          },
          "hourly_usd": {
            "type": "number"
          },
          "apps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "office_ready": {
            "type": "boolean"
          },
          "office_status": {
            "type": "string",
            "enum": [
              "unknown",
              "sign_in_required",
              "ready"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "private",
          "vcpus",
          "memory_mb",
          "hourly_usd",
          "apps",
          "office_ready",
          "office_status"
        ]
      },
      "Machine": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "template": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "vcpus": {
            "type": "integer"
          },
          "memory_mb": {
            "type": "integer"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "updated": {
            "type": "string",
            "format": "date-time"
          },
          "auto_stop_minutes": {
            "type": "integer"
          },
          "prevent_cloning": {
            "type": "boolean"
          },
          "require_dedicated": {
            "type": "boolean"
          },
          "stopped_hourly_usd": {
            "type": "number"
          },
          "stop_warning": {
            "type": "string"
          },
          "resume_warning": {
            "type": "string"
          },
          "timings_ms": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "backup": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "restoring": {
                "type": "string"
              },
              "restore_error": {
                "type": "string"
              },
              "bytes": {
                "type": "integer"
              },
              "copies": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "bytes": {
                      "type": "integer"
                    }
                  }
                }
              },
              "gb_month_usd": {
                "type": "number"
              },
              "copy_gb_usd": {
                "type": "number"
              },
              "restore_gb_usd": {
                "type": "number"
              }
            }
          }
        },
        "required": [
          "id",
          "state",
          "auto_stop_minutes"
        ]
      },
      "Snapshot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "machine": {
            "type": "string"
          },
          "vcpus": {
            "type": "integer"
          },
          "memory_mb": {
            "type": "integer"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "bytes": {
            "type": "integer"
          },
          "ms": {
            "type": "integer"
          },
          "prevent_cloning": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "machine",
          "vcpus",
          "memory_mb",
          "created"
        ]
      },
      "Account": {
        "type": "object",
        "properties": {
          "running": {
            "type": "integer"
          },
          "max_running": {
            "type": "integer"
          },
          "machines": {
            "type": "integer"
          },
          "max_machines": {
            "type": "integer"
          },
          "snapshots": {
            "type": "integer"
          },
          "max_snapshots": {
            "type": "integer"
          },
          "templates": {
            "type": "integer"
          },
          "max_templates": {
            "type": "integer"
          },
          "auto_stop_minutes": {
            "type": "integer"
          },
          "admission_runway_minutes": {
            "type": "integer"
          },
          "org": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "balance_usd": {
            "type": "number"
          },
          "prices": {
            "$ref": "#/components/schemas/Prices"
          },
          "limits_rise_on_first_payment": {
            "type": "boolean"
          },
          "billing_required": {
            "type": "boolean"
          },
          "support_email": {
            "type": "string"
          },
          "limits_mode": {
            "type": "string"
          },
          "topups_url": {
            "type": "string",
            "format": "uri"
          },
          "payment_methods": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dev": {
            "type": "boolean"
          }
        },
        "required": [
          "org",
          "name",
          "balance_usd",
          "running",
          "prices",
          "max_running"
        ]
      },
      "Topup": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "amount_cents": {
            "type": "integer"
          },
          "currency": {
            "const": "usd"
          },
          "method": {
            "enum": [
              "stripe_mpp",
              "usdc_x402",
              "checkout"
            ]
          },
          "status": {
            "enum": [
              "quoted",
              "pending",
              "paid",
              "failed",
              "expired",
              "reconcile",
              "refunded"
            ]
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "payment_intent": {
            "type": "string"
          },
          "refunded_cents": {
            "type": "integer"
          },
          "status_url": {
            "type": "string",
            "format": "uri"
          },
          "pay_url": {
            "type": "string",
            "format": "uri"
          },
          "balance_usd": {
            "type": "number"
          },
          "next_action": {
            "type": "string"
          },
          "checkout_url": {
            "type": "string",
            "format": "uri"
          },
          "payment": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MPPChallenge"
              },
              {
                "$ref": "#/components/schemas/X402PaymentRequired"
              },
              {
                "type": "object",
                "properties": {
                  "browser_required": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "browser_required"
                ]
              }
            ]
          }
        },
        "required": [
          "id",
          "amount_cents",
          "currency",
          "method",
          "status",
          "expires_at",
          "refunded_cents",
          "status_url",
          "pay_url",
          "balance_usd"
        ]
      },
      "MPPChallenge": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "realm": {
            "type": "string"
          },
          "method": {
            "const": "stripe"
          },
          "intent": {
            "const": "charge"
          },
          "request": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "string"
              },
              "currency": {
                "const": "usd"
              },
              "externalId": {
                "type": "string"
              },
              "methodDetails": {
                "type": "object",
                "properties": {
                  "networkId": {
                    "type": "string"
                  },
                  "paymentMethodTypes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "expires": {
            "type": "string",
            "format": "date-time"
          },
          "opaque": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            ]
          },
          "header": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "method",
          "intent",
          "request"
        ]
      },
      "X402Requirements": {
        "type": "object",
        "properties": {
          "scheme": {
            "const": "exact"
          },
          "network": {
            "type": "string"
          },
          "asset": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "payTo": {
            "type": "string"
          },
          "maxTimeoutSeconds": {
            "type": "integer"
          },
          "extra": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "scheme",
          "network",
          "asset",
          "amount",
          "payTo",
          "maxTimeoutSeconds"
        ]
      },
      "X402PaymentRequired": {
        "type": "object",
        "properties": {
          "x402Version": {
            "const": 2
          },
          "resource": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "description": {
                "type": "string"
              },
              "mimeType": {
                "type": "string"
              },
              "serviceName": {
                "type": "string"
              }
            }
          },
          "accepts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/X402Requirements"
            }
          }
        },
        "required": [
          "x402Version",
          "accepts"
        ]
      },
      "ExecRequest": {
        "type": "object",
        "properties": {
          "script": {
            "type": "string"
          },
          "argv": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "desktop": {
            "type": "boolean",
            "default": false
          },
          "params": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "stdin": {
            "type": "string"
          },
          "timeout_s": {
            "type": "integer",
            "minimum": 1,
            "default": 600
          }
        },
        "oneOf": [
          {
            "required": [
              "script"
            ],
            "not": {
              "required": [
                "argv"
              ]
            }
          },
          {
            "required": [
              "argv"
            ],
            "not": {
              "required": [
                "script"
              ]
            }
          }
        ]
      },
      "ExecResult": {
        "type": "object",
        "properties": {
          "exit_code": {
            "type": "integer"
          },
          "stdout": {
            "type": "string"
          },
          "stderr": {
            "type": "string"
          },
          "ms": {
            "type": "integer"
          },
          "timed_out": {
            "type": "boolean"
          }
        },
        "required": [
          "exit_code",
          "stdout",
          "stderr",
          "ms"
        ]
      },
      "InputAction": {
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "move",
              "click",
              "double_click",
              "down",
              "up",
              "scroll",
              "key",
              "type"
            ]
          },
          "x": {
            "type": "integer"
          },
          "y": {
            "type": "integer"
          },
          "button": {
            "enum": [
              "left",
              "right",
              "middle"
            ]
          },
          "dy": {
            "type": "integer"
          },
          "keys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ]
      },
      "GuestHealth": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "version": {
            "type": "string"
          },
          "hostname": {
            "type": "string"
          },
          "desktop": {
            "type": "boolean"
          },
          "time": {
            "type": "string",
            "format": "date-time"
          },
          "agent_uptime_s": {
            "type": "number"
          }
        },
        "required": [
          "ok",
          "version",
          "hostname",
          "desktop",
          "time",
          "agent_uptime_s"
        ]
      },
      "Usage": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          },
          "usd": {
            "type": "number"
          },
          "balance_usd": {
            "type": "number"
          },
          "prices": {
            "$ref": "#/components/schemas/Prices"
          },
          "machines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "machine": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "seconds": {
                  "type": "number"
                },
                "usd": {
                  "type": "number"
                }
              },
              "required": [
                "machine",
                "seconds",
                "usd"
              ]
            }
          }
        },
        "required": [
          "from",
          "to",
          "machines",
          "usd",
          "balance_usd"
        ]
      }
    },
    "responses": {
      "Error400": {
        "description": "Invalid request: correct the named field.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Invalid request: correct the named field.",
              "code": "invalid_request",
              "action": "read_error_and_correct_request",
              "retryable": false,
              "uncertain": false
            }
          }
        }
      },
      "Error401": {
        "description": "Missing, invalid or expired authentication.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Missing, invalid or expired authentication.",
              "code": "authentication_required",
              "action": "use_valid_key_or_email_code",
              "retryable": false,
              "uncertain": false
            }
          }
        }
      },
      "Error402": {
        "description": "Prepay or authorize the returned payment challenge.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Prepay or authorize the returned payment challenge.",
              "code": "insufficient_balance",
              "action": "prepay_then_retry",
              "retryable": false,
              "uncertain": false,
              "topups_url": "/v1/topups",
              "payment_methods_url": "/v1/payment-methods"
            }
          }
        }
      },
      "Error403": {
        "description": "Access, suspension or payment dispute restriction.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Access, suspension or payment dispute restriction.",
              "code": "access_denied",
              "action": "check_account_permissions_or_contact_support",
              "retryable": false,
              "uncertain": false
            }
          }
        }
      },
      "Error404": {
        "description": "No matching resource in this account.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "No matching resource in this account.",
              "code": "not_found",
              "action": "list_resources_in_this_account",
              "retryable": false,
              "uncertain": false
            }
          }
        }
      },
      "Error409": {
        "description": "Read current state or correct the idempotency request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Read current state or correct the idempotency request.",
              "code": "state_conflict",
              "action": "read_current_state_before_retry",
              "retryable": false,
              "uncertain": false
            }
          }
        }
      },
      "Error429": {
        "description": "Respect Retry-After or the named account restriction.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Respect Retry-After or the named account restriction.",
              "code": "rate_or_account_limit",
              "action": "follow_retry_after_or_named_limit",
              "retryable": true,
              "uncertain": false
            }
          }
        }
      },
      "Error500": {
        "description": "Inspect current state before repeating writes.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Inspect current state before repeating writes.",
              "code": "service_unavailable",
              "action": "read_current_state_before_retrying_writes",
              "retryable": true,
              "uncertain": true
            }
          }
        }
      },
      "Error502": {
        "description": "Provider unavailable; inspect state before retrying.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Provider unavailable; inspect state before retrying.",
              "code": "service_unavailable",
              "action": "read_current_state_before_retrying_writes",
              "retryable": true,
              "uncertain": true
            }
          }
        }
      },
      "Error503": {
        "description": "Wait; inspect state before repeating writes.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Wait; inspect state before repeating writes.",
              "code": "service_unavailable",
              "action": "read_current_state_before_retrying_writes",
              "retryable": true,
              "uncertain": true
            }
          }
        }
      },
      "Error504": {
        "description": "Reply timed out; inspect state before retrying.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Reply timed out; inspect state before retrying.",
              "code": "service_unavailable",
              "action": "read_current_state_before_retrying_writes",
              "retryable": true,
              "uncertain": true
            }
          }
        }
      }
    }
  }
}
