> ## 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.

# Update Image Visibility

> Publish or unpublish an image in the current personal or team context.

## Rate Limit

100 requests per 60 seconds per IP and token.


## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json patch /api/v1/images/{image_name}/{image_tag}/visibility
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}/visibility:
    patch:
      tags:
        - Images
      summary: Update Image Visibility
      description: Publish or unpublish an image in the current personal or team context.
      operationId: >-
        update_image_visibility_api_v1_images__image_name___image_tag__visibility_patch
      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:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateImageVisibilityRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateImageVisibilityResponse'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    UpdateImageVisibilityRequest:
      properties:
        visibility:
          $ref: '#/components/schemas/ImageVisibilityEnum'
          description: New image visibility (PUBLIC or PRIVATE)
        teamId:
          anyOf:
            - type: string
            - type: 'null'
          title: Teamid
          description: Team ID if updating a team image
      type: object
      required:
        - visibility
      title: UpdateImageVisibilityRequest
      description: Request model for publishing or unpublishing an image.
    UpdateImageVisibilityResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Whether the update succeeded
        message:
          type: string
          title: Message
          description: Status message describing the result
        visibility:
          $ref: '#/components/schemas/ImageVisibilityEnum'
          description: Updated visibility
        images:
          items:
            $ref: '#/components/schemas/ImageResponse'
          type: array
          title: Images
          description: Updated artifact rows for the logical image
      type: object
      required:
        - success
        - message
        - visibility
      title: UpdateImageVisibilityResponse
      description: Response model for an image visibility update.
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    ImageVisibilityEnum:
      type: string
      enum:
        - PRIVATE
        - PUBLIC
      title: ImageVisibilityEnum
    ImageResponse:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the image
        artifactType:
          $ref: '#/components/schemas/ImageBuildArtifactTypeEnum'
          description: Artifact produced by this image record
          default: CONTAINER_IMAGE
        imageName:
          type: string
          title: Imagename
          description: Name of the image
        imageTag:
          type: string
          title: Imagetag
          description: Tag of the image
        status:
          $ref: '#/components/schemas/ImageBuildStatusEnum'
          description: Current build status
        fullImagePath:
          anyOf:
            - type: string
            - type: 'null'
          title: Fullimagepath
          description: Stored output reference for the image artifact
        errorMessage:
          anyOf:
            - type: string
            - type: 'null'
          title: Errormessage
          description: Error message if build failed
        sizeBytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Sizebytes
          description: Size of the image in bytes
        visibility:
          $ref: '#/components/schemas/ImageVisibilityEnum'
          description: Whether this image can be used by other Prime users
          default: PRIVATE
        createdAt:
          type: string
          format: date-time
          title: Createdat
          description: Timestamp when the build was created
        startedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Startedat
          description: Timestamp when the build started
        completedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completedat
          description: Timestamp when the build completed
        pushedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Pushedat
          description: Timestamp when the image artifact was registered
        teamId:
          anyOf:
            - type: string
            - type: 'null'
          title: Teamid
          description: Team ID if this is a team image
        ownerType:
          type: string
          enum:
            - personal
            - team
          title: Ownertype
          description: Whether this is a personal or team image
          default: personal
        displayRef:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayref
          description: >-
            User-friendly reference (team-{teamId}/name:tag or
            {userId}/name:tag)
      type: object
      required:
        - id
        - imageName
        - imageTag
        - status
        - createdAt
      title: ImageResponse
      description: Response model for an image or build with status.
    ErrorDetail:
      properties:
        param:
          type: string
          title: Param
        details:
          type: string
          title: Details
      type: object
      required:
        - param
        - details
      title: ErrorDetail
    ImageBuildArtifactTypeEnum:
      type: string
      enum:
        - CONTAINER_IMAGE
        - VM_SANDBOX
      title: ImageBuildArtifactTypeEnum
    ImageBuildStatusEnum:
      type: string
      enum:
        - PENDING
        - UPLOADING
        - BUILDING
        - COMPLETED
        - FAILED
        - CANCELLED
      title: ImageBuildStatusEnum
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````