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

# Verify an API key

> GoModel API reference for GET /v1/auth/verify: Verify an API key.



## OpenAPI

````yaml /openapi.json get /v1/auth/verify
openapi: 3.0.0
info:
  description: >-
    AI gateway routing requests to multiple LLM providers (OpenAI, Anthropic,
    Gemini, Groq, Fireworks AI, Meta, OpenRouter, Kilo AI, DeepSeek, Z.ai, xAI,
    MiniMax, Xiaomi MiMo, OpenCode Go, Oracle, Ollama, Bailian). Drop-in
    OpenAI-compatible API.
  title: GoModel API
  contact: {}
  version: '1.0'
servers:
  - url: '{base_url}'
    description: Edit the base URL to point at your GoModel deployment.
    variables:
      base_url:
        default: http://localhost:8080
        description: Your GoModel deployment URL
security: []
paths:
  /v1/auth/verify:
    get:
      tags:
        - auth
      summary: Verify an API key
      description: >-
        Reports whether the presented credential authenticates against this
        gateway. Returns 401 when it does not. A gateway with no authentication
        configured has no credential to confirm and answers 200 with valid=false
        and method=none. Disabled unless AUTH_VERIFY_ENABLED is set.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/server.authVerifyResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
      security:
        - BearerAuth: []
components:
  schemas:
    server.authVerifyResponse:
      type: object
      properties:
        key_id:
          description: >-
            KeyID identifies the managed auth key that authenticated the
            request.

            Absent for every other method.
          type: string
        method:
          description: >-
            Method is "api_key" for a managed key stored in the database,

            "master_key" for the bootstrap key, an extension-specific value for

            identities supplied by an authentication extension, or "none" when
            the

            request carried no credential this gateway recognizes, which is also

            when Valid is false.
          type: string
        user_path:
          description: |-
            UserPath is the subtree the credential is bound to. Absent when the
            credential is global, which every master-key caller is.
          type: string
        valid:
          type: boolean
    core.OpenAIErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/core.OpenAIErrorObject'
    core.OpenAIErrorObject:
      type: object
      required:
        - code
        - message
        - param
        - type
      properties:
        code:
          type: string
          nullable: true
        message:
          type: string
        param:
          type: string
          nullable: true
        provider:
          description: |-
            Provider names the upstream provider that produced the error. It is
            omitted for errors raised by the gateway itself.
          type: string
        type:
          $ref: '#/components/schemas/core.ErrorType'
    core.ErrorType:
      type: string
      enum:
        - provider_error
        - rate_limit_error
        - invalid_request_error
        - authentication_error
        - not_found_error
        - permission_error
        - internal_error
      x-enum-varnames:
        - ErrorTypeProvider
        - ErrorTypeRateLimit
        - ErrorTypeInvalidRequest
        - ErrorTypeAuthentication
        - ErrorTypeNotFound
        - ErrorTypePermission
        - ErrorTypeInternal
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````