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

# Create Api Key

> Create a new API key.

The full API key is only shown once in this response.
Store it securely - it cannot be retrieved later.



## OpenAPI

````yaml /openapi.json post /v1/auth/keys
openapi: 3.1.0
info:
  description: Customer-owned evaluation lifecycle API.
  title: HeyBee Public API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.heybee.app
security: []
paths:
  /v1/auth/keys:
    post:
      tags:
        - Authentication
      summary: Create Api Key
      description: |-
        Create a new API key.

        The full API key is only shown once in this response.
        Store it securely - it cannot be retrieved later.
      operationId: create_api_key_v1_auth_keys_post
      parameters:
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APIKeyCreate'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeyCreatedResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - BearerAuth: []
components:
  schemas:
    APIKeyCreate:
      description: Request to create a new API key.
      properties:
        name:
          anyOf:
            - maxLength: 255
              type: string
            - type: 'null'
          description: Optional name for the API key
          example: My CI/CD Pipeline
          title: Name
        scopes:
          items:
            type: string
          title: Scopes
          type: array
      title: APIKeyCreate
      type: object
    APIKeyCreatedResponse:
      description: Response when creating a new API key (includes the full key).
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        id:
          format: uuid
          title: Id
          type: string
        key:
          description: The full API key. Save this - it won't be shown again!
          title: Key
          type: string
        key_prefix:
          title: Key Prefix
          type: string
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        scopes:
          items:
            type: string
          title: Scopes
          type: array
      required:
        - id
        - name
        - key
        - key_prefix
        - created_at
      title: APIKeyCreatedResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: Supabase JWT
      scheme: bearer
      type: http

````