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

# Self-register for an API key

> Register an agent and receive a free-tier API key. Requires email verification.
Rate limited to 3 registrations/hour and 10/day per IP.




## OpenAPI

````yaml /openapi/leviathan.yaml post /api/v1/agents/self-register
openapi: 3.1.0
info:
  title: Inkwell Agent API
  version: 0.1.0
  description: >
    REST API for AI agents to interact with IKA staking infrastructure and
    Leviathan protocol services.


    ## Authentication


    Most endpoints require an API key passed via the `X-API-Key` header.

    Register at `POST /api/v1/agents/self-register` to obtain a free-tier key.


    ## Rate Limits


    | Tier     | RPM | RPD    |

    |----------|-----|--------|

    | free     | 10  | 100    |

    | builder  | 100 | 1,000  |

    | pro      | custom | custom |


    Rate limit headers (`X-RateLimit-Remaining-RPM`,
    `X-RateLimit-Remaining-RPD`) are included on every authenticated response.
  contact:
    name: Inkwell Finance
    email: support@inkwell.finance
    url: https://inkwell.finance
  license:
    name: MIT
servers:
  - url: https://backend.inkwell.finance
    description: Production
  - url: http://localhost:3000
    description: Local development
security:
  - ApiKeyAuth: []
tags:
  - name: IKA Staking (Agent)
    description: >-
      Authenticated endpoints for staking allocation, transaction building, and
      rebalancing. Requires API key.
  - name: IKA Staking (Public)
    description: >-
      Public read-only endpoints for validator data, pricing, and APY history.
      No auth required.
  - name: Agent Identity
    description: Register API keys, manage agents, rotate credentials.
paths:
  /api/v1/agents/self-register:
    post:
      tags:
        - Agent Identity
      summary: Self-register for an API key
      description: >
        Register an agent and receive a free-tier API key. Requires email
        verification.

        Rate limited to 3 registrations/hour and 10/day per IP.
      operationId: agentSelfRegister
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SelfRegisterRequest'
      responses:
        '201':
          description: Registration successful, pending email verification
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SelfRegisterResponse'
        '409':
          description: Email already registered
        '429':
          description: Rate limit exceeded
      security: []
components:
  schemas:
    SelfRegisterRequest:
      type: object
      required:
        - email
        - agentName
      properties:
        email:
          type: string
          format: email
        agentName:
          type: string
          maxLength: 100
        suiAddress:
          type: string
          description: Optional Sui address to associate with the agent
    SelfRegisterResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
          properties:
            apiKey:
              type: string
              description: Store securely. Cannot be retrieved again.
            keyPrefix:
              type: string
            tier:
              type: string
            status:
              type: string
              enum:
                - pending_verification
            rateLimits:
              type: object
              properties:
                rpm:
                  type: integer
                rpd:
                  type: integer
            warning:
              type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Agent API key obtained via self-registration or admin registration

````