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

# Ask the AI service about the status of a given repository.

> # Access control rules

- The requester must have access to the repository.



## OpenAPI

````yaml GET /api/v0/repositories/{repo_id}/ai
openapi: 3.1.0
info:
  title: Cantina Client API
  description: >-
    Endpoints available to client organizations. For an overview and
    authentication, see
    https://docs.cantina.xyz/for-organizations/getting-started/api-access.
  license:
    name: Cantina
    identifier: Cantina
  version: 0.1.0
servers: []
security: []
paths:
  /api/v0/repositories/{repo_id}/ai:
    get:
      tags:
        - repositories
      summary: Ask the AI service about the status of a given repository.
      description: |-
        # Access control rules

        - The requester must have access to the repository.
      operationId: ai_status
      parameters:
        - name: repo_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: AI response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiRepositoryStatusInfo'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '401':
          description: Access not authorised
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '403':
          description: Access forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
components:
  schemas:
    AiRepositoryStatusInfo:
      type: object
      description: The response of the /repositories/status API call
      required:
        - status
        - conversationId
        - messages
        - limit
      properties:
        status:
          $ref: '#/components/schemas/AiRepositoryStatus'
        conversationId:
          type: string
          format: uuid
        messages:
          type: array
          items:
            $ref: '#/components/schemas/AiRepositoryChatMessage'
        limit:
          type: integer
          format: int32
          minimum: 0
    CantinaError:
      type: object
      description: Error returned by the Cantina API.
      required:
        - type
        - msg
      properties:
        type:
          $ref: '#/components/schemas/ErrorType'
        msg:
          type: string
          description: Error message for the user.
    AiRepositoryStatus:
      type: string
      description: Describes the status of a repository
      enum:
        - active
        - in_progress
        - pending
    AiRepositoryChatMessage:
      type: object
      required:
        - id
        - userId
        - timestamp
        - conversationId
        - message
        - response
        - metadata
      properties:
        id:
          type: string
          format: uuid
        userId:
          type: string
          format: uuid
        timestamp:
          type: string
          format: date-time
        conversationId:
          type: string
          format: uuid
        message:
          type: string
        response:
          type: string
        metadata:
          type: object
          additionalProperties: {}
          propertyNames:
            type: string
    ErrorType:
      type: string
      description: Type of error.
      enum:
        - email_not_verified
        - auth_invalid
        - auth_expired
        - auth_token_missing
        - auth_id_missing
        - invalid_password
        - disabled_user
        - tc_not_accepted
        - evicted
        - unauthorized
        - bad_request
        - not_found
        - forbidden
        - gone
        - payload_too_large
        - service_unavailable
        - internal_error

````