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

> List all AI Gateway provider keys owned by the authenticated account.

# List AI Gateway provider keys



## OpenAPI

````yaml openapi/ai-gateway.yaml GET /provider-keys
openapi: 3.0.3
info:
  title: AI Gateway APIs
  version: 0.1.0
  description: |
    Control-plane HTTP APIs served by the ai-gateway-control service.
servers:
  - url: https://api.ngrok.ai
security:
  - bearerAuth: []
tags:
  - name: AI Gateway Access Key Configurations
    description: Manage reusable access key configurations (scope and routing rules).
  - name: AI Gateway Access Keys
    description: Manage ngrok-managed access keys associated with AI Gateway endpoints.
  - name: AI Gateway Configuration
    description: >-
      Manage per-account AI Gateway configuration (timeouts, token caps,
      metadata).
  - name: AI Gateway API Keys
    description: Manage customer-facing AI Gateway API Keys.
  - name: AI Gateway Credits
    description: Purchase AI Gateway credits via Stripe Checkout.
  - name: AI Gateway Providers
    description: Manage AI Gateway providers and the models they expose.
  - name: AI Gateway Custom Providers
    description: Manage custom AI Gateway providers and the models they expose.
  - name: AI Gateway Provider Keys
    description: Manage provider keys attached to AI Gateway managed access keys.
  - name: AI Gateway Usage
    description: >-
      Read-only AI Gateway usage events and aggregated usage overview for the
      authenticated account.
paths:
  /provider-keys:
    get:
      tags:
        - AI Gateway Provider Keys
      summary: List AI Gateway provider keys
      description: List all AI Gateway provider keys owned by the authenticated account.
      operationId: ListAIGatewayProviderAPIKeys
      parameters:
        - $ref: '#/components/parameters/BeforeID'
        - $ref: '#/components/parameters/Limit'
        - name: provider
          in: query
          required: false
          description: Only returns keys matching the provider.
          schema:
            type: string
      responses:
        '200':
          description: A page of AI Gateway provider keys.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AIGatewayProviderAPIKeyList'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    BeforeID:
      name: beforeId
      in: query
      required: false
      description: Returns items before this resource identifier in descending ID order.
      schema:
        type: string
    Limit:
      name: limit
      in: query
      required: false
      description: >-
        Maximum number of items to return. Defaults to 100 and may not exceed
        100.
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 100
  schemas:
    AIGatewayProviderAPIKeyList:
      type: object
      additionalProperties: false
      required:
        - aiGatewayProviderKeys
        - uri
      properties:
        aiGatewayProviderKeys:
          type: array
          description: The AI Gateway provider keys for this account.
          items:
            $ref: '#/components/schemas/AIGatewayProviderAPIKeyDetail'
        uri:
          type: string
          description: URI of this list resource.
        nextPageUri:
          type: string
          nullable: true
          description: URI of the next page of results, or null if there is no next page.
    AIGatewayProviderAPIKeyDetail:
      type: object
      additionalProperties: false
      required:
        - id
        - uri
        - createdAt
        - updatedAt
        - providerId
        - name
        - keyRedacted
        - createdBy
        - lastUpdatedBy
      properties:
        id:
          type: string
          description: Unique identifier for this provider key.
        uri:
          type: string
          description: URI of this AI Gateway Provider Key API resource.
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the provider key was created.
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the provider key was last updated.
        providerId:
          type: string
          description: >-
            Which AI provider this key is for, for example `openai` or
            `anthropic`.
        name:
          type: string
          description: User-defined label for this provider key.
        keyRedacted:
          type: string
          description: Redacted display form of the key value.
        description:
          type: string
          description: Human-readable description of this provider key.
        metadata:
          type: string
          description: Arbitrary user-defined metadata for this provider key.
        createdBy:
          $ref: '#/components/schemas/Ref'
        lastUpdatedBy:
          $ref: '#/components/schemas/Ref'
        lastUsed:
          type: string
          format: date-time
          nullable: true
          description: Timestamp when the provider key was last used.
    Error:
      type: object
      additionalProperties: false
      required:
        - statusCode
        - msg
        - details
      properties:
        errorCode:
          type: string
          description: Stable ngrok error code when available.
        statusCode:
          type: integer
          format: int32
          description: HTTP status code for this error.
        msg:
          type: string
          description: Human-readable error message.
        details:
          type: object
          description: Structured error details.
          additionalProperties:
            type: string
    Ref:
      type: object
      additionalProperties: false
      required:
        - id
        - uri
      properties:
        id:
          type: string
          description: Resource identifier.
        uri:
          type: string
          description: URI for locating the resource.
  responses:
    Error:
      description: API error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````