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

# Get active provider API key

> Returns the active provider API key details for admin copy workflows. Currently only `openrouter` is supported.



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/ai.yaml get /api/ai/{provider}/api-key
openapi: 3.0.3
info:
  title: Insforge AI API
  version: 1.0.0
  description: >-
    Model Gateway helper APIs for OpenRouter key provisioning, model discovery,
    and deprecated compatibility proxy routes
servers: []
security: []
paths:
  /api/ai/{provider}/api-key:
    get:
      tags:
        - Admin
      summary: Get active provider API key
      description: >-
        Returns the active provider API key details for admin copy workflows.
        Currently only `openrouter` is supported.
      parameters:
        - $ref: '#/components/parameters/AIProvider'
      responses:
        '200':
          description: Active provider API key details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenRouterKeyResponse'
        '400':
          description: Missing or unsupported provider API key
        '401':
          description: Unauthorized
        '500':
          description: Failed to fetch API key details
      security:
        - bearerAuth: []
components:
  parameters:
    AIProvider:
      name: provider
      in: path
      required: true
      schema:
        type: string
        enum:
          - openrouter
      description: AI provider identifier
  schemas:
    OpenRouterKeyResponse:
      type: object
      properties:
        apiKey:
          type: string
          description: Active OpenRouter API key for admin copy workflows
        maskedKey:
          type: string
          description: Masked OpenRouter API key for display
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````