{
  "openapi": "3.1.0",
  "info": {
    "title": "Orgo API",
    "version": "1.0.0",
    "summary": "Provision and control cloud computers (virtual desktops) for AI agents.",
    "description": "REST API for Orgo — cloud computers for AI agents. Authenticate with a Bearer API key. Full reference and SDK guides: https://docs.orgo.ai.",
    "termsOfService": "https://www.orgo.ai/terms",
    "contact": {
      "name": "Orgo",
      "url": "https://www.orgo.ai"
    }
  },
  "servers": [
    {
      "url": "https://www.orgo.ai",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Orgo developer docs",
    "url": "https://docs.orgo.ai"
  },
  "security": [
    {
      "bearerApiKey": []
    }
  ],
  "paths": {
    "/api/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Liveness probe",
        "security": [],
        "tags": [
          "system"
        ],
        "responses": {
          "200": {
            "description": "Service is healthy."
          }
        }
      }
    },
    "/api/me": {
      "get": {
        "operationId": "getMe",
        "summary": "Current authenticated account",
        "tags": [
          "account"
        ],
        "responses": {
          "200": {
            "description": "Account profile and tier."
          },
          "401": {
            "description": "Unauthenticated."
          }
        }
      }
    },
    "/api/keys": {
      "get": {
        "operationId": "listApiKeys",
        "summary": "List this account’s API keys (no plaintext)",
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "description": "API key metadata."
          },
          "401": {
            "description": "Unauthenticated."
          }
        }
      },
      "post": {
        "operationId": "createApiKey",
        "summary": "Create an API key (optionally workspace-scoped)",
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "description": "Newly created key (plaintext shown once)."
          },
          "401": {
            "description": "Unauthenticated."
          }
        }
      }
    },
    "/api/workspaces": {
      "get": {
        "operationId": "listWorkspaces",
        "summary": "List workspaces (projects) for the account",
        "tags": [
          "workspaces"
        ],
        "responses": {
          "200": {
            "description": "Array of workspaces."
          },
          "401": {
            "description": "Unauthenticated."
          }
        }
      },
      "post": {
        "operationId": "createWorkspace",
        "summary": "Create a workspace",
        "tags": [
          "workspaces"
        ],
        "responses": {
          "201": {
            "description": "Created workspace."
          },
          "401": {
            "description": "Unauthenticated."
          }
        }
      }
    },
    "/api/computers": {
      "get": {
        "operationId": "listComputers",
        "summary": "List cloud computers (virtual desktops)",
        "tags": [
          "computers"
        ],
        "responses": {
          "200": {
            "description": "Array of computers."
          },
          "401": {
            "description": "Unauthenticated."
          }
        }
      },
      "post": {
        "operationId": "createComputer",
        "summary": "Provision a new cloud computer (optionally from a template via template_ref)",
        "tags": [
          "computers"
        ],
        "responses": {
          "201": {
            "description": "Created computer."
          },
          "401": {
            "description": "Unauthenticated."
          },
          "402": {
            "description": "Quota or credit limit reached."
          },
          "409": {
            "description": "template_ref given but the template golden is not built."
          }
        }
      }
    },
    "/api/templates": {
      "get": {
        "operationId": "listTemplates",
        "summary": "List templates you have published",
        "tags": [
          "templates"
        ],
        "responses": {
          "200": {
            "description": "Your templates."
          },
          "401": {
            "description": "Unauthenticated."
          }
        }
      },
      "post": {
        "operationId": "publishTemplate",
        "summary": "Publish a template version (raw YAML/JSON body; requires the Scale plan)",
        "tags": [
          "templates"
        ],
        "responses": {
          "201": {
            "description": "Published version."
          },
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Requires the Scale plan."
          },
          "422": {
            "description": "Template validation failed."
          }
        }
      }
    },
    "/api/templates/global": {
      "get": {
        "operationId": "listGlobalTemplates",
        "summary": "List curated templates you can deploy from (pass the ref as template_ref to POST /api/computers)",
        "tags": [
          "templates"
        ],
        "responses": {
          "200": {
            "description": "Curated templates."
          },
          "401": {
            "description": "Unauthenticated."
          }
        }
      }
    },
    "/api/templates/validate": {
      "post": {
        "operationId": "validateTemplate",
        "summary": "Validate a template document with no side effects",
        "tags": [
          "templates"
        ],
        "responses": {
          "200": {
            "description": "Valid."
          },
          "401": {
            "description": "Unauthenticated."
          },
          "422": {
            "description": "Validation failed."
          }
        }
      }
    },
    "/api/templates/{namespace}/{name}/{version}": {
      "get": {
        "operationId": "getTemplate",
        "summary": "Get a template version",
        "tags": [
          "templates"
        ],
        "parameters": [
          {
            "name": "namespace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The template version."
          },
          "401": {
            "description": "Unauthenticated."
          },
          "404": {
            "description": "Not found."
          }
        }
      },
      "delete": {
        "operationId": "deleteTemplate",
        "summary": "Delete a template version",
        "tags": [
          "templates"
        ],
        "parameters": [
          {
            "name": "namespace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted."
          },
          "401": {
            "description": "Unauthenticated."
          },
          "404": {
            "description": "Not found."
          }
        }
      }
    },
    "/api/templates/{namespace}/{name}/{version}/build": {
      "post": {
        "operationId": "buildTemplate",
        "summary": "Build a template golden image so deploys are instant (requires the Scale plan)",
        "tags": [
          "templates"
        ],
        "parameters": [
          {
            "name": "namespace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Build started."
          },
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Requires the Scale plan."
          }
        }
      },
      "get": {
        "operationId": "getTemplateBuildStatus",
        "summary": "Poll golden build status (not_built | building | ready | failed)",
        "tags": [
          "templates"
        ],
        "parameters": [
          {
            "name": "namespace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Build status."
          },
          "401": {
            "description": "Unauthenticated."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Orgo API key",
        "description": "Create a key in the dashboard or via POST /api/keys, then send `Authorization: Bearer <key>`."
      }
    }
  },
  "tags": [
    {
      "name": "system"
    },
    {
      "name": "account"
    },
    {
      "name": "auth"
    },
    {
      "name": "workspaces"
    },
    {
      "name": "computers"
    },
    {
      "name": "templates"
    }
  ]
}