> ## 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 Llm Api Key For Byor

> Get the LLM API key for BYOR (Bring Your Own Runtime).

This endpoint validates that the key exists in LiteLLM before returning it.
If validation fails, it automatically generates a new key to ensure users
always receive a working key.

Returns 402 Payment Required if BYOR export is not enabled for the
request's effective org.



## OpenAPI

````yaml /openapi/openhands-cloud.json get /api/keys/llm/byor
openapi: 3.1.0
info:
  title: OpenHands
  description: 'OpenHands: Code Less, Make More'
  version: 0.0.1
servers: []
security: []
paths:
  /api/keys/llm/byor:
    get:
      tags:
        - Keys
      summary: Get Llm Api Key For Byor
      description: >-
        Get the LLM API key for BYOR (Bring Your Own Runtime).


        This endpoint validates that the key exists in LiteLLM before returning
        it.

        If validation fails, it automatically generates a new key to ensure
        users

        always receive a working key.


        Returns 402 Payment Required if BYOR export is not enabled for the

        request's effective org.
      operationId: get_llm_api_key_for_byor_api_keys_llm_byor_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LlmApiKeyResponse'
      security:
        - APIKeyHeader: []
components:
  schemas:
    LlmApiKeyResponse:
      properties:
        key:
          anyOf:
            - type: string
            - type: 'null'
          title: Key
      type: object
      required:
        - key
      title: LlmApiKeyResponse
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Access-Token

````