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

# List the top level of a release's files



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json get /api/v1/hub/packages/{owner}/{name}/releases/{version}/files
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/hub/packages/{owner}/{name}/releases/{version}/files:
    get:
      tags:
        - Hub
      summary: List the top level of a release's files
      operationId: hub_list_release_files
      parameters:
        - name: owner
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 255
            description: Owning user or team slug
            title: Owner
          description: Owning user or team slug
        - name: name
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 255
            description: Package name
            title: Name
          description: Package name
        - name: version
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 255
            description: >-
              An exact PEP 440 version (`1.2` is `1.2.0`, never `1.2.5`), a ref
              name such as `latest`, or `sha256:` plus at least 12 hex digits of
              the content hash
            title: Version
          description: >-
            An exact PEP 440 version (`1.2` is `1.2.0`, never `1.2.5`), a ref
            name such as `latest`, or `sha256:` plus at least 12 hex digits of
            the content hash
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseFiles'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Too Many Requests
      security:
        - HTTPBearer: []
components:
  schemas:
    ReleaseFiles:
      properties:
        kind:
          type: string
          enum:
            - directory
            - file
          title: Kind
        path:
          type: string
          title: Path
          description: Empty for the root
        release_id:
          type: string
          title: Release Id
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
        index_status:
          anyOf:
            - type: string
              enum:
                - processing
                - completed
                - failed
            - type: 'null'
          title: Index Status
          description: A root with no entries usually means indexing hasn't finished
        entries:
          items:
            $ref: '#/components/schemas/ReleaseFileEntry'
          type: array
          title: Entries
          description: Directories first, then files
        file:
          anyOf:
            - $ref: '#/components/schemas/ReleaseFileEntry'
            - type: 'null'
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: Time-limited link to a file's content
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
      type: object
      required:
        - kind
        - path
        - release_id
        - version
        - index_status
      title: ReleaseFiles
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorEnvelope
    ReleaseFileEntry:
      properties:
        name:
          type: string
          title: Name
        path:
          type: string
          title: Path
        is_directory:
          type: boolean
          title: Is Directory
        size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size
        modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Modified At
        content_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Hash
      type: object
      required:
        - name
        - path
        - is_directory
        - size
        - modified_at
        - content_hash
      title: ReleaseFileEntry
    ErrorBody:
      properties:
        code:
          type: string
          title: Code
          description: Stable, machine-readable error code
        message:
          type: string
          title: Message
        details:
          type: object
          title: Details
      type: object
      required:
        - code
        - message
      title: ErrorBody
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

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