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

# Get Current Api Key

> Get information about the currently authenticated API key.

Returns the key's bound org (``bound_org_id``, ``None`` for unbound
keys) and the request's effective org (``org_id``, resolved from the
``X-Org-Id`` header or ``user.current_org_id`` for unbound keys).

Returns 400 if not authenticated via API key (e.g., using cookie auth).



## OpenAPI

````yaml /openapi/openhands-cloud.json get /api/keys/current
openapi: 3.1.0
info:
  title: OpenHands
  description: 'OpenHands: Code Less, Make More'
  version: 0.0.1
servers: []
security: []
paths:
  /api/keys/current:
    get:
      tags:
        - Keys
      summary: Get Current Api Key
      description: |-
        Get information about the currently authenticated API key.

        Returns the key's bound org (``bound_org_id``, ``None`` for unbound
        keys) and the request's effective org (``org_id``, resolved from the
        ``X-Org-Id`` header or ``user.current_org_id`` for unbound keys).

        Returns 400 if not authenticated via API key (e.g., using cookie auth).
      operationId: get_current_api_key_api_keys_current_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrentApiKeyResponse'
      security:
        - APIKeyHeader: []
components:
  schemas:
    CurrentApiKeyResponse:
      properties:
        id:
          type: integer
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        org_id:
          type: string
          title: Org Id
        bound_org_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Bound Org Id
        user_id:
          type: string
          title: User Id
        auth_type:
          type: string
          title: Auth Type
      type: object
      required:
        - id
        - name
        - org_id
        - bound_org_id
        - user_id
        - auth_type
      title: CurrentApiKeyResponse
      description: |-
        Response model for the current API key endpoint.

        ``org_id`` is the *effective* org id of the current request: the
        key's bound org for org-bound keys, or the resolved org (from the
        ``X-Org-Id`` header or ``user.current_org_id``) for unbound keys.
        ``bound_org_id`` distinguishes the two cases -- it is the org
        persisted on the key, or ``None`` when the key is unbound.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Access-Token

````