> ## Documentation Index
> Fetch the complete documentation index at: https://allhandsai-chore-regenerate-agent-sdk-openapi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Vscode Url

> Get the VSCode URL with authentication token.

Args:
    base_url: Base URL for the VSCode server. When omitted, the URL is
        built from the actually configured VSCode port
        (``http://localhost:{vscode_port}``), so callers that don't know
        the deployment topology get a URL that matches where the server
        really binds instead of a hardcoded ``:8001``.
    workspace_dir: Path to workspace directory

Returns:
    VSCode URL with token if available, None otherwise



## OpenAPI

````yaml /openapi/agent-sdk.json get /api/vscode/url
openapi: 3.1.0
info:
  description: OpenHands Agent Server - REST/WebSocket interface for OpenHands AI Agent
  title: OpenHands Agent Server
  version: 1.52.0
servers: []
security: []
paths:
  /api/vscode/url:
    get:
      tags:
        - VSCode
      summary: Get Vscode Url
      description: |-
        Get the VSCode URL with authentication token.

        Args:
            base_url: Base URL for the VSCode server. When omitted, the URL is
                built from the actually configured VSCode port
                (``http://localhost:{vscode_port}``), so callers that don't know
                the deployment topology get a URL that matches where the server
                really binds instead of a hardcoded ``:8001``.
            workspace_dir: Path to workspace directory

        Returns:
            VSCode URL with token if available, None otherwise
      operationId: get_vscode_url_api_vscode_url_get
      parameters:
        - in: query
          name: base_url
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Base Url
        - in: query
          name: workspace_dir
          required: false
          schema:
            default: workspace
            title: Workspace Dir
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VSCodeUrlResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - APIKeyHeader: []
components:
  schemas:
    VSCodeUrlResponse:
      description: Response model for VSCode URL.
      properties:
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
      required:
        - url
      title: VSCodeUrlResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-Session-API-Key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.