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

# List API Keys

> List the API keys for the current database configuration, with each key's access.



## OpenAPI

````yaml GET /api/api-key
openapi: 3.0.0
info:
  title: API Keys API
  description: >-
    Create, list, update the feature access of, and delete OpenLIT API keys.
    These endpoints require a signed-in OpenLIT session; Bearer API keys are
    rejected with `403`, so a key can't list, create, change, or delete keys.
  version: 1.0.0
servers:
  - url: http://localhost:3000
security: []
paths:
  /api/api-key:
    get:
      summary: List API Keys
      description: >-
        Lists the API keys for the current database configuration. Only a
        preview of each key is returned.
      operationId: listApiKeys
      responses:
        '200':
          description: API keys for the database configuration.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ApiKey'
        '403':
          $ref: '#/components/responses/Forbidden'
      security:
        - sessionAuth: []
components:
  schemas:
    ApiKey:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        apiKeyPreview:
          type: string
          example: openlit-3kJ9…x7Qp2A
        createdAt:
          type: string
          format: date-time
        createdByUser:
          type: object
          properties:
            email:
              type: string
        scopes:
          description: '`null` for full access, otherwise the features the key may use.'
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/ApiKeyScope'
    ApiKeyScope:
      type: string
      description: >-
        A feature an API key can use: `ingest` (OTLP telemetry ingestion),
        `telemetry` (`/api/telemetry/*`, `/api/metrics/*`), `prompts`
        (`/api/prompt/*`), `vault` (`/api/vault/*`), `rule_engine`
        (`/api/rule-engine/*`), `evaluation` (`/api/evaluation/*`), `chat`
        (`/api/chat/*`), `controller` (`/api/controller/*`), `db_config`
        (`/api/db-config*`).
      enum:
        - ingest
        - telemetry
        - prompts
        - vault
        - rule_engine
        - evaluation
        - chat
        - controller
        - db_config
    Error:
      type: object
      properties:
        error:
          type: string
  responses:
    Forbidden:
      description: >-
        The request used a Bearer API key, the caller lacks the required
        permission, the edition or license doesn't support restricting keys, or
        the caller's role doesn't include a requested feature.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    sessionAuth:
      type: apiKey
      in: cookie
      name: next-auth.session-token
      description: Signed-in OpenLIT browser session.

````

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