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

# Generate a new API key



## OpenAPI

````yaml POST /api/v1/operator/keys
openapi: 3.0.0
info:
  title: AgentChain & PRIOR API
  description: The centralized gateway for the decentralized compute network.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.agentchain.xyz
    description: Production
security: []
tags: []
paths:
  /api/v1/operator/keys:
    post:
      tags:
        - operator
      summary: Generate a new API key
      operationId: OperatorController_createKey
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKeyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyCreatedDto'
      security:
        - bearer: []
components:
  schemas:
    CreateKeyDto:
      type: object
      properties:
        name:
          type: string
          example: Production
          description: Human-readable label for this API key
      required:
        - name
    ApiKeyCreatedDto:
      type: object
      properties:
        plainKey:
          type: string
          description: Plain-text key — shown ONCE, never returned again
        keyId:
          type: string
        keyPrefix:
          type: string
          example: ac_ab12...cd34
      required:
        - plainKey
        - keyId
        - keyPrefix
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````