{
  "openapi": "3.0.3",
  "info": {
    "title": "Polymath API",
    "description": "Use the Polymath API to find vehicles, check their state, and send commands.",
    "termsOfService": "https://www.polymathrobotics.com/legal/terms-of-service",
    "contact": {
      "name": "Polymath Support",
      "url": "https://www.polymathrobotics.com",
      "email": "api@polymathrobotics.com"
    },
    "license": {
      "name": "All rights reserved",
      "url": "https://www.polymathrobotics.com/legal/privacy-policy"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.polymathrobotics.dev",
      "description": "Polymath API"
    }
  ],
  "security": [
    {
      "HTTPBearer": []
    }
  ],
  "tags": [
    {
      "name": "Health Check",
      "description": "Contains UUID endpoint that can be used to health check the robot"
    },
    {
      "name": "Vehicle Autonomy",
      "description": "All endpoints related to interacting with Robot's autonomy operations here"
    },
    {
      "name": "Vehicle Operations",
      "description": "All endpoints related to interacting with Robot's vehicle operations here"
    },
    {
      "name": "Vehicles",
      "description": "Find vehicles your API client can access."
    },
    {
      "name": "Power",
      "description": "Check a vehicle's power state and request power changes."
    },
    {
      "name": "Media",
      "description": "All endpoints related to interacting with Robot's media resources"
    },
    {
      "name": "Teleop Control",
      "description": "Endpoints for managing control leases"
    }
  ],
  "paths": {
    "/v2/version": {
      "get": {
        "tags": [
          "Health Check"
        ],
        "summary": "Get the version of the Polymath system",
        "description": "Returns the current Polymath Synapse and polymath_core commit SHAs.",
        "operationId": "get_version",
        "responses": {
          "200": {
            "description": "Polymath Synapse and polymath_core commit SHAs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/health": {
      "get": {
        "tags": [
          "Health Check"
        ],
        "summary": "Health check endpoint",
        "description": "Returns a basic self health status response. This endpoint is used to verify that the Polymath Synapse API is running and responsive.",
        "operationId": "get_health",
        "responses": {
          "200": {
            "description": "Health status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthStatusResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/uuid": {
      "get": {
        "tags": [
          "Health Check"
        ],
        "summary": "Get the UUID of the Polymath system",
        "description": "Returns the device UUID derived from its MAC address. Deprecated; use `/health`.",
        "operationId": "get_device_uuid",
        "responses": {
          "200": {
            "description": "Device UUID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UUIDResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true,
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/polymath-feedback": {
      "get": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Get the combined Autonomy, Navigation and Vehicle feedback from the Polymath system",
        "description": "Returns combined autonomy, navigation, and vehicle feedback from the Polymath system.",
        "operationId": "polymath_feedback",
        "responses": {
          "200": {
            "description": "Combined autonomy, navigation, and vehicle feedback.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolymathFeedbackResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/costmap/boundary": {
      "get": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Get global costmap boundary coordinates",
        "description": "Returns the latest latitude/longitude coordinates for the four corners of the global costmap boundary.",
        "operationId": "costmap_boundary",
        "responses": {
          "200": {
            "description": "Costmap boundary corner coordinates.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CostmapBoundaryResponse"
                }
              }
            }
          },
          "404": {
            "description": "Costmap boundary data unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/navigation-path-options": {
      "get": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Get the available Navigation Path Options and associated Parameters",
        "description": "Returns available navigation path options and configurable parameters.",
        "operationId": "navigation_path_options",
        "responses": {
          "200": {
            "description": "Available navigation path options and parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PathLogicOptionResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/vehicle-commands": {
      "get": {
        "tags": [
          "Vehicle Operations"
        ],
        "summary": "Get the available Vehicle Commands and associated Parameters",
        "description": "Returns available vehicle command options and configurable parameters.",
        "operationId": "vehicle_commands",
        "responses": {
          "200": {
            "description": "Available vehicle command options and parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VehicleCommandOptionResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/motion-commands": {
      "get": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Get the available motion commands",
        "description": "Returns available motion commands that can be sent to the Polymath system.",
        "operationId": "get_nav_cmds",
        "responses": {
          "200": {
            "description": "Available motion command names and numeric alternatives.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionCommandListResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/reference-targets": {
      "get": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Get all previously set reference targets",
        "description": "Returns all previously set reference targets.",
        "operationId": "reference_targets",
        "responses": {
          "200": {
            "description": "All previously set reference targets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferenceTargetsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      },
      "post": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Set the location and details of a reference location or an object",
        "description": "Sets one or more reference targets for relative navigation. Each target may include optional `time_validity` and `recorded_speed_m_s` metadata. Use `POST /relative-waypoints` to send waypoints relative to these targets.",
        "operationId": "set_reference_targets",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReferenceTargetsModel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Sent reference targets and upstream service response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferenceTargetSetResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/reference-targets/current-location": {
      "post": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Set a reference target at the current robot location",
        "description": "Creates a `previous_location` reference target from the robot's current GPS pose for subsequent relative navigation.",
        "operationId": "set_reference_target_current_location",
        "responses": {
          "200": {
            "description": "Generated current-location reference target and upstream service response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferenceTargetSetResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/gps-waypoints": {
      "post": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Send a set of gps waypoints to the robot",
        "description": "Sends GPS waypoints and navigation options to the robot.",
        "operationId": "gps_waypoints",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GPSWaypoints"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Sent GPS waypoints and upstream service response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GPSWaypointTransmissionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/relative-waypoints": {
      "post": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Send a set of relative waypoints to the robot",
        "description": "Sends relative waypoints and navigation options to the robot.",
        "operationId": "relative_waypoints",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RelativeWaypoints"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Sent relative waypoints and upstream service response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelativeWaypointTransmissionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/motion-command": {
      "post": {
        "tags": [
          "Vehicle Autonomy"
        ],
        "summary": "Send a motion command to the robot to change its current state",
        "description": "Sends a motion command to change the robot motion state. Supported commands: `STOP` (0), `PAUSE` (1), and `RESUME` (2).",
        "operationId": "nav_cmd",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MotionCommandAction"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Motion command execution response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionCommandExecutionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/vehicle-command": {
      "post": {
        "tags": [
          "Vehicle Operations"
        ],
        "summary": "Send a vehicle command to the robot",
        "description": "Sends a vehicle command to the robot.",
        "operationId": "vehicle_command",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VehicleCommandAction"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Sent vehicle command and upstream service response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VehicleCommandResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/media/streams": {
      "get": {
        "tags": [
          "Media"
        ],
        "summary": "List Media Devices",
        "operationId": "list_media_devices",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response List Media Devices V2 Media Streams Get",
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/BaseStream"
                      },
                      {
                        "$ref": "#/components/schemas/BaseStream"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/livekit/config": {
      "get": {
        "tags": [
          "Livekit"
        ],
        "summary": "Get LiveKit discovery configuration",
        "description": "Returns the configured discovery values and effective LiveKit URL.",
        "operationId": "get_livekit_config",
        "responses": {
          "200": {
            "description": "Effective LiveKit discovery values.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LivekitConfigResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/livekit/token": {
      "post": {
        "tags": [
          "Livekit"
        ],
        "summary": "Generate a Livekit access token",
        "description": "Generates a LiveKit access token for the specified identity and room.",
        "operationId": "generate_livekit_token",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Identity",
              "type": "string"
            },
            "name": "identity",
            "in": "query"
          },
          {
            "required": true,
            "schema": {
              "title": "Room Name",
              "type": "string"
            },
            "name": "room_name",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Generated LiveKit access token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LivekitTokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Failed to generate token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPExceptionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/livekit/room": {
      "get": {
        "tags": [
          "Livekit"
        ],
        "summary": "Get the current status of the room",
        "description": "Returns the current LiveKit room status.",
        "operationId": "get_room",
        "responses": {
          "200": {
            "description": "Current LiveKit room status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LivekitRoomResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      },
      "post": {
        "tags": [
          "Livekit"
        ],
        "summary": "Create a livekit room on this robot",
        "description": "Connects this robot to the specified LiveKit room.",
        "operationId": "create_room",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Room Name",
              "type": "string"
            },
            "name": "room_name",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Room status after connecting to LiveKit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LivekitRoomResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid room request (for example, empty or invalid room name)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPExceptionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Failed to connect to the room",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPExceptionResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "Livekit"
        ],
        "summary": "Disconnect from the current room",
        "description": "Disconnects this robot from the current LiveKit room.",
        "operationId": "delete_room",
        "responses": {
          "200": {
            "description": "Room status after disconnecting from LiveKit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LivekitRoomResponse"
                }
              }
            }
          },
          "500": {
            "description": "Failed to disconnect the room",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPExceptionResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/livekit/room/track": {
      "post": {
        "tags": [
          "Livekit"
        ],
        "summary": "Create a track on the current room",
        "description": "Creates and publishes a track in the current LiveKit room.",
        "operationId": "create_track",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Fps",
              "type": "integer",
              "default": 30
            },
            "name": "fps",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/CodecEnum"
                }
              ],
              "default": "H264"
            },
            "name": "codec",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/MediaTypeEnum"
                }
              ],
              "default": "media_device"
            },
            "name": "media_type",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Stream Path",
              "type": "string"
            },
            "name": "stream_path",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Use Experimental Reader",
              "type": "boolean",
              "default": false
            },
            "name": "use_experimental_reader",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Width",
              "type": "integer"
            },
            "name": "width",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Height",
              "type": "integer"
            },
            "name": "height",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Max Bitrate Kbps",
              "type": "integer"
            },
            "name": "max_bitrate_kbps",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Room status after track creation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LivekitRoomResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid track request (for example, no room, invalid configuration, or duplicate track name)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPExceptionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Failed to publish track",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPExceptionResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "Livekit"
        ],
        "summary": "Delete a track from the current room",
        "description": "Deletes a track from the current LiveKit room.",
        "operationId": "delete_track",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Room status after track deletion.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LivekitRoomResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid track delete request (for example, no room or track does not exist)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPExceptionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Failed to delete track",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPExceptionResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/canbus/interfaces": {
      "get": {
        "tags": [
          "CANBus"
        ],
        "summary": "Get the list of available CAN interfaces on the system",
        "description": "Returns available CAN interfaces on the system.",
        "operationId": "get_can_interfaces",
        "responses": {
          "200": {
            "description": "Available CAN interfaces.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanInterfaceListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Failed to retrieve CAN interfaces",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/teleop-control/acquire": {
      "post": {
        "tags": [
          "Teleop Control"
        ],
        "summary": "Acquire control lease granting exclusive access to teleop",
        "description": "Acquire control lease if none exists or has expired.",
        "operationId": "acquire_lease",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ControlResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Lease is unavailable or not held by the requesting user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/teleop-control/renew": {
      "post": {
        "tags": [
          "Teleop Control"
        ],
        "summary": "Renew existing control lease",
        "description": "Renew an existing lease. Only the current lease holder can renew.",
        "operationId": "renew_lease",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ControlResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Lease is unavailable or not held by the requesting user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/teleop-control/release": {
      "post": {
        "tags": [
          "Teleop Control"
        ],
        "summary": "Release the current control lease",
        "description": "Explicitly release the current lease.",
        "operationId": "release_lease",
        "parameters": [
          {
            "description": "If true, release the lease regardless of who holds it. Requires valid bearer token; no additional admin validation exists.",
            "required": false,
            "schema": {
              "title": "Force",
              "type": "boolean",
              "description": "If true, release the lease regardless of who holds it. Requires valid bearer token; no additional admin validation exists.",
              "default": false
            },
            "name": "force",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ControlResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Lease is unavailable or not held by the requesting user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/teleop-control/transfer": {
      "post": {
        "tags": [
          "Teleop Control"
        ],
        "summary": "Transfer control lease to another user",
        "description": "Transfer the lease to another user. Only the current lease holder can transfer.",
        "operationId": "transfer_lease",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferLeaseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ControlResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Lease is unavailable or not held by the requesting user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/teleop-control/status": {
      "get": {
        "tags": [
          "Teleop Control"
        ],
        "summary": "Get current control lease status",
        "description": "Get current lease status and lease holder identity.",
        "operationId": "get_lease_status",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ControlResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/systemd/{path}": {
      "get": {
        "tags": [
          "systemd"
        ],
        "summary": "Proxy Systemd Request",
        "description": "Reverse proxy for Polymath systemd API requests. Please refer to the API documentation for details on available endpoints.\n\nForwards all requests under /v2/systemd/* to the systemd API service\nat POLYMATH_SYSTEMD_API_IP:POLYMATH_SYSTEMD_API_PORT.\n\nE.g. to list user services, send a GET request to: `/v2/systemd/list/user`",
        "operationId": "proxy_systemd_request",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Path",
              "type": "string"
            },
            "name": "path",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      },
      "post": {
        "tags": [
          "systemd"
        ],
        "summary": "Proxy Systemd Request",
        "description": "Reverse proxy for Polymath systemd API requests. Please refer to the API documentation for details on available endpoints.\n\nForwards all requests under /v2/systemd/* to the systemd API service\nat POLYMATH_SYSTEMD_API_IP:POLYMATH_SYSTEMD_API_PORT.\n\nE.g. to list user services, send a GET request to: `/v2/systemd/list/user`",
        "operationId": "proxy_systemd_request",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Path",
              "type": "string"
            },
            "name": "path",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/fs/health": {
      "get": {
        "tags": [
          "filesystem",
          "filesystem"
        ],
        "summary": "Health check for dufs service",
        "description": "Checks whether the dufs service is reachable. Always returns HTTP 200 and reports health in the response body.",
        "operationId": "health_check",
        "responses": {
          "200": {
            "description": "Service health status (healthy or degraded)",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/fs/recursive-list": {
      "get": {
        "tags": [
          "filesystem",
          "filesystem"
        ],
        "summary": "List files and directories recursively",
        "description": "Returns a recursive file and directory tree from the robot data directory.",
        "operationId": "list_files_and_directories",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Depth",
              "type": "integer",
              "default": 5
            },
            "name": "depth",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Path",
              "type": "string",
              "default": "/"
            },
            "name": "path",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List of files and directories",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          },
          "503": {
            "description": "Service unavailable"
          },
          "504": {
            "description": "Request timed out"
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/fs/{path}": {
      "get": {
        "tags": [
          "filesystem",
          "filesystem"
        ],
        "summary": "Get file or directory",
        "description": "Returns file content or a directory listing from the robot data directory. Use `?zip` to download a zip archive. Use `?json` for directory listings in JSON format.",
        "operationId": "get_file_or_directory",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Path",
              "type": "string"
            },
            "name": "path",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "File content or directory listing",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "404": {
            "description": "File or directory not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          },
          "503": {
            "description": "Service unavailable"
          },
          "504": {
            "description": "Request timed out"
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "filesystem",
          "filesystem"
        ],
        "summary": "Delete file or directory",
        "description": "Deletes a file or directory from the robot data directory.",
        "operationId": "delete_file_or_directory",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Path",
              "type": "string"
            },
            "name": "path",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "204": {
            "description": "File or directory deleted successfully"
          },
          "404": {
            "description": "File or directory not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          },
          "503": {
            "description": "Service unavailable"
          },
          "504": {
            "description": "Request timed out"
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/ros/{path}": {
      "get": {
        "tags": [
          "ros"
        ],
        "summary": "Proxy Systemd Request",
        "description": "Reverse proxy for RESTful ROS2 API requests. Please refer to the API documentation for details on available endpoints.",
        "operationId": "proxy_systemd_request",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Path",
              "type": "string"
            },
            "name": "path",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      },
      "post": {
        "tags": [
          "ros"
        ],
        "summary": "Proxy Systemd Request",
        "description": "Reverse proxy for RESTful ROS2 API requests. Please refer to the API documentation for details on available endpoints.",
        "operationId": "proxy_systemd_request",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Path",
              "type": "string"
            },
            "name": "path",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/routes/{name}": {
      "get": {
        "tags": [
          "World Model"
        ],
        "summary": "Read a named route in full",
        "operationId": "read_route",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadRouteGraphResponse"
                }
              }
            }
          },
          "404": {
            "description": "Route not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      },
      "put": {
        "tags": [
          "World Model"
        ],
        "summary": "Update existing route",
        "description": "Updates an existing route with this name by replacing the entire route.",
        "operationId": "update_route",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WriteRouteGraphRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteRouteGraphResponse"
                }
              }
            }
          },
          "400": {
            "description": "Route failed server-side validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Route to update was not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Request body failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      },
      "post": {
        "tags": [
          "World Model"
        ],
        "summary": "Create a route",
        "description": "Creates a new route. The route is validated and written as a single whole artifact.",
        "operationId": "create_route",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WriteRouteGraphRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Confirmation that the route was created or updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteRouteGraphResponse"
                }
              }
            }
          },
          "400": {
            "description": "Route failed server-side validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Route to update was not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "A route with this name already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Request body failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "World Model"
        ],
        "summary": "Delete a named route",
        "description": "Deletes the route with the given name.",
        "operationId": "delete_route",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelSuccessResponse"
                }
              }
            }
          },
          "404": {
            "description": "Route not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/routes": {
      "get": {
        "tags": [
          "World Model"
        ],
        "summary": "List all routes on the vehicle",
        "operationId": "list_routes",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListRoutesResponse"
                }
              }
            }
          },
          "404": {
            "description": "No routes found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/loaded_route": {
      "get": {
        "tags": [
          "World Model"
        ],
        "summary": "Read the currently loaded route",
        "operationId": "read_loaded_route",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadRouteGraphResponse"
                }
              }
            }
          },
          "404": {
            "description": "No route is currently loaded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v2/routes/{name}/load": {
      "post": {
        "tags": [
          "World Model"
        ],
        "summary": "Load a route for navigation",
        "description": "Loads the named route for navigation.",
        "operationId": "load_route",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            },
            "name": "name",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelSuccessResponse"
                }
              }
            }
          },
          "404": {
            "description": "Route not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldModelErrorResponse"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://polyglot.polymathrobotics.dev/api/synapse/{vehicleId}",
            "description": "Polymath API",
            "variables": {
              "vehicleId": {
                "default": "your_vehicle_id",
                "description": "Vehicle ID issued by Polymath"
              }
            }
          }
        ]
      }
    },
    "/v1/vehicles": {
      "get": {
        "tags": [
          "Vehicles"
        ],
        "summary": "List vehicles",
        "description": "Lists the vehicles your API client can access and shows whether each vehicle is connected to the Polymath VPN.",
        "operationId": "list_vehicles",
        "responses": {
          "200": {
            "description": "The vehicles your API client can access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VehiclesResponse"
                },
                "example": {
                  "status": "success",
                  "data": [
                    {
                      "id": "your_vehicle_id",
                      "ipAddress": "100.64.0.1",
                      "vpnConnected": true
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/v1/vehicles/{vehicleId}/power/status": {
      "get": {
        "tags": [
          "Power"
        ],
        "summary": "Get vehicle power status",
        "description": "Returns the vehicle's most recently reported power state and any pending power command.",
        "operationId": "get_vehicle_power_status",
        "parameters": [
          {
            "$ref": "#/components/parameters/VehicleId"
          }
        ],
        "responses": {
          "200": {
            "description": "The vehicle's most recently reported power state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PowerStatusResponse"
                },
                "example": {
                  "status": "success",
                  "data": {
                    "state": "on",
                    "pendingCommand": null,
                    "updatedAt": "2026-06-29T12:00:00.000Z"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/VehicleNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/GatewayTimeout"
          }
        }
      }
    },
    "/v1/vehicles/{vehicleId}/power/on": {
      "post": {
        "tags": [
          "Power"
        ],
        "summary": "Request vehicle power on",
        "description": "Requests that the vehicle turn on. Send this request without a body. A `202 Accepted` response means Polymath accepted the command, but the vehicle may still be off. Poll the power status endpoint until the vehicle is `on` and no command is pending.",
        "operationId": "request_vehicle_power_on",
        "parameters": [
          {
            "$ref": "#/components/parameters/VehicleId"
          }
        ],
        "responses": {
          "202": {
            "$ref": "#/components/responses/CommandAccepted"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/VehicleNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/GatewayTimeout"
          }
        }
      }
    },
    "/v1/vehicles/{vehicleId}/power/off": {
      "post": {
        "tags": [
          "Power"
        ],
        "summary": "Request vehicle power off",
        "description": "Requests that the vehicle turn off. Send this request without a body. A `202 Accepted` response means Polymath accepted the command, but the vehicle may still be on. Poll the power status endpoint until the vehicle is `off` and no command is pending.",
        "operationId": "request_vehicle_power_off",
        "parameters": [
          {
            "$ref": "#/components/parameters/VehicleId"
          }
        ],
        "responses": {
          "202": {
            "$ref": "#/components/responses/CommandAccepted"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/VehicleNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/GatewayTimeout"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BaseStream": {
        "title": "BaseStream",
        "required": [
          "media_type"
        ],
        "type": "object",
        "properties": {
          "media_type": {
            "$ref": "#/components/schemas/MediaTypeEnum"
          },
          "data": {
            "title": "Data"
          }
        },
        "description": "Abstract base class for generic types.\n\nOn Python 3.12 and newer, generic classes implicitly inherit from\nGeneric when they declare a parameter list after the class's name::\n\n    class Mapping[KT, VT]:\n        def __getitem__(self, key: KT) -> VT:\n            ...\n        # Etc.\n\nOn older versions of Python, however, generic classes have to\nexplicitly inherit from Generic.\n\nAfter a class has been declared to be generic, it can then be used as\nfollows::\n\n    def lookup_name[KT, VT](mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:\n        try:\n            return mapping[key]\n        except KeyError:\n            return default"
      },
      "CanInterfaceListResponse": {
        "title": "CanInterfaceListResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "title": "Data",
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "CodecEnum": {
        "title": "CodecEnum",
        "enum": [
          "VP8",
          "H264",
          "AV1",
          "VP9"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "CommandMode": {
        "title": "CommandMode",
        "enum": [
          0,
          1
        ],
        "description": "An enumeration."
      },
      "ControlLease": {
        "title": "ControlLease",
        "type": "object",
        "properties": {
          "holder_id": {
            "title": "Holder Id",
            "type": "string"
          },
          "expires_at": {
            "title": "Expires At",
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ControlResponse": {
        "title": "ControlResponse",
        "required": [
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "success"
            ],
            "type": "string",
            "description": "JSend status",
            "default": "success"
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "Human readable message"
          },
          "data": {
            "title": "Data",
            "allOf": [
              {
                "$ref": "#/components/schemas/ControlLease"
              }
            ],
            "description": "Current lease data"
          }
        },
        "description": "Model for successful responses in the control API"
      },
      "CortexNavigationOptions": {
        "title": "CortexNavigationOptions",
        "type": "object",
        "properties": {
          "path_option": {
            "title": "Path Option",
            "allOf": [
              {
                "$ref": "#/components/schemas/CortexOption"
              }
            ],
            "description": "Navigation path logic option to set. See the GET /navigation-path-options endpoint for the available path options and their parameters.",
            "example": {
              "name": "target_follower",
              "params": [
                {
                  "key": "speed",
                  "value": "0.5"
                }
              ]
            }
          },
          "mode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CommandMode"
              }
            ],
            "description": "Mode of execution of previous and current waypoints. Available options: 'ADD','PREEMPT'. ADD or 0: Add a new waypoint to existing queue of waypoints, PREEMPT or 1: Delete the existing queue and adds the new waypoint.",
            "default": 0,
            "example": "ADD"
          }
        }
      },
      "CortexOption": {
        "title": "CortexOption",
        "required": [
          "name",
          "params"
        ],
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "params": {
            "title": "Params",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KeyValuePair"
            }
          }
        }
      },
      "CortexStatus": {
        "title": "CortexStatus",
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/CortexStatusEnum"
          },
          "status_text": {
            "title": "Status Text",
            "type": "string",
            "default": ""
          },
          "description": {
            "title": "Description",
            "type": "string"
          }
        }
      },
      "CortexStatusEnum": {
        "title": "CortexStatusEnum",
        "enum": [
          0,
          1,
          2,
          3,
          4
        ],
        "description": "An enumeration."
      },
      "CostmapBoundaryResponse": {
        "title": "CostmapBoundaryResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/GeofenceBoundary"
          }
        }
      },
      "ErrorDetails": {
        "title": "ErrorDetails",
        "required": [
          "details"
        ],
        "type": "object",
        "properties": {
          "details": {
            "title": "Details",
            "type": "string"
          }
        }
      },
      "ErrorResponse": {
        "title": "ErrorResponse",
        "required": [
          "status",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "error"
            ],
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "error": {
            "$ref": "#/components/schemas/ErrorDetails"
          }
        }
      },
      "GPSWaypointTransmissionData": {
        "title": "GPSWaypointTransmissionData",
        "required": [
          "sent"
        ],
        "type": "object",
        "properties": {
          "sent": {
            "$ref": "#/components/schemas/GPSWaypoints"
          },
          "received": {
            "title": "Received"
          }
        }
      },
      "GPSWaypointTransmissionResponse": {
        "title": "GPSWaypointTransmissionResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/GPSWaypointTransmissionData"
          }
        }
      },
      "GPSWaypoints": {
        "title": "GPSWaypoints",
        "required": [
          "goals"
        ],
        "type": "object",
        "properties": {
          "timestamp_utc": {
            "title": "Timestamp Utc",
            "type": "string",
            "description": "Timestamp in UTC ISO format. Should be provided in ISO 8601 format: 'YYYY-MM-DDTHH:MM:SSZ'. If not provided, it will default to the current UTC time.",
            "default": ""
          },
          "goals": {
            "title": "Goals",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoalPoses"
            },
            "description": "Ordered list of GPS waypoints. When multiple waypoints are provided, the robot navigates through them continuously as a single path rather than stopping discretely at each one."
          },
          "navigation_options": {
            "title": "Navigation Options",
            "allOf": [
              {
                "$ref": "#/components/schemas/CortexNavigationOptions"
              }
            ],
            "description": "Optional navigation options for this command, including the path logic option and execution mode. See the GET /navigation-path-options endpoint for the available path options and their parameters."
          }
        }
      },
      "GeoPoint": {
        "title": "GeoPoint",
        "required": [
          "lat",
          "lon"
        ],
        "type": "object",
        "properties": {
          "lat": {
            "title": "Lat",
            "type": "number",
            "description": "Latitude"
          },
          "lon": {
            "title": "Lon",
            "type": "number",
            "description": "Longitude"
          },
          "altitude": {
            "title": "Altitude",
            "type": "number",
            "description": "Altitude (meters)"
          },
          "yaw": {
            "title": "Yaw",
            "type": "number",
            "description": "Yaw (radians). Robot body frame: x forward, y left, z up; positive yaw is counter-clockwise."
          }
        }
      },
      "GeofenceBoundary": {
        "title": "GeofenceBoundary",
        "required": [
          "bottom_left",
          "bottom_right",
          "top_left",
          "top_right"
        ],
        "type": "object",
        "properties": {
          "bottom_left": {
            "$ref": "#/components/schemas/NavSatFixModel"
          },
          "bottom_right": {
            "$ref": "#/components/schemas/NavSatFixModel"
          },
          "top_left": {
            "$ref": "#/components/schemas/NavSatFixModel"
          },
          "top_right": {
            "$ref": "#/components/schemas/NavSatFixModel"
          }
        }
      },
      "GoalInfo": {
        "title": "GoalInfo",
        "required": [
          "stamp"
        ],
        "type": "object",
        "properties": {
          "goal_id": {
            "$ref": "#/components/schemas/UUID"
          },
          "stamp": {
            "$ref": "#/components/schemas/Stamp"
          }
        }
      },
      "GoalPoses": {
        "title": "GoalPoses",
        "required": [
          "lat",
          "lon"
        ],
        "type": "object",
        "properties": {
          "timestamp_utc": {
            "title": "Timestamp Utc",
            "type": "string",
            "description": "Timestamp in UTC ISO format. Should be provided in ISO 8601 format: 'YYYY-MM-DDTHH:MM:SSZ'. If not provided, it will default to the current UTC time.",
            "default": ""
          },
          "lat": {
            "title": "Lat",
            "type": "number",
            "description": "Latitude"
          },
          "lon": {
            "title": "Lon",
            "type": "number",
            "description": "Longitude"
          },
          "yaw": {
            "title": "Yaw",
            "type": "number",
            "description": "Yaw (radians). 0.0 indicates east. positive yaw is counter-clockwise."
          }
        }
      },
      "HTTPExceptionResponse": {
        "title": "HTTPExceptionResponse",
        "required": [
          "detail"
        ],
        "type": "object",
        "properties": {
          "detail": {
            "title": "Detail",
            "type": "string"
          }
        },
        "description": "Response model for HTTPException errors."
      },
      "HTTPValidationError": {
        "title": "HTTPValidationError",
        "type": "object",
        "properties": {
          "detail": {
            "title": "Detail",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            }
          }
        }
      },
      "Header": {
        "title": "Header",
        "required": [
          "stamp",
          "frame_id"
        ],
        "type": "object",
        "properties": {
          "stamp": {
            "$ref": "#/components/schemas/Stamp"
          },
          "frame_id": {
            "title": "Frame Id",
            "type": "string"
          }
        }
      },
      "HealthStatusResponse": {
        "title": "HealthStatusResponse",
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          }
        }
      },
      "KeyValuePair": {
        "title": "KeyValuePair",
        "required": [
          "key",
          "value"
        ],
        "type": "object",
        "properties": {
          "key": {
            "title": "Key",
            "type": "string"
          },
          "value": {
            "title": "Value",
            "type": "string"
          }
        }
      },
      "ListRoutesResponse": {
        "title": "ListRoutesResponse",
        "required": [
          "message",
          "routes_list"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "success"
            ],
            "type": "string",
            "description": "JSend status.",
            "default": "success"
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "Human-readable message."
          },
          "routes_list": {
            "title": "Routes List",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of all saved routes available."
          }
        }
      },
      "LivekitConfigResponse": {
        "title": "LivekitConfigResponse",
        "type": "object",
        "properties": {
          "room_name": {
            "title": "Room Name",
            "type": "string"
          },
          "bridge_identity": {
            "title": "Bridge Identity",
            "type": "string"
          },
          "livekit_url": {
            "title": "Livekit Url",
            "type": "string"
          }
        },
        "description": "Response model for environment-backed LiveKit discovery configuration."
      },
      "LivekitRoomDetails": {
        "title": "LivekitRoomDetails",
        "type": "object",
        "properties": {
          "room": {
            "$ref": "#/components/schemas/LivekitRoomInfo"
          },
          "hostname": {
            "title": "Hostname",
            "type": "string"
          },
          "tracks": {
            "title": "Tracks",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LivekitTrack"
            },
            "default": []
          }
        },
        "description": "Details about the current LiveKit room state."
      },
      "LivekitRoomInfo": {
        "title": "LivekitRoomInfo",
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "description": "Information about a connected LiveKit room."
      },
      "LivekitRoomResponse": {
        "title": "LivekitRoomResponse",
        "required": [
          "alive",
          "message",
          "room"
        ],
        "type": "object",
        "properties": {
          "alive": {
            "title": "Alive",
            "type": "boolean"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "room": {
            "$ref": "#/components/schemas/LivekitRoomDetails"
          }
        },
        "description": "Response model for LiveKit room operations."
      },
      "LivekitTokenResponse": {
        "title": "LivekitTokenResponse",
        "required": [
          "token"
        ],
        "type": "object",
        "properties": {
          "token": {
            "title": "Token",
            "type": "string"
          }
        },
        "description": "Response model for LiveKit token generation."
      },
      "LivekitTrack": {
        "title": "LivekitTrack",
        "required": [
          "name",
          "codec",
          "fps",
          "media_type",
          "stream_path",
          "use_experimental_reader",
          "stats"
        ],
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "sid": {
            "title": "Sid",
            "type": "string"
          },
          "codec": {
            "$ref": "#/components/schemas/CodecEnum"
          },
          "fps": {
            "title": "Fps",
            "type": "number"
          },
          "media_type": {
            "$ref": "#/components/schemas/MediaTypeEnum"
          },
          "stream_path": {
            "title": "Stream Path",
            "type": "string"
          },
          "use_experimental_reader": {
            "title": "Use Experimental Reader",
            "type": "boolean"
          },
          "stats": {
            "$ref": "#/components/schemas/LivekitTrackStats"
          },
          "width": {
            "title": "Width",
            "type": "integer"
          },
          "height": {
            "title": "Height",
            "type": "integer"
          },
          "max_bitrate_kbps": {
            "title": "Max Bitrate Kbps",
            "type": "integer"
          }
        },
        "description": "Track information for API responses, including configuration and runtime data."
      },
      "LivekitTrackStats": {
        "title": "LivekitTrackStats",
        "type": "object",
        "properties": {
          "timestamp": {
            "title": "Timestamp",
            "type": "number",
            "default": 0
          },
          "fps": {
            "title": "Fps",
            "allOf": [
              {
                "$ref": "#/components/schemas/Metric"
              }
            ],
            "default": {
              "p50": 0,
              "p95": 0,
              "p99": 0
            }
          },
          "size_bytes": {
            "title": "Size Bytes",
            "type": "integer",
            "default": 0
          }
        }
      },
      "MapPoint": {
        "title": "MapPoint",
        "required": [
          "x",
          "y"
        ],
        "type": "object",
        "properties": {
          "x": {
            "title": "X",
            "type": "number",
            "description": "X position in the map frame (meters)."
          },
          "y": {
            "title": "Y",
            "type": "number",
            "description": "Y position in the map frame (meters)."
          }
        }
      },
      "MediaTypeEnum": {
        "title": "MediaTypeEnum",
        "enum": [
          "media_device",
          "rtsp",
          "ros",
          "gstream"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "Metric": {
        "title": "Metric",
        "required": [
          "p50",
          "p95",
          "p99"
        ],
        "type": "object",
        "properties": {
          "p50": {
            "title": "P50",
            "type": "number"
          },
          "p95": {
            "title": "P95",
            "type": "number"
          },
          "p99": {
            "title": "P99",
            "type": "number"
          }
        }
      },
      "MotionCommandAction": {
        "title": "MotionCommandAction",
        "type": "object",
        "properties": {
          "motion_command": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MotionCommandOptions"
              }
            ],
            "description": "Motion command options. STOP (0) will cancel all current and queued navigation or vehicle commands. When in STOP, no new commands will be added to the queue until resumed. PAUSE (1) will pause the current command execution, leaving remaining commands in the queue, and RESUME (2) will resume the paused waypoint execution and place the autonomy state back to IDLE if the queue is empty.",
            "default": 0
          },
          "mode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CommandMode"
              }
            ],
            "description": "Mode of execution of previous and current waypoints. Available options: 'ADD','PREEMPT'. ADD or 0: Add a new waypoint to existing queue of waypoints, PREEMPT or 1: Delete the existing queue and adds the new waypoint.",
            "default": 1,
            "example": "PREEMPT"
          }
        }
      },
      "MotionCommandExecutionData": {
        "title": "MotionCommandExecutionData",
        "type": "object",
        "properties": {
          "received": {
            "title": "Received"
          }
        }
      },
      "MotionCommandExecutionResponse": {
        "title": "MotionCommandExecutionResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/MotionCommandExecutionData"
          }
        }
      },
      "MotionCommandListResponse": {
        "title": "MotionCommandListResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "title": "Data",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MotionCommandSummary"
            }
          }
        }
      },
      "MotionCommandOptions": {
        "title": "MotionCommandOptions",
        "enum": [
          0,
          1,
          2
        ],
        "description": "An enumeration."
      },
      "MotionCommandSummary": {
        "title": "MotionCommandSummary",
        "required": [
          "motion_command",
          "alternative"
        ],
        "type": "object",
        "properties": {
          "motion_command": {
            "title": "Motion Command",
            "type": "string"
          },
          "alternative": {
            "title": "Alternative",
            "type": "integer"
          }
        }
      },
      "NavSatFixModel": {
        "title": "NavSatFixModel",
        "required": [
          "latitude",
          "longitude",
          "altitude"
        ],
        "type": "object",
        "properties": {
          "latitude": {
            "title": "Latitude",
            "type": "number"
          },
          "longitude": {
            "title": "Longitude",
            "type": "number"
          },
          "altitude": {
            "title": "Altitude",
            "type": "number"
          }
        }
      },
      "NavigationFeedback": {
        "title": "NavigationFeedback",
        "type": "object",
        "properties": {
          "nav2_goal_status": {
            "$ref": "#/components/schemas/NavigationGoalStatus"
          },
          "total_distance_remaining": {
            "title": "Total Distance Remaining",
            "type": "number",
            "description": "Total remaining distance to the goal, in meters."
          },
          "target_pose": {
            "$ref": "#/components/schemas/PoseWithHeader"
          },
          "final_pose": {
            "$ref": "#/components/schemas/PoseWithHeader"
          },
          "current_pose_index": {
            "title": "Current Pose Index",
            "type": "integer"
          },
          "number_of_poses_remaining": {
            "title": "Number Of Poses Remaining",
            "type": "integer"
          },
          "navigation_time": {
            "title": "Navigation Time",
            "allOf": [
              {
                "$ref": "#/components/schemas/Stamp"
              }
            ],
            "description": "Elapsed navigation time as a duration (seconds and nanoseconds)."
          },
          "estimated_time_remaining": {
            "title": "Estimated Time Remaining",
            "allOf": [
              {
                "$ref": "#/components/schemas/Stamp"
              }
            ],
            "description": "Estimated time remaining as a duration (seconds and nanoseconds)."
          }
        }
      },
      "NavigationGoalStatus": {
        "title": "NavigationGoalStatus",
        "required": [
          "goal_info",
          "status"
        ],
        "type": "object",
        "properties": {
          "goal_info": {
            "$ref": "#/components/schemas/GoalInfo"
          },
          "status": {
            "$ref": "#/components/schemas/Ros2ActionServerGoalStatus"
          },
          "status_text": {
            "title": "Status Text",
            "type": "string"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        }
      },
      "Orientation": {
        "title": "Orientation",
        "required": [
          "x",
          "y",
          "z",
          "w"
        ],
        "type": "object",
        "properties": {
          "x": {
            "title": "X",
            "type": "number"
          },
          "y": {
            "title": "Y",
            "type": "number"
          },
          "z": {
            "title": "Z",
            "type": "number"
          },
          "w": {
            "title": "W",
            "type": "number"
          }
        }
      },
      "PathLogicOptionResponse": {
        "title": "PathLogicOptionResponse",
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "title": "Data",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CortexOption"
            }
          }
        }
      },
      "PolymathFeedback": {
        "title": "PolymathFeedback",
        "required": [
          "navigation_feedback",
          "vehicle_feedback",
          "current_pose",
          "current_command_index",
          "number_commands_remaining"
        ],
        "type": "object",
        "properties": {
          "timestamp_utc": {
            "title": "Timestamp Utc",
            "allOf": [
              {
                "$ref": "#/components/schemas/TimeStamp"
              }
            ],
            "default": {}
          },
          "cortex_status": {
            "$ref": "#/components/schemas/CortexStatus"
          },
          "navigation_feedback": {
            "$ref": "#/components/schemas/NavigationFeedback"
          },
          "vehicle_feedback": {
            "$ref": "#/components/schemas/VehicleFeedback"
          },
          "current_pose": {
            "$ref": "#/components/schemas/PoseWithHeader"
          },
          "current_command_index": {
            "title": "Current Command Index",
            "type": "integer"
          },
          "number_commands_remaining": {
            "title": "Number Commands Remaining",
            "type": "integer"
          }
        }
      },
      "PolymathFeedbackData": {
        "title": "PolymathFeedbackData",
        "required": [
          "polymath_feedback"
        ],
        "type": "object",
        "properties": {
          "polymath_feedback": {
            "$ref": "#/components/schemas/PolymathFeedback"
          }
        }
      },
      "PolymathFeedbackResponse": {
        "title": "PolymathFeedbackResponse",
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/PolymathFeedbackData"
          }
        }
      },
      "Pose": {
        "title": "Pose",
        "required": [
          "position",
          "orientation"
        ],
        "type": "object",
        "properties": {
          "position": {
            "$ref": "#/components/schemas/Position"
          },
          "orientation": {
            "$ref": "#/components/schemas/Orientation"
          }
        }
      },
      "PoseWithHeader": {
        "title": "PoseWithHeader",
        "required": [
          "header",
          "pose"
        ],
        "type": "object",
        "properties": {
          "header": {
            "$ref": "#/components/schemas/Header"
          },
          "pose": {
            "$ref": "#/components/schemas/Pose"
          }
        }
      },
      "Position": {
        "title": "Position",
        "required": [
          "latitude",
          "longitude",
          "altitude"
        ],
        "type": "object",
        "properties": {
          "latitude": {
            "title": "Latitude",
            "type": "number"
          },
          "longitude": {
            "title": "Longitude",
            "type": "number"
          },
          "altitude": {
            "title": "Altitude",
            "type": "number"
          }
        }
      },
      "ReadRouteGraphResponse": {
        "title": "ReadRouteGraphResponse",
        "required": [
          "message",
          "route"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "success"
            ],
            "type": "string",
            "description": "JSend status.",
            "default": "success"
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "Human-readable message."
          },
          "route": {
            "title": "Route",
            "allOf": [
              {
                "$ref": "#/components/schemas/RouteGraph"
              }
            ],
            "description": "The requested route."
          }
        }
      },
      "ReferenceTarget": {
        "title": "ReferenceTarget",
        "required": [
          "pose"
        ],
        "type": "object",
        "properties": {
          "target_id": {
            "title": "Target Id",
            "type": "string",
            "description": "Unique name or ID of the reference target",
            "default": "string"
          },
          "timestamp_utc": {
            "title": "Timestamp Utc",
            "type": "string",
            "description": "Timestamp in UTC ISO format. Should be provided in ISO 8601 format: 'YYYY-MM-DDTHH:MM:SSZ'. If not provided, it will default to the current UTC time."
          },
          "pose": {
            "$ref": "#/components/schemas/GeoPoint"
          },
          "time_validity": {
            "title": "Time Validity",
            "type": "number",
            "description": "Time validity in seconds. -1 means forever.",
            "default": -1
          },
          "recorded_speed_m_s": {
            "title": "Recorded Speed M S",
            "type": "number",
            "description": "Recorded speed of the object in m/s. `None` indicates no measurement available."
          }
        }
      },
      "ReferenceTargetSetData": {
        "title": "ReferenceTargetSetData",
        "required": [
          "sent"
        ],
        "type": "object",
        "properties": {
          "sent": {
            "$ref": "#/components/schemas/ReferenceTargetsModel"
          },
          "received": {
            "title": "Received"
          }
        }
      },
      "ReferenceTargetSetResponse": {
        "title": "ReferenceTargetSetResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ReferenceTargetSetData"
          }
        }
      },
      "ReferenceTargetsModel": {
        "title": "ReferenceTargetsModel",
        "required": [
          "reference_targets"
        ],
        "type": "object",
        "properties": {
          "reference_targets": {
            "title": "Reference Targets",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceTarget"
            }
          }
        }
      },
      "ReferenceTargetsResponse": {
        "title": "ReferenceTargetsResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ReferenceTargetsModel"
          }
        }
      },
      "RelativeCommand": {
        "title": "RelativeCommand",
        "type": "object",
        "properties": {
          "timestamp_utc": {
            "title": "Timestamp Utc",
            "type": "string",
            "description": "Timestamp in UTC ISO format. Should be provided in ISO 8601 format: 'YYYY-MM-DDTHH:MM:SSZ'. If not provided, it will default to the current UTC time.",
            "default": ""
          },
          "x": {
            "title": "X",
            "type": "number",
            "description": "Offset distance in meters along the X axis.",
            "default": 0
          },
          "y": {
            "title": "Y",
            "type": "number",
            "description": "Offset distance in meters along the Y axis.",
            "default": 0
          },
          "z": {
            "title": "Z",
            "type": "number",
            "description": "Offset distance in meters along the Z axis.",
            "default": 0
          },
          "yaw": {
            "title": "Yaw",
            "type": "number",
            "description": "Yaw (radians) angular offset indicating the direction the robot should face relative to the target.",
            "default": 0
          }
        }
      },
      "RelativeWaypointTransmissionData": {
        "title": "RelativeWaypointTransmissionData",
        "required": [
          "sent"
        ],
        "type": "object",
        "properties": {
          "sent": {
            "$ref": "#/components/schemas/RelativeWaypoints"
          },
          "received": {
            "title": "Received"
          }
        }
      },
      "RelativeWaypointTransmissionResponse": {
        "title": "RelativeWaypointTransmissionResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/RelativeWaypointTransmissionData"
          }
        }
      },
      "RelativeWaypoints": {
        "title": "RelativeWaypoints",
        "required": [
          "move_to"
        ],
        "type": "object",
        "properties": {
          "relative_to": {
            "title": "Relative To",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/ReferenceTarget"
              }
            ],
            "description": "The target that waypoints are specified relative to. Accepts either a name as string or a fully specified ReferenceTarget. The name can be 'current_position', a previously set ReferenceTarget, or the name of a frame in the transform tree, such as 'base_link'. Unknown strings are passed through verbatim and will fail downstream if the reference does not exist. Defaults to 'current_position' so waypoints are interpreted relative to the robot's current pose.",
            "default": "current_position"
          },
          "timestamp_utc": {
            "title": "Timestamp Utc",
            "type": "string",
            "description": "Timestamp in UTC ISO format. Should be provided in ISO 8601 format: 'YYYY-MM-DDTHH:MM:SSZ'. If not provided, it will default to the current UTC time.",
            "default": ""
          },
          "move_to": {
            "title": "Move To",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelativeCommand"
            },
            "description": "Ordered list of relative waypoints. When multiple waypoints are provided, the robot navigates through them continuously as a single path rather than stopping discretely at each one. Robot body frame: x forward, y left, z up; positive yaw is counter-clockwise."
          },
          "navigation_options": {
            "title": "Navigation Options",
            "allOf": [
              {
                "$ref": "#/components/schemas/CortexNavigationOptions"
              }
            ],
            "description": "Optional navigation options for this command, including the path logic option and execution mode. See the GET /navigation-path-options endpoint for the available path options and their parameters."
          }
        }
      },
      "Ros2ActionServerGoalStatus": {
        "title": "Ros2ActionServerGoalStatus",
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6
        ],
        "description": "An enumeration."
      },
      "RouteEdge": {
        "title": "RouteEdge",
        "required": [
          "from_node_id",
          "to_node_id",
          "id"
        ],
        "type": "object",
        "properties": {
          "from_node_id": {
            "title": "From Node Id",
            "maximum": 65535,
            "minimum": 0,
            "type": "integer",
            "description": "ID of the node this edge starts from."
          },
          "to_node_id": {
            "title": "To Node Id",
            "maximum": 65535,
            "minimum": 0,
            "type": "integer",
            "description": "ID of the node this edge ends at."
          },
          "id": {
            "title": "Id",
            "maximum": 65535,
            "minimum": 0,
            "type": "integer",
            "description": "16-bit unique identifier of this edge."
          },
          "cost": {
            "title": "Cost",
            "maximum": 20000,
            "minimum": 0,
            "type": "integer",
            "description": "Cost/penalty of traversing this edge.",
            "default": 0
          }
        }
      },
      "RouteGraph": {
        "title": "RouteGraph",
        "required": [
          "name",
          "nodes",
          "edges"
        ],
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string",
            "description": "Name of the route."
          },
          "nodes": {
            "title": "Nodes",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteNode"
            },
            "description": "Nodes that make up the route."
          },
          "edges": {
            "title": "Edges",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteEdge"
            },
            "description": "Edges connecting the nodes."
          }
        }
      },
      "RouteNode": {
        "title": "RouteNode",
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "maximum": 65535,
            "minimum": 0,
            "type": "integer",
            "description": "16-bit unique identifier of the node within this route graph, which can also be used to send a navigation goal later."
          },
          "coordinate_system": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RouteNodeCoordinateSystem"
              }
            ],
            "description": "Coordinate system for this node's position. <MagicMock name='mock.RouteNode.WGS84' id='140715843521184'>: use wgs84_position. <MagicMock name='mock.RouteNode.MAP' id='140715843553040'>: use map_position. Pass the integer value.",
            "default": {}
          },
          "wgs84_position": {
            "title": "Wgs84 Position",
            "allOf": [
              {
                "$ref": "#/components/schemas/GeoPoint"
              }
            ],
            "description": "Node position in WGS84 lat/lon. Required when coordinate_system is WGS84."
          },
          "map_position": {
            "title": "Map Position",
            "allOf": [
              {
                "$ref": "#/components/schemas/MapPoint"
              }
            ],
            "description": "Node position in the map frame. Required when coordinate_system is MAP."
          },
          "name": {
            "title": "Name",
            "type": "string",
            "description": "Optional human-readable name for the node, which can be used to send a navigation goal later.",
            "default": ""
          }
        }
      },
      "RouteNodeCoordinateSystem": {
        "title": "RouteNodeCoordinateSystem",
        "enum": [
          {},
          {}
        ],
        "description": "An enumeration."
      },
      "Stamp": {
        "title": "Stamp",
        "type": "object",
        "properties": {
          "sec": {
            "title": "Sec",
            "type": "integer"
          },
          "nanosec": {
            "title": "Nanosec",
            "type": "integer"
          }
        }
      },
      "TimeStamp": {
        "title": "TimeStamp",
        "type": "object",
        "properties": {
          "sec": {
            "title": "Sec",
            "type": "integer"
          },
          "nanosec": {
            "title": "Nanosec",
            "type": "integer"
          }
        }
      },
      "TransferLeaseRequest": {
        "title": "TransferLeaseRequest",
        "required": [
          "to"
        ],
        "type": "object",
        "properties": {
          "to": {
            "title": "To",
            "type": "string",
            "description": "User ID to transfer lease to"
          }
        }
      },
      "UUID": {
        "title": "UUID",
        "required": [
          "uuid"
        ],
        "type": "object",
        "properties": {
          "uuid": {
            "title": "Uuid",
            "type": "array",
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "UUIDData": {
        "title": "UUIDData",
        "required": [
          "uuid"
        ],
        "type": "object",
        "properties": {
          "uuid": {
            "title": "Uuid",
            "type": "string"
          }
        }
      },
      "UUIDResponse": {
        "title": "UUIDResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/UUIDData"
          }
        }
      },
      "ValidationError": {
        "title": "ValidationError",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "type": "object",
        "properties": {
          "loc": {
            "title": "Location",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            }
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        }
      },
      "VehicleCommandAction": {
        "title": "VehicleCommandAction",
        "type": "object",
        "properties": {
          "vehicle_command": {
            "title": "Vehicle Command",
            "allOf": [
              {
                "$ref": "#/components/schemas/CortexOption"
              }
            ],
            "description": "Vehicle command to execute"
          },
          "mode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CommandMode"
              }
            ],
            "description": "Mode of execution of previous and current waypoints. Available options: 'ADD','PREEMPT'. ADD or 0: Add a new waypoint to existing queue of waypoints, PREEMPT or 1: Delete the existing queue and adds the new waypoint.",
            "default": 0,
            "example": "ADD"
          }
        }
      },
      "VehicleCommandData": {
        "title": "VehicleCommandData",
        "required": [
          "sent",
          "received"
        ],
        "type": "object",
        "properties": {
          "sent": {
            "$ref": "#/components/schemas/VehicleCommandAction"
          },
          "received": {
            "title": "Received",
            "type": "object"
          }
        }
      },
      "VehicleCommandOptionResponse": {
        "title": "VehicleCommandOptionResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "title": "Data",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CortexOption"
            }
          }
        }
      },
      "VehicleCommandResponse": {
        "title": "VehicleCommandResponse",
        "required": [
          "status",
          "message",
          "data"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/VehicleCommandData"
          }
        }
      },
      "VehicleFeedback": {
        "title": "VehicleFeedback",
        "type": "object",
        "properties": {
          "state": {
            "title": "State",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "data": {
            "title": "Data",
            "type": "array",
            "items": {}
          }
        }
      },
      "VersionResponse": {
        "title": "VersionResponse",
        "required": [
          "commit_sha",
          "polymath_core_commit_sha"
        ],
        "type": "object",
        "properties": {
          "commit_sha": {
            "title": "Commit Sha",
            "type": "string"
          },
          "polymath_core_commit_sha": {
            "title": "Polymath Core Commit Sha",
            "type": "string"
          }
        }
      },
      "WorldModelErrorResponse": {
        "title": "WorldModelErrorResponse",
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "error"
            ],
            "type": "string",
            "description": "JSend status.",
            "default": "error"
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "Human-readable message, propagated from the ROS service."
          }
        },
        "example": {
          "status": "error",
          "message": "string"
        }
      },
      "WorldModelSuccessResponse": {
        "title": "WorldModelSuccessResponse",
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "success"
            ],
            "type": "string",
            "description": "JSend status.",
            "default": "success"
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "Human-readable message, propagated from the ROS service."
          }
        },
        "example": {
          "status": "success",
          "message": "string"
        }
      },
      "WriteRouteGraphRequest": {
        "title": "WriteRouteGraphRequest",
        "required": [
          "nodes",
          "edges"
        ],
        "type": "object",
        "properties": {
          "nodes": {
            "title": "Nodes",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteNode"
            },
            "description": "Nodes that make up the route."
          },
          "edges": {
            "title": "Edges",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RouteEdge"
            },
            "description": "Edges connecting the nodes, referencing node IDs via from_node_id/to_node_id."
          }
        },
        "example": {
          "nodes": [
            {
              "id": 0,
              "coordinate_system": 0,
              "wgs84_position": {
                "lat": 37.7749,
                "lon": -122.4194
              }
            },
            {
              "id": 1,
              "coordinate_system": 0,
              "wgs84_position": {
                "lat": 37.7752,
                "lon": -122.4189
              }
            }
          ],
          "edges": [
            {
              "from_node_id": 0,
              "to_node_id": 1,
              "id": 0,
              "cost": 1
            }
          ]
        }
      },
      "WriteRouteGraphResponse": {
        "title": "WriteRouteGraphResponse",
        "required": [
          "status",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "title": "Status",
            "enum": [
              "success"
            ],
            "type": "string",
            "description": "JSend status."
          },
          "message": {
            "title": "Message",
            "type": "string",
            "description": "Human-readable message, propagated from the ROS service."
          }
        },
        "example": {
          "status": "success",
          "message": "string"
        }
      },
      "VehiclesResponse": {
        "type": "object",
        "required": [
          "status",
          "data"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VehicleSummary"
            }
          }
        }
      },
      "VehicleSummary": {
        "type": "object",
        "required": [
          "id",
          "vpnConnected"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The vehicle ID provided by Polymath."
          },
          "ipAddress": {
            "type": "string",
            "format": "ipv4",
            "description": "The vehicle's Polymath VPN address. This field is omitted when no address is available."
          },
          "vpnConnected": {
            "type": "boolean",
            "description": "Whether the vehicle is connected to the Polymath VPN."
          }
        }
      },
      "PowerStatusResponse": {
        "type": "object",
        "required": [
          "status",
          "data"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/PowerStatus"
          }
        }
      },
      "PowerStatus": {
        "type": "object",
        "required": [
          "state",
          "pendingCommand",
          "updatedAt"
        ],
        "properties": {
          "state": {
            "type": "string",
            "description": "The vehicle's most recently reported power state.",
            "enum": [
              "on",
              "off",
              "unknown"
            ]
          },
          "pendingCommand": {
            "$ref": "#/components/schemas/PowerPendingCommand"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the vehicle's power state was last reported, or `null` if no state has been reported.",
            "nullable": true
          }
        }
      },
      "PowerPendingCommand": {
        "type": "object",
        "description": "A power command that Polymath accepted but the vehicle has not completed, or `null` if no command is pending.",
        "nullable": true,
        "required": [
          "state"
        ],
        "properties": {
          "state": {
            "type": "string",
            "description": "The power state requested by the pending command.",
            "enum": [
              "on",
              "off"
            ]
          }
        }
      },
      "SuccessResponse": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Send your access token in the `Authorization` header as `Bearer <token>`."
      }
    },
    "parameters": {
      "VehicleId": {
        "name": "vehicleId",
        "in": "path",
        "required": true,
        "description": "The vehicle ID provided by Polymath.",
        "schema": {
          "type": "string"
        },
        "example": "your_vehicle_id"
      }
    },
    "responses": {
      "CommandAccepted": {
        "description": "Polymath accepted the command.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SuccessResponse"
            },
            "example": {
              "status": "success"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "The request is missing a bearer token, or the token is invalid."
      },
      "Forbidden": {
        "description": "The bearer token does not grant access to this operation or vehicle."
      },
      "VehicleNotFound": {
        "description": "The vehicle was not found, is not available to this API client, or does not support power control."
      },
      "InternalServerError": {
        "description": "Polymath could not complete the request because of an unexpected error."
      },
      "BadGateway": {
        "description": "Polymath could not complete the request because another service failed."
      },
      "ServiceUnavailable": {
        "description": "The requested operation is temporarily unavailable."
      },
      "GatewayTimeout": {
        "description": "Polymath did not receive a response in time."
      }
    }
  }
}
