> ## 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 one durable computer creation.

> The response describes an operation; execution continues independently of
the request connection.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/computers
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:
    post:
      tags:
        - Computers
      summary: Start one durable computer creation.
      description: >-
        The response describes an operation; execution continues independently
        of

        the request connection.
      operationId: create_computer
      parameters:
        - name: Idempotency-Key
          in: header
          description: Tenant-scoped operation identity
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateComputerRequest'
        required: true
      responses:
        '202':
          description: Create admitted
          headers:
            Location:
              schema:
                type: string
              description: Durable operation resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
        '400':
          description: Invalid request or non-restorable checkpoint
        '401':
          description: Missing or invalid API key
        '404':
          description: Pinned image, kernel, or checkpoint not found
        '409':
          description: >-
            Idempotency key reused with a different request or lifecycle
            admission conflict
        '503':
          description: No eligible node currently accepts the create
components:
  schemas:
    CreateComputerRequest:
      oneOf:
        - $ref: '#/components/schemas/CreateComputerRootRequest'
        - $ref: '#/components/schemas/RestoreComputerFromCheckpointRequest'
      description: >-
        Backward-compatible v2 computer creation union. Existing fresh creates

        retain their flat `vm_config` body; checkpoint restores select an
        explicit

        typed source instead.
    Operation:
      type: object
      description: Durable status returned by v2 mutation endpoints and operation lookups.
      required:
        - operation_id
        - kind
        - status
        - resource
        - cursor
        - created_at
        - updated_at
      properties:
        cleanup_operation_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            Server-owned cleanup operation associated with this operation. A

            create using `remove_on_workload_exit` exposes its future delete
            here

            before the workload starts, so cleanup remains observable even after

            the computer is gone.
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        cursor:
          type: integer
          format: int64
          description: Monotonic durable progress cursor used by the event stream.
          minimum: 0
        failure:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OperationFailure'
        kind:
          $ref: '#/components/schemas/OperationKind'
        local_result:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OperationResource'
              description: >-
                Checkpoint available for restore on its source node while
                publication

                is pending. Losing the source data can lose this checkpoint.
                Only a

                successful operation with `result` certifies portability in S3.
        operation_id:
          type: string
          format: uuid
          description: >-
            Caller-selected idempotency identity, scoped to the authenticated
            tenant.
        resource:
          $ref: '#/components/schemas/OperationResource'
        result:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OperationResource'
              description: >-
                Resource published by the operation. This remains absent until
                the

                operation's atomic publication boundary has committed.
        stage:
          type:
            - string
            - 'null'
          description: >-
            Current durable stage. Intermediate stages may be skipped; the
            stream

            emits a gap event when that happens.
        status:
          $ref: '#/components/schemas/OperationStatus'
        updated_at:
          type: string
          format: date-time
    CreateComputerRootRequest:
      type: object
      description: Fresh-image request body for `POST /api/v2/computers`.
      required:
        - vm_config
      properties:
        keep_alive:
          type: boolean
          description: >-
            When true, exempt this VM from the inactivity auto-sleep. Defaults
            to

            false (eligible for auto-sleep).
        project_id:
          type:
            - string
            - 'null'
          format: uuid
          description: |-
            Project that will own the computer. Restricted keys with multiple
            grants must choose one; organization-wide keys may omit it.
        remove_on_workload_exit:
          type: boolean
          description: >-
            Delete this computer through Chelsea's durable lifecycle worker
            after

            the primary platform workload reaches a retained terminal state.
        vm_config:
          $ref: '#/components/schemas/VmCreateVmConfig'
    RestoreComputerFromCheckpointRequest:
      type: object
      description: Checkpoint-restore request body for `POST /api/v2/computers`.
      required:
        - source
      properties:
        keep_alive:
          type: boolean
          description: |-
            When true, exempt this VM from inactivity auto-sleep. Defaults to
            false (eligible for auto-sleep).
        labels:
          type:
            - object
            - 'null'
          description: >-
            Override individual labels inherited from the checkpoint. A default

            display name is generated only when neither supplies `name`. This
            does

            not rewrite the hostname inside the resumed guest.
          additionalProperties:
            type: string
          propertyNames:
            type: string
        project_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            Destination project. Required when restoring a project-network
            checkpoint.
        source:
          $ref: '#/components/schemas/CreateComputerSource'
      additionalProperties: false
    OperationFailure:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
    OperationKind:
      type: string
      enum:
        - checkpoint
        - create
        - delete
        - image_import
    OperationResource:
      type: object
      required:
        - kind
        - id
      properties:
        id:
          type: string
          format: uuid
        kind:
          $ref: '#/components/schemas/OperationResourceKind'
    OperationStatus:
      type: string
      enum:
        - pending
        - succeeded
        - failed
        - quarantined
    VmCreateVmConfig:
      type: object
      description: Struct representing configuration options common to all VMs
      properties:
        args:
          type:
            - array
            - 'null'
          items:
            type: string
          description: |-
            Replace the OCI command arguments while retaining the selected
            entrypoint when `command` is omitted.
        base_image_alias:
          type:
            - string
            - 'null'
        base_image_id:
          type:
            - string
            - 'null'
          format: uuid
        command:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            Replace the OCI entrypoint. For a global image this field is
            required

            to opt into the platform workload path.
        env:
          type:
            - object
            - 'null'
          description: >-
            Environment keys layered over image and account defaults. Caller
            keys

            win deterministically.
          additionalProperties:
            type: string
          propertyNames:
            type: string
        fs_size_mib:
          type:
            - integer
            - 'null'
          format: int32
          description: The disk size, in MiB.
          minimum: 0
        image_name:
          type:
            - string
            - 'null'
        kernel_alias:
          type:
            - string
            - 'null'
        kernel_id:
          type:
            - string
            - 'null'
          format: uuid
        labels:
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
          propertyNames:
            type: string
        mem_size_mib:
          type:
            - integer
            - 'null'
          format: int32
          description: The RAM size, in MiB.
          minimum: 0
        network_service:
          type:
            - string
            - 'null'
          description: >-
            Stable service name in the project's private network. Requires a
            project.
        oci_image_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            Tenant OCI image to launch. It is mutually exclusive with every
            legacy

            and global base-image selector.
        system_image_alias:
          type:
            - string
            - 'null'
          description: >-
            Mutable system-image alias resolved to an immutable image before VM
            admission.
        system_image_id:
          type:
            - string
            - 'null'
          format: uuid
          description: Globally published immutable OCI system image to launch.
        vcpu_count:
          type:
            - integer
            - 'null'
          format: int32
          description: How many vCPUs to allocate to this VM (and its children)
          minimum: 0
        working_dir:
          type:
            - string
            - 'null'
          description: Replace the image working directory.
    CreateComputerSource:
      oneOf:
        - type: object
          description: >-
            Resume the CPU, memory, device, and root-volume state identified by
            a

            v2 checkpoint operation's `local_result` or successful `result`.
            Local

            checkpoints restore on their source node while S3 publication
            continues.
          required:
            - checkpoint_id
            - type
          properties:
            checkpoint_id:
              type: string
              format: uuid
            type:
              type: string
              enum:
                - checkpoint
    OperationResourceKind:
      type: string
      enum:
        - checkpoint
        - computer
        - image
        - image_import
  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.