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

# Create API Key

> Creates a new API key for programmatic access. Only available for users authenticated via the UI (Privy). Previous active keys are automatically revoked.

<Info>
  (HMAC) API key creation is only available for users authenticated via the Limitless UI (Privy). The key value is only shown once at creation time —
  store it securely.
</Info>


## OpenAPI

````yaml POST /auth/api-keys
openapi: 3.0.0
info:
  title: Limitless Exchange API
  description: >-
    Production-ready REST API for prediction market trading, portfolio
    management, and market data on Limitless Exchange (Base L2).
  version: '1.0'
  contact:
    name: API Support
    url: https://limitless.exchange
    email: help@limitless.network
servers:
  - url: https://api.limitless.exchange
    description: Production API
security: []
tags:
  - name: Authentication
    description: User authentication and session management
  - name: Markets
    description: Browse, search, and analyze prediction markets
  - name: Market Navigation
    description: Navigation tree, market pages, and property filters
  - name: Trading
    description: Create, manage, and cancel orders
  - name: Portfolio
    description: Position tracking, trade history, and performance
  - name: API Tokens
    description: Scoped API token management for partner integrations
  - name: Partner Accounts
    description: Sub-account creation and allowance recovery for partner integrations
  - name: System
    description: Public API state and availability information
paths:
  /auth/api-keys:
    post:
      tags:
        - Authentication
      summary: Create API key
      description: >-
        Creates a new API key for programmatic access. Only available for users
        authenticated via the UI (Privy). Previous active keys are automatically
        revoked.
      operationId: ApiKeyController_createApiKey
      parameters: []
      responses:
        '201':
          description: API key created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  keyId:
                    type: string
                    description: Unique identifier for the API key
                    example: key_abc123def456
                  apiKey:
                    type: string
                    description: The API key value. Only shown once at creation time.
                    example: lmts_sk_1234567890abcdef...
                  createdAt:
                    type: string
                    format: date-time
                    description: When the key was created
                    example: '2025-06-15T10:30:00Z'
        '403':
          description: API key management is only available via the UI

````