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

# Validate Api Key

> Validate an API key and return information about it.

This endpoint allows you to check if an API key is valid without
actually using it for authentication. Returns user information
and key metadata if valid.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/external/auth/api-keys/validate
openapi: 3.1.0
info:
  title: Lyceum Cloud Execution API
  version: 0.1.0
servers: []
security: []
paths:
  /api/v2/external/auth/api-keys/validate:
    post:
      tags:
        - API Keys
      summary: Validate Api Key
      description: |-
        Validate an API key and return information about it.

        This endpoint allows you to check if an API key is valid without
        actually using it for authentication. Returns user information
        and key metadata if valid.
      operationId: validate_api_key_api_v2_external_auth_api_keys_validate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiKeyValidationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyValidationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ApiKeyValidationRequest:
      properties:
        api_key:
          type: string
          title: Api Key
      type: object
      required:
        - api_key
      title: ApiKeyValidationRequest
      description: Request model for API key validation
    ApiKeyValidationResponse:
      properties:
        valid:
          type: boolean
          title: Valid
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        key_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Key Name
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
        last_used_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Used At
      type: object
      required:
        - valid
      title: ApiKeyValidationResponse
      description: Response model for API key validation
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````