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

# Validate an API key

> Returns 200 if the key in the Authorization header is valid. Returns 401 otherwise.



## OpenAPI

````yaml https://api.crosmos.dev/openapi.json get /api/v1/auth/keys/validate
openapi: 3.1.0
info:
  title: Crosmos API
  version: 0.1.0
servers:
  - url: /
security: []
paths:
  /api/v1/auth/keys/validate:
    get:
      tags:
        - auth
      summary: Validate an API key
      description: >-
        Returns 200 if the key in the Authorization header is valid. Returns 401
        otherwise.
      responses:
        '200':
          description: Key is valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyValidateResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
      security:
        - bearerAuth: []
components:
  schemas:
    ApiKeyValidateResponse:
      type: object
      properties:
        valid:
          type: boolean
        key_prefix:
          type: string
      required:
        - valid
        - key_prefix
    ErrorBody:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT access token or API key (csk_...)

````