> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gym.scale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get VNC URL

> Get the VNC connection URL for a VM

Returns the VNC URL for connecting to a specific desktop environment. The VM must already be created and running.

## Path Parameters

<ParamField path="vm_id" type="string" required>
  VM identifier
</ParamField>

## Response

<ResponseField name="status" type="string">
  Result status (`success`)
</ResponseField>

<ResponseField name="vm_id" type="string">
  VM identifier
</ResponseField>

<ResponseField name="vnc_url" type="string">
  Full VNC connection URL
</ResponseField>

<ResponseField name="vnc_port" type="integer">
  VNC port number
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "http://CONTROL_PLANE_IP:PORT/get_vnc_url/vm-abc123"
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "status": "success",
    "vm_id": "vm-abc123",
    "vnc_url": "https://sandbox.outlier.ai/vm-8000/?path=vm-8000/websockify&resize=scale&reconnect=true&autoconnect=true",
    "vnc_port": 8000
  }
  ```

  ```json Not Found (404) theme={null}
  {
    "error": "Desktop environment not found for VM: vm-abc123."
  }
  ```
</ResponseExample>
