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

# Create Key



## OpenAPI

````yaml /api-reference/openapi.json post /v1/api-keys
openapi: 3.1.0
info:
  description: >-
    Account-isolated orchestration and metering. Only the non-executing mock
    provider is available; no GPU resources are provisioned.
  title: Lunar Neo Cloud Control Plane
  version: 0.1.0
servers: []
security: []
paths:
  /v1/api-keys:
    post:
      tags:
        - Authentication
      summary: Create Key
      operationId: create_key_v1_api_keys_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyCreate'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyCreated'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The request did not pass validation.
      security:
        - HTTPBearer: []
components:
  schemas:
    KeyCreate:
      additionalProperties: false
      properties:
        name:
          maxLength: 64
          minLength: 2
          title: Name
          type: string
      required:
        - name
      title: KeyCreate
      type: object
    KeyCreated:
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        id:
          title: Id
          type: string
        last_used_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Last Used At
        name:
          title: Name
          type: string
        permission:
          const: read-write
          default: read-write
          title: Permission
          type: string
        prefix:
          title: Prefix
          type: string
        revoked_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Revoked At
        secret:
          title: Secret
          type: string
      required:
        - id
        - name
        - prefix
        - created_at
        - last_used_at
        - revoked_at
        - secret
      title: KeyCreated
      type: object
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
      required:
        - error
        - request_id
      title: ErrorResponse
      type: object
    ErrorBody:
      properties:
        code:
          title: Code
          type: string
        details:
          anyOf:
            - items:
                $ref: '#/components/schemas/ValidationErrorDetail'
              type: array
            - type: 'null'
          title: Details
        message:
          title: Message
          type: string
      required:
        - code
        - message
      title: ErrorBody
      type: object
    ValidationErrorDetail:
      properties:
        field:
          title: Field
          type: string
        type:
          title: Type
          type: string
      required:
        - field
        - type
      title: ValidationErrorDetail
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.