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

# Build Vm Image

> Build a VM image from an existing container image.

Converts the image's current registry content into a VM image without
rebuilding the container image. If the image already has a VM artifact,
this triggers a rebuild while keeping the registered artifact available
until the replacement completes. Requires VM sandboxes to be enabled for
the owning account and a linux/amd64 image; for team images, only the
image creator or team admins may trigger it. Poll /images/build/{build_id}
for progress.

## Rate Limit

300 requests per 60 seconds per IP and token.


## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json post /api/v1/images/{image_name}/{image_tag}/vm-build
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/images/{image_name}/{image_tag}/vm-build:
    post:
      tags:
        - Images
      summary: Build Vm Image
      description: >-
        Build a VM image from an existing container image.


        Converts the image's current registry content into a VM image without

        rebuilding the container image. If the image already has a VM artifact,

        this triggers a rebuild while keeping the registered artifact available

        until the replacement completes. Requires VM sandboxes to be enabled for

        the owning account and a linux/amd64 image; for team images, only the

        image creator or team admins may trigger it. Poll
        /images/build/{build_id}

        for progress.
      operationId: build_vm_image_api_v1_images__image_name___image_tag__vm_build_post
      parameters:
        - name: image_name
          in: path
          required: true
          schema:
            type: string
            title: Image Name
        - name: image_tag
          in: path
          required: true
          schema:
            type: string
            title: Image Tag
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/BuildVmImageRequest'
                - type: 'null'
              title: Request
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuildVmImageResponse'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    BuildVmImageRequest:
      properties:
        teamId:
          anyOf:
            - type: string
            - type: 'null'
          title: Teamid
          description: Team ID if the image is a team image
        ownerScope:
          anyOf:
            - type: string
              enum:
                - platform
              const: platform
            - type: 'null'
          title: Ownerscope
          description: >-
            Set to 'platform' to build a VM artifact for an org-less platform
            image (platform admins only)
      type: object
      title: BuildVmImageRequest
      description: Request model for building a VM image from an existing container image.
    BuildVmImageResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Whether the build was queued
        message:
          type: string
          title: Message
          description: Status message describing the result
        buildId:
          type: string
          title: Buildid
          description: Public build ID of the image's build group, for status polling
        artifactBuildId:
          type: string
          title: Artifactbuildid
          description: Build row ID of the new VM artifact leg
      type: object
      required:
        - success
        - message
        - buildId
        - artifactBuildId
      title: BuildVmImageResponse
      description: Response model for initiating a VM image build.
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    ErrorDetail:
      properties:
        param:
          type: string
          title: Param
        details:
          type: string
          title: Details
      type: object
      required:
        - param
        - details
      title: ErrorDetail
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````