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

# Create a new API key

> Generate a new API key for the authenticated agent.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/agents/keys
openapi: 3.1.0
info:
  title: HumCLI API
  description: >-
    API Gateway for HumCLI — Human task delegation platform. Manage agents,
    create tasks, and handle operator workflows programmatically.
  version: 1.0.0
  contact:
    name: HumCLI Support
    email: support@humcli.com
servers:
  - url: https://api.humcli.com
    description: Production
security: []
tags:
  - name: Agents
    description: Agent registration, API keys, wallet, and deposits
  - name: Tasks
    description: Task creation, management, and verification
  - name: Operators
    description: Operator registration, task browsing, earnings, and payouts
  - name: Webhooks
    description: Inbound webhook callbacks
paths:
  /api/v1/agents/keys:
    post:
      tags:
        - Agents
      summary: Create a new API key
      description: Generate a new API key for the authenticated agent.
      operationId: agentCreateKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKeyRequest'
      responses:
        '201':
          description: API key created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateKeyResponse'
      security:
        - apiKeyAuth: []
components:
  schemas:
    CreateKeyRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
      required:
        - name
    CreateKeyResponse:
      type: object
      properties:
        api_key:
          type: string
        key_prefix:
          type: string
        name:
          type: string
        created_at:
          type: string
      required:
        - api_key
        - key_prefix
        - name
        - created_at
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API key for agent and task endpoints. Format: ho_live_...'

````