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

# List the prompts and workflows offered to you

> Registry prompts and workflows at their newest approved version: Global ones you may use and your own personal ones, narrowed by each one's audience roles. Write and review them in the registry.



## OpenAPI

````yaml get /api/chat/library
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/chat/library:
    get:
      tags:
        - Chat
      summary: List the prompts and workflows offered to you
      description: >-
        Registry prompts and workflows at their newest approved version: Global
        ones you may use and your own personal ones, narrowed by each one's
        audience roles. Write and review them in the registry.
      operationId: list_library_api_chat_library_get
      parameters:
        - name: kind
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/ChatLibraryKind'
              - type: 'null'
            description: Only prompts, or only workflows.
            title: Kind
          description: Only prompts, or only workflows.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ChatLibraryItemResponse'
                title: Response List Library Api Chat Library Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    ChatLibraryKind:
      type: string
      enum:
        - prompt
        - workflow
      title: ChatLibraryKind
      description: What a library item does when someone picks it.
    ChatLibraryItemResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        version_id:
          type: string
          format: uuid
          title: Version Id
        version:
          type: string
          title: Version
        kind:
          $ref: '#/components/schemas/ChatLibraryKind'
        scope:
          type: string
          enum:
            - personal
            - tenant
          title: Scope
        title:
          type: string
          title: Title
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt
        questions:
          items:
            $ref: '#/components/schemas/WorkflowQuestion'
          type: array
          title: Questions
        task:
          anyOf:
            - type: string
            - type: 'null'
          title: Task
        sort_order:
          type: integer
          title: Sort Order
          default: 0
        owner:
          type: string
          title: Owner
      type: object
      required:
        - id
        - version_id
        - version
        - kind
        - scope
        - title
        - owner
      title: ChatLibraryItemResponse
      description: |-
        A prompt or workflow as the chat offers it: its newest approved
        version. ``id`` is the registry artifact's.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    WorkflowQuestion:
      properties:
        key:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,39}$
          title: Key
          description: Lower-case id the task names as `{{key}}`.
        text:
          type: string
          maxLength: 300
          minLength: 1
          title: Text
          description: What is asked.
        type:
          type: string
          enum:
            - choice
            - text
            - number
            - date
            - yes_no
          title: Type
          default: choice
        choices:
          items:
            type: string
          type: array
          maxItems: 12
          title: Choices
          description: Quick replies of a `choice` question.
        allow_other:
          type: boolean
          title: Allow Other
          description: A `choice` question also takes a typed answer.
          default: true
        required:
          type: boolean
          title: Required
          default: true
        placeholder:
          anyOf:
            - type: string
              maxLength: 200
            - type: 'null'
          title: Placeholder
        condition:
          anyOf:
            - $ref: '#/components/schemas/WorkflowCondition'
            - type: 'null'
      type: object
      required:
        - key
        - text
      title: WorkflowQuestion
      description: One question the assistant asks in the chat.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    WorkflowCondition:
      properties:
        key:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,39}$
          title: Key
          description: An earlier question's key.
        equals:
          items:
            type: string
          type: array
          maxItems: 12
          minItems: 1
          title: Equals
      type: object
      required:
        - key
        - equals
      title: WorkflowCondition
      description: Ask a question only when an earlier answer is one of these.
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````

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