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

# Get Shell

> Mint a short-lived terminal URL. User opens it in a browser → live shell.

`launch` controls what runs when the terminal connects:
  - "bash" (default) → plain login shell.
  - "claude" → auto-run the claude UI; Ctrl+C drops to bash.

`w` (optional) selects which tmux window to attach to (e.g. `bux-w2`).
Defaults to `bux-w1` — the box-agent auto-creates that window on first
attach so single-window callers see no behavior change.



## OpenAPI

````yaml /cloud/openapi/v3.json post /boxes/me/shell
openapi: 3.1.0
info:
  title: Browser Use Public API v3
  summary: Browser Use session-based agent API (v3)
  version: 3.0.0
servers:
  - url: https://api.browser-use.com/api/v3
    description: Production server
security: []
paths:
  /boxes/me/shell:
    post:
      tags:
        - Boxes
      summary: Get Shell
      description: >-
        Mint a short-lived terminal URL. User opens it in a browser → live
        shell.


        `launch` controls what runs when the terminal connects:
          - "bash" (default) → plain login shell.
          - "claude" → auto-run the claude UI; Ctrl+C drops to bash.

        `w` (optional) selects which tmux window to attach to (e.g. `bux-w2`).

        Defaults to `bux-w1` — the box-agent auto-creates that window on first

        attach so single-window callers see no behavior change.
      operationId: get_shell_boxes_me_shell_post
      parameters:
        - name: launch
          in: query
          required: false
          schema:
            type: string
            default: bash
            title: Launch
        - name: w
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: W
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShellResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    ShellResponse:
      properties:
        url:
          type: string
          title: Url
        expires_in_seconds:
          type: integer
          title: Expires In Seconds
          default: 900
      type: object
      required:
        - url
      title: ShellResponse
      description: Terminal URL — user opens this in their browser, gets a live shell.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Browser-Use-API-Key

````