> ## Documentation Index
> Fetch the complete documentation index at: https://cognitio-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get provider auth methods

> Retrieve available authentication methods for all AI providers.



## OpenAPI

````yaml /openapi.json get /provider/auth
openapi: 3.1.1
info:
  title: cognitio
  description: cognitio api
  version: 1.0.0
servers: []
security: []
paths:
  /provider/auth:
    get:
      summary: Get provider auth methods
      description: Retrieve available authentication methods for all AI providers.
      operationId: provider.auth
      parameters:
        - in: query
          name: directory
          schema:
            type: string
        - in: query
          name: workspace
          schema:
            type: string
      responses:
        '200':
          description: Provider auth methods
          content:
            application/json:
              schema:
                type: object
                propertyNames:
                  type: string
                additionalProperties:
                  type: array
                  items:
                    $ref: '#/components/schemas/ProviderAuthMethod'
      x-codeSamples:
        - lang: js
          source: |-
            import { createCognitioClient } from "@cognitio/sdk

            const client = createCognitioClient()
            await client.provider.auth({
              ...
            })
components:
  schemas:
    ProviderAuthMethod:
      type: object
      properties:
        type:
          type: string
          enum:
            - oauth
            - api
        label:
          type: string
        prompts:
          type: array
          items:
            anyOf:
              - type: object
                properties:
                  type:
                    type: string
                    const: text
                  key:
                    type: string
                  message:
                    type: string
                  placeholder:
                    type: string
                  when:
                    type: object
                    properties:
                      key:
                        type: string
                      op:
                        type: string
                        enum:
                          - eq
                          - neq
                      value:
                        type: string
                    required:
                      - key
                      - op
                      - value
                required:
                  - type
                  - key
                  - message
              - type: object
                properties:
                  type:
                    type: string
                    const: select
                  key:
                    type: string
                  message:
                    type: string
                  options:
                    type: array
                    items:
                      type: object
                      properties:
                        label:
                          type: string
                        value:
                          type: string
                        hint:
                          type: string
                      required:
                        - label
                        - value
                  when:
                    type: object
                    properties:
                      key:
                        type: string
                      op:
                        type: string
                        enum:
                          - eq
                          - neq
                      value:
                        type: string
                    required:
                      - key
                      - op
                      - value
                required:
                  - type
                  - key
                  - message
                  - options
      required:
        - type
        - label

````

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