> ## 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 an asynchronous OCI image import.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/images
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/images:
    post:
      tags:
        - Images
      summary: Start an asynchronous OCI image import.
      operationId: v2_create_image
      parameters:
        - name: Idempotency-Key
          in: header
          description: Tenant-scoped image import operation identity
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOciImageRequest'
        required: true
      responses:
        '202':
          description: Image import admitted
          headers:
            Location:
              schema:
                type: string
              description: Durable operation resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
        '400':
          description: Invalid name or image source
        '401':
          description: Missing or invalid API key
        '404':
          description: Upload not found
        '409':
          description: Idempotency key or image name conflict
        '503':
          description: No compatible guest platform is registered
components:
  schemas:
    CreateOciImageRequest:
      type: object
      description: |-
        Immutable v2 OCI image-import request. The `Idempotency-Key` header owns
        operation identity; callers never place an internal import UUID in the
        payload.
      required:
        - source
      properties:
        name:
          type:
            - string
            - 'null'
          description: |-
            Optional tenant alias. When omitted, Chelsea publishes a stable name
            derived from the resolved immutable source digest.
        source:
          $ref: '#/components/schemas/OciImportSourceRequest'
    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
    OciImportSourceRequest:
      oneOf:
        - type: object
          required:
            - upload_id
            - type
          properties:
            client_source_identity:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/AssertedOciImageSourceIdentityRequest'
                  description: >-
                    Optional typed identity selected from the client's local
                    image

                    store. Chelsea accepts it only after proving the exact media
                    kind

                    and digest from the uploaded archive.
            type:
              type: string
              enum:
                - upload
            upload_id:
              type: string
              format: uuid
        - type: object
          required:
            - image_ref
            - type
          properties:
            image_ref:
              type: string
            type:
              type: string
              enum:
                - public_registry
    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
    AssertedOciImageSourceIdentityRequest:
      type: object
      required:
        - kind
        - digest
      properties:
        digest:
          type: string
          description: |-
            Canonical lowercase `sha256:` digest selected from the local image
            store.
        kind:
          $ref: '#/components/schemas/AssertedOciImageSourceIdentityKind'
          description: |-
            Media identity represented by `digest`. Config and manifest digests
            intentionally occupy separate namespaces.
      additionalProperties: false
    OperationResourceKind:
      type: string
      enum:
        - checkpoint
        - computer
        - image
        - image_import
    AssertedOciImageSourceIdentityKind:
      type: string
      enum:
        - config
        - manifest
  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.