{
  "components": {
    "parameters": {
      "Cursor": {
        "description": "The `next_cursor` from the previous page.",
        "in": "query",
        "name": "cursor",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "IdempotencyKey": {
        "in": "header",
        "name": "Idempotency-Key",
        "required": false,
        "schema": {
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      },
      "InstanceId": {
        "in": "path",
        "name": "instance_id",
        "required": true,
        "schema": {
          "examples": [
            "ins_01jd3v7k8m0000000000000000"
          ],
          "type": "string"
        }
      },
      "Limit": {
        "in": "query",
        "name": "limit",
        "required": false,
        "schema": {
          "default": 20,
          "maximum": 100,
          "minimum": 1,
          "type": "integer"
        }
      },
      "NetworkId": {
        "in": "path",
        "name": "network_id",
        "required": true,
        "schema": {
          "examples": [
            "net_01jd3v7k8m0000000000000000"
          ],
          "type": "string"
        }
      },
      "OperationId": {
        "in": "path",
        "name": "operation_id",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "ProjectId": {
        "in": "path",
        "name": "project_id",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SSHKeyId": {
        "in": "path",
        "name": "ssh_key_id",
        "required": true,
        "schema": {
          "examples": [
            "ssh_01jd3v7k8m0000000000000000"
          ],
          "type": "string"
        }
      },
      "SubnetId": {
        "in": "path",
        "name": "subnet_id",
        "required": true,
        "schema": {
          "examples": [
            "snet_01jd3v7k8m0000000000000000"
          ],
          "type": "string"
        }
      }
    },
    "responses": {
      "Conflict": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "The request conflicts with current state (`conflict`), such as a duplicate name."
      },
      "IdempotencyKeyReused": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "The `Idempotency-Key` was already used with a different request (`idempotency_key_reused`)."
      },
      "InstanceConflict": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "The instance cannot be created now: `insufficient_capacity` (nothing\nin the region fits the instance type; the message names the type and\nregion only), `quota_exceeded` (the organization is over its limit),\n`subnet_full` (no free address in the subnet), or `conflict` (a\nduplicate name).\n"
      },
      "InvalidArgument": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "The request is malformed or a field is invalid (`invalid_argument`)."
      },
      "NotFound": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "The resource does not exist or the caller cannot see it (`not_found`)."
      },
      "PermissionDenied": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Authenticated but not allowed (`permission_denied`), including users outside the sign-in allowlist."
      },
      "ResourceInUse": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Something still uses the resource (`resource_in_use`)."
      },
      "Unauthenticated": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Missing, invalid, expired or revoked credentials, or an API key whose creator no longer has access (`unauthenticated`)."
      }
    },
    "schemas": {
      "Condition": {
        "properties": {
          "last_transition_time": {
            "format": "date-time",
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "reason": {
            "description": "A CamelCase machine-readable reason.",
            "type": "string"
          },
          "status": {
            "enum": [
              "True",
              "False",
              "Unknown"
            ],
            "type": "string"
          },
          "type": {
            "enum": [
              "Placed",
              "Realized",
              "Running",
              "NetworkReady"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "status",
          "reason",
          "message",
          "last_transition_time"
        ],
        "type": "object"
      },
      "ConsoleOutput": {
        "properties": {
          "output": {
            "description": "The tail of the serial console, as text.",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "output"
        ],
        "type": "object"
      },
      "CreateInstanceRequest": {
        "additionalProperties": false,
        "properties": {
          "desired_power": {
            "$ref": "#/components/schemas/DesiredPower"
          },
          "image": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "instance_type": {
            "maxLength": 63,
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "$ref": "#/components/schemas/Slug"
          },
          "region": {
            "maxLength": 63,
            "minLength": 1,
            "type": "string"
          },
          "ssh_key_ids": {
            "items": {
              "type": "string"
            },
            "maxItems": 10,
            "type": "array"
          },
          "subnet_id": {
            "description": "A subnet of a network in the same region.",
            "type": "string"
          },
          "user_data": {
            "description": "cloud-init user data, passed to the instance as given.",
            "maxLength": 65536,
            "type": "string"
          }
        },
        "required": [
          "name",
          "region",
          "instance_type",
          "image",
          "subnet_id"
        ],
        "type": "object"
      },
      "CreateNetworkRequest": {
        "additionalProperties": false,
        "properties": {
          "cidr": {
            "examples": [
              "10.0.0.0/16"
            ],
            "maxLength": 18,
            "minLength": 9,
            "type": "string"
          },
          "name": {
            "$ref": "#/components/schemas/Slug"
          },
          "region": {
            "maxLength": 63,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name",
          "region",
          "cidr"
        ],
        "type": "object"
      },
      "CreateSSHKeyRequest": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "$ref": "#/components/schemas/Slug"
          },
          "public_key": {
            "description": "An OpenSSH public key (`ssh-ed25519 ...`, `ssh-rsa ...`, `ecdsa-sha2-...`).",
            "maxLength": 16384,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name",
          "public_key"
        ],
        "type": "object"
      },
      "CreateSubnetRequest": {
        "additionalProperties": false,
        "properties": {
          "cidr": {
            "examples": [
              "10.0.1.0/24"
            ],
            "maxLength": 18,
            "minLength": 9,
            "type": "string"
          },
          "gateway_ip": {
            "description": "Defaults to the first usable address of the CIDR.",
            "type": "string"
          },
          "name": {
            "$ref": "#/components/schemas/Slug"
          }
        },
        "required": [
          "name",
          "cidr"
        ],
        "type": "object"
      },
      "DesiredPower": {
        "enum": [
          "running",
          "stopped"
        ],
        "type": "string"
      },
      "Error": {
        "properties": {
          "error": {
            "properties": {
              "code": {
                "description": "Stable, machine-readable error code.",
                "enum": [
                  "invalid_argument",
                  "unauthenticated",
                  "permission_denied",
                  "not_found",
                  "conflict",
                  "billing_setup_required",
                  "idempotency_key_reused",
                  "internal",
                  "unavailable",
                  "rate_limited",
                  "insufficient_capacity",
                  "quota_exceeded",
                  "subnet_full",
                  "resource_in_use",
                  "not_implemented"
                ],
                "type": "string"
              },
              "details": {
                "description": "Per-field problems for `invalid_argument`.",
                "items": {
                  "properties": {
                    "field": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "field",
                    "message"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "message": {
                "description": "Human-readable explanation. Do not parse.",
                "type": "string"
              },
              "request_id": {
                "description": "Echoes the `X-Request-Id` response header.",
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "Image": {
        "properties": {
          "architecture": {
            "enum": [
              "x86_64",
              "arm64"
            ],
            "type": "string"
          },
          "default_user": {
            "description": "The user the instance's SSH keys are installed for.",
            "examples": [
              "ubuntu"
            ],
            "type": "string"
          },
          "id": {
            "examples": [
              "img_01jd3v7k8m0000000000000000"
            ],
            "type": "string"
          },
          "name": {
            "examples": [
              "ubuntu-24.04"
            ],
            "type": "string"
          },
          "sha256": {
            "description": "SHA-256 of the image file instances boot from.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "architecture",
          "default_user"
        ],
        "type": "object"
      },
      "ImageList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Image"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "Instance": {
        "properties": {
          "conditions": {
            "items": {
              "$ref": "#/components/schemas/Condition"
            },
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "desired_power": {
            "$ref": "#/components/schemas/DesiredPower"
          },
          "generation": {
            "description": "Increases on every change to what was asked for.",
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "examples": [
              "ins_01jd3v7k8m0000000000000000"
            ],
            "type": "string"
          },
          "image": {
            "examples": [
              "ubuntu-24.04"
            ],
            "type": "string"
          },
          "instance_type": {
            "examples": [
              "cpu.2x4"
            ],
            "type": "string"
          },
          "name": {
            "$ref": "#/components/schemas/Slug"
          },
          "observed_generation": {
            "description": "The generation the running instance reflects.",
            "format": "int64",
            "type": "integer"
          },
          "private_ip": {
            "description": "The instance's address in its subnet.",
            "examples": [
              "10.0.1.5"
            ],
            "type": "string"
          },
          "project_id": {
            "type": "string"
          },
          "region": {
            "examples": [
              "us-ohio-1"
            ],
            "type": "string"
          },
          "ssh_key_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "state": {
            "$ref": "#/components/schemas/InstanceState"
          },
          "subnet_id": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "name",
          "region",
          "instance_type",
          "image",
          "subnet_id",
          "ssh_key_ids",
          "desired_power",
          "state",
          "conditions",
          "generation",
          "observed_generation",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "InstanceList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Instance"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "InstanceState": {
        "description": "Derived from `conditions`.",
        "enum": [
          "provisioning",
          "running",
          "stopping",
          "stopped",
          "deleting",
          "failed"
        ],
        "type": "string"
      },
      "InstanceType": {
        "properties": {
          "accelerator_count": {
            "minimum": 0,
            "type": "integer"
          },
          "disk_gib": {
            "description": "Size of the boot disk.",
            "minimum": 1,
            "type": "integer"
          },
          "id": {
            "examples": [
              "itp_01jd3v7k8m0000000000000000"
            ],
            "type": "string"
          },
          "memory_mib": {
            "minimum": 1,
            "type": "integer"
          },
          "name": {
            "examples": [
              "cpu.2x4"
            ],
            "type": "string"
          },
          "vcpus": {
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "vcpus",
          "memory_mib",
          "disk_gib",
          "accelerator_count"
        ],
        "type": "object"
      },
      "InstanceTypeList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/InstanceType"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "InstanceWithOperation": {
        "properties": {
          "instance": {
            "$ref": "#/components/schemas/Instance"
          },
          "operation": {
            "$ref": "#/components/schemas/Operation"
          }
        },
        "required": [
          "instance",
          "operation"
        ],
        "type": "object"
      },
      "Network": {
        "properties": {
          "cidr": {
            "description": "A private IPv4 range.",
            "examples": [
              "10.0.0.0/16"
            ],
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "examples": [
              "net_01jd3v7k8m0000000000000000"
            ],
            "type": "string"
          },
          "name": {
            "$ref": "#/components/schemas/Slug"
          },
          "project_id": {
            "type": "string"
          },
          "region": {
            "description": "Region code.",
            "examples": [
              "us-ohio-1"
            ],
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "name",
          "region",
          "cidr",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "NetworkList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Network"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "Operation": {
        "properties": {
          "attempts": {
            "description": "How many times the worker has started this operation.",
            "type": "integer"
          },
          "completed_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "error": {
            "description": "Present when `state` is `failed`.",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          },
          "id": {
            "examples": [
              "op_01jd3v7k8m0000000000000000"
            ],
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/OperationKind"
          },
          "project_id": {
            "type": "string"
          },
          "resource_id": {
            "description": "The endpoint or instance this operation acts on.",
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/OperationState"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/OperationStep"
            },
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "kind",
          "resource_id",
          "state",
          "steps",
          "attempts",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "OperationKind": {
        "enum": [
          "endpoint.create",
          "endpoint.delete",
          "instance.create",
          "instance.delete",
          "instance.start",
          "instance.stop"
        ],
        "type": "string"
      },
      "OperationList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Operation"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "OperationState": {
        "description": "`pending` and `running` are transitional; `succeeded`, `failed` and\n`cancelled` are terminal. A create is `cancelled` when a delete\nsupersedes it.\n",
        "enum": [
          "pending",
          "running",
          "succeeded",
          "failed",
          "cancelled"
        ],
        "type": "string"
      },
      "OperationStep": {
        "properties": {
          "attempts": {
            "minimum": 0,
            "type": "integer"
          },
          "finished_at": {
            "format": "date-time",
            "type": "string"
          },
          "last_error": {
            "type": "string"
          },
          "name": {
            "examples": [
              "reserve_capacity",
              "start_replicas",
              "wait_healthy"
            ],
            "type": "string"
          },
          "started_at": {
            "format": "date-time",
            "type": "string"
          },
          "state": {
            "enum": [
              "pending",
              "running",
              "succeeded",
              "failed",
              "skipped"
            ],
            "type": "string"
          }
        },
        "required": [
          "name",
          "state",
          "attempts"
        ],
        "type": "object"
      },
      "Project": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "endpoint_replica_limit": {
            "description": "The maximum replicas per new endpoint for this project's organization. Returned on Get Project.",
            "minimum": 1,
            "type": "integer"
          },
          "id": {
            "examples": [
              "prj_01jd3v7k8m0000000000000000"
            ],
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organization_id": {
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/ProjectRole",
            "description": "The caller's effective role on this project (for an API key, the key's)."
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "name",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "ProjectRole": {
        "description": "Project roles. `viewer`: read the project and its resources; never\nchanges anything or spends money. `member`: also create, delete and\nuse resources, and create API keys (revoking their own). `admin`:\nalso revoke any key, manage the project's members, and rename or\ndelete the project.\n",
        "enum": [
          "admin",
          "member",
          "viewer"
        ],
        "type": "string"
      },
      "Region": {
        "properties": {
          "code": {
            "examples": [
              "us-ohio-1"
            ],
            "type": "string"
          },
          "enabled": {
            "description": "Whether new resources can be created in the region.",
            "type": "boolean"
          },
          "id": {
            "examples": [
              "rgn_01jd3v7k8m0000000000000000"
            ],
            "type": "string"
          },
          "name": {
            "examples": [
              "US Ohio 1"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "code",
          "name",
          "enabled"
        ],
        "type": "object"
      },
      "RegionList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Region"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "SSHKey": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "fingerprint": {
            "description": "SHA256 fingerprint, as `ssh-keygen -l` prints it.",
            "examples": [
              "SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8"
            ],
            "type": "string"
          },
          "id": {
            "examples": [
              "ssh_01jd3v7k8m0000000000000000"
            ],
            "type": "string"
          },
          "name": {
            "$ref": "#/components/schemas/Slug"
          },
          "project_id": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "name",
          "public_key",
          "fingerprint",
          "created_at"
        ],
        "type": "object"
      },
      "SSHKeyList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SSHKey"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "Slug": {
        "description": "Lowercase letters, digits and hyphens; starts with a letter; unique within its parent.",
        "examples": [
          "chat-prod"
        ],
        "pattern": "^[a-z][a-z0-9-]{0,62}$",
        "type": "string"
      },
      "Subnet": {
        "properties": {
          "cidr": {
            "examples": [
              "10.0.1.0/24"
            ],
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "gateway_ip": {
            "examples": [
              "10.0.1.1"
            ],
            "type": "string"
          },
          "id": {
            "examples": [
              "snet_01jd3v7k8m0000000000000000"
            ],
            "type": "string"
          },
          "name": {
            "$ref": "#/components/schemas/Slug"
          },
          "network_id": {
            "type": "string"
          },
          "project_id": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "network_id",
          "name",
          "cidr",
          "gateway_ip",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "SubnetList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Subnet"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "description": "A Tachora API key scoped to a project.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Manage compute instances, networks, and SSH keys in a Tachora project.",
    "title": "Tachora Compute API",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/images": {
      "get": {
        "operationId": "listImages",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageList"
                }
              }
            },
            "description": "Every image an instance can boot from."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          }
        },
        "summary": "List images",
        "tags": [
          "Catalog"
        ]
      }
    },
    "/v1/instance-types": {
      "get": {
        "operationId": "listInstanceTypes",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceTypeList"
                }
              }
            },
            "description": "Every instance type."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          }
        },
        "summary": "List instance types",
        "tags": [
          "Catalog"
        ]
      }
    },
    "/v1/instances/{instance_id}": {
      "delete": {
        "description": "Moves the instance to `deleting` and starts an `instance.delete`\noperation. Deleting an instance that is already `deleting` returns\nthe existing operation. Once it succeeds the instance is gone (`404`).\n",
        "operationId": "deleteInstance",
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceWithOperation"
                }
              }
            },
            "description": "Accepted; deletion has started."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "summary": "Delete instance",
        "tags": [
          "Instances"
        ]
      },
      "get": {
        "operationId": "getInstance",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Instance"
                }
              }
            },
            "description": "The instance."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "summary": "Get instance",
        "tags": [
          "Instances"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/InstanceId"
        }
      ]
    },
    "/v1/instances/{instance_id}/console-output": {
      "get": {
        "operationId": "getInstanceConsoleOutput",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsoleOutput"
                }
              }
            },
            "description": "The most recent serial console output."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "summary": "Get instance console output",
        "tags": [
          "Instances"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/InstanceId"
        }
      ]
    },
    "/v1/instances/{instance_id}/start": {
      "parameters": [
        {
          "$ref": "#/components/parameters/InstanceId"
        }
      ],
      "post": {
        "description": "Sets `desired_power` to `running` and starts an `instance.start` operation.",
        "operationId": "startInstance",
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceWithOperation"
                }
              }
            },
            "description": "Accepted."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        },
        "summary": "Start instance",
        "tags": [
          "Instances"
        ]
      }
    },
    "/v1/instances/{instance_id}/stop": {
      "parameters": [
        {
          "$ref": "#/components/parameters/InstanceId"
        }
      ],
      "post": {
        "description": "Sets `desired_power` to `stopped` and starts an `instance.stop`\noperation. A stopped instance keeps its capacity and address.\n",
        "operationId": "stopInstance",
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceWithOperation"
                }
              }
            },
            "description": "Accepted."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        },
        "summary": "Stop instance",
        "tags": [
          "Instances"
        ]
      }
    },
    "/v1/networks/{network_id}": {
      "delete": {
        "description": "Fails with `409 resource_in_use` while the network has subnets.",
        "operationId": "deleteNetwork",
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceInUse"
          }
        },
        "summary": "Delete network",
        "tags": [
          "Networks"
        ]
      },
      "get": {
        "operationId": "getNetwork",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Network"
                }
              }
            },
            "description": "The network."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "summary": "Get network",
        "tags": [
          "Networks"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/NetworkId"
        }
      ]
    },
    "/v1/networks/{network_id}/subnets": {
      "get": {
        "operationId": "listSubnets",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubnetList"
                }
              }
            },
            "description": "A page of the network's subnets."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "summary": "List subnets",
        "tags": [
          "Subnets"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/NetworkId"
        }
      ],
      "post": {
        "description": "The CIDR must lie inside the network's and must not overlap another\nsubnet of the network (`400 invalid_argument`).\n",
        "operationId": "createSubnet",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSubnetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subnet"
                }
              }
            },
            "description": "The subnet was created."
          },
          "400": {
            "$ref": "#/components/responses/InvalidArgument"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyKeyReused"
          }
        },
        "summary": "Create subnet",
        "tags": [
          "Subnets"
        ]
      }
    },
    "/v1/operations/{operation_id}": {
      "get": {
        "operationId": "getOperation",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            },
            "description": "The operation."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "summary": "Get operation",
        "tags": [
          "Operations"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/OperationId"
        }
      ]
    },
    "/v1/projects/{project_id}": {
      "get": {
        "operationId": "getProject",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": "The project."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "summary": "Get project",
        "tags": [
          "Projects"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        }
      ]
    },
    "/v1/projects/{project_id}/instances": {
      "get": {
        "operationId": "listInstances",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceList"
                }
              }
            },
            "description": "A page of instances (deleted instances are not listed)."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "summary": "List instances",
        "tags": [
          "Instances"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        }
      ],
      "post": {
        "description": "Places the instance synchronously: if no capacity in the region fits\nthe instance type, the call fails with `409 insufficient_capacity`\nand nothing is created. Otherwise it records the instance in\n`provisioning` state, assigns its private address from the subnet,\nand starts an `instance.create` operation. Booting is asynchronous.\n",
        "operationId": "createInstance",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInstanceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceWithOperation"
                }
              }
            },
            "description": "Accepted; the instance is placed and booting."
          },
          "400": {
            "$ref": "#/components/responses/InvalidArgument"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/InstanceConflict"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyKeyReused"
          }
        },
        "summary": "Create instance",
        "tags": [
          "Instances"
        ]
      }
    },
    "/v1/projects/{project_id}/networks": {
      "get": {
        "operationId": "listNetworks",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetworkList"
                }
              }
            },
            "description": "A page of networks."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "summary": "List networks",
        "tags": [
          "Networks"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        }
      ],
      "post": {
        "operationId": "createNetwork",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateNetworkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Network"
                }
              }
            },
            "description": "The network was created."
          },
          "400": {
            "$ref": "#/components/responses/InvalidArgument"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyKeyReused"
          }
        },
        "summary": "Create network",
        "tags": [
          "Networks"
        ]
      }
    },
    "/v1/projects/{project_id}/operations": {
      "get": {
        "operationId": "listOperations",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "description": "Only operations on this resource.",
            "in": "query",
            "name": "resource_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationList"
                }
              }
            },
            "description": "A page of operations."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "summary": "List operations",
        "tags": [
          "Operations"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        }
      ]
    },
    "/v1/projects/{project_id}/ssh-keys": {
      "get": {
        "operationId": "listSSHKeys",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSHKeyList"
                }
              }
            },
            "description": "A page of SSH keys."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "summary": "List SSH keys",
        "tags": [
          "SSH keys"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        }
      ],
      "post": {
        "operationId": "createSSHKey",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSSHKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSHKey"
                }
              }
            },
            "description": "The key was added."
          },
          "400": {
            "$ref": "#/components/responses/InvalidArgument"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyKeyReused"
          }
        },
        "summary": "Create SSH key",
        "tags": [
          "SSH keys"
        ]
      }
    },
    "/v1/regions": {
      "get": {
        "operationId": "listRegions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegionList"
                }
              }
            },
            "description": "Every region, enabled or not."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          }
        },
        "summary": "List regions",
        "tags": [
          "Catalog"
        ]
      }
    },
    "/v1/ssh-keys/{ssh_key_id}": {
      "delete": {
        "description": "Fails with `409 resource_in_use` while an instance uses the key.",
        "operationId": "deleteSSHKey",
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceInUse"
          }
        },
        "summary": "Delete SSH key",
        "tags": [
          "SSH keys"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/SSHKeyId"
        }
      ]
    },
    "/v1/subnets/{subnet_id}": {
      "delete": {
        "description": "Fails with `409 resource_in_use` while an instance is attached to the subnet.",
        "operationId": "deleteSubnet",
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceInUse"
          }
        },
        "summary": "Delete subnet",
        "tags": [
          "Subnets"
        ]
      },
      "get": {
        "operationId": "getSubnet",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subnet"
                }
              }
            },
            "description": "The subnet."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "summary": "Get subnet",
        "tags": [
          "Subnets"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/SubnetId"
        }
      ]
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.tachora.ai"
    }
  ],
  "tags": [
    {
      "name": "Projects"
    },
    {
      "name": "Catalog"
    },
    {
      "name": "SSH keys"
    },
    {
      "name": "Networks"
    },
    {
      "name": "Subnets"
    },
    {
      "name": "Instances"
    },
    {
      "name": "Operations"
    }
  ]
}
