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

# Start the computer's single interactive terminal session.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/computers/{computer_id}/session
openapi: 3.1.0
info:
  title: Vers API
  description: >-
    REST API for creating, checkpointing, branching, and managing Vers computers
    and projects.
  version: 2.0.0
servers:
  - url: https://api.vers.sh
    description: Vers API
security:
  - bearerAuth: []
tags:
  - name: Computers
    description: Create, inspect, execute commands in, sleep, wake, and delete computers.
  - name: Branches
    description: Branch one or more computers from a live computer, checkpoint, or tag.
  - name: Checkpoints
    description: Capture, inspect, tag, and delete whole-computer checkpoints.
  - name: Projects
    description: >-
      Organize computers into projects with private service networks and grouped
      restores.
  - name: Operations
    description: Inspect and stream status events for asynchronous durable operations.
  - name: Images
    description: >-
      Import and manage custom OCI images, system images, and registry
      artifacts.
  - name: Repositories
    description: Manage checkpoint repositories, tags, and public catalog entries.
  - name: Domains
    description: Register and manage custom domains.
  - name: Environment Variables
    description: Manage account-level environment variables applied to new computers.
  - name: Account & System
    description: Inspect API key identity, usage, and control-plane health.
paths:
  /api/v2/computers/{computer_id}/session:
    post:
      tags:
        - Computers
      summary: Start the computer's single interactive terminal session.
      operationId: start_computer_terminal_session
      parameters:
        - name: computer_id
          in: path
          description: Computer identity
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VmTerminalSessionStartRequest'
        required: true
      responses:
        '200':
          description: Interactive terminal NDJSON stream
          content:
            application/x-ndjson:
              schema:
                $ref: '#/components/schemas/VmTerminalSessionEvent'
        '400':
          description: Invalid terminal request
        '401':
          description: Missing or invalid API key
        '404':
          description: Computer not found or inaccessible
        '409':
          description: Computer is sleeping or already has a terminal session
        '501':
          description: Interactive terminal sessions are unsupported
components:
  schemas:
    VmTerminalSessionStartRequest:
      type: object
      description: Start the computer's single interactive terminal session.
      required:
        - command
        - size
      properties:
        command:
          type: array
          items:
            type: string
        size:
          $ref: '#/components/schemas/VmTerminalSize'
    VmTerminalSessionEvent:
      oneOf:
        - type: object
          required:
            - attachment_id
            - type
          properties:
            attachment_id:
              type: string
              format: uuid
            type:
              type: string
              enum:
                - ready
        - type: object
          required:
            - data_b64
            - type
          properties:
            data_b64:
              type: string
            type:
              type: string
              enum:
                - output
        - type: object
          required:
            - exit_code
            - type
          properties:
            exit_code:
              type: integer
              format: int32
            infrastructure_error:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/VmExecStreamInfrastructureError'
            type:
              type: string
              enum:
                - exit
      description: One event on the interactive terminal's NDJSON output stream.
    VmTerminalSize:
      type: object
      description: Terminal dimensions used when starting or attaching an interactive PTY.
      required:
        - rows
        - cols
      properties:
        cols:
          type: integer
          format: int32
          minimum: 1
        rows:
          type: integer
          format: int32
          minimum: 1
    VmExecStreamInfrastructureError:
      type: object
      description: >-
        Machine-readable infrastructure failure attached to a terminal exec
        event.
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: 'Vers API key (`VERS_API_KEY`) sent as `Authorization: Bearer <key>`.'

````

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