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

# Create Key



## OpenAPI

````yaml POST /v1/keys
openapi: 3.0.0
info:
  title: Wardin API
  description: AI governance & observability platform — external REST API
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /v1/keys:
    post:
      tags:
        - keys
      summary: Create a virtual key with a budget
      operationId: KeysController_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKeyDto'
      responses:
        '201':
          description: Key created — rawKey shown once
      security:
        - bearer: []
components:
  schemas:
    CreateKeyDto:
      type: object
      properties:
        label:
          type: string
          example: CI pipeline key
        keyClass:
          type: string
          enum:
            - interactive
            - ci
        budgetUsd:
          type: number
          example: 50
          description: Monthly budget in USD
        rpmLimit:
          type: object
          example: 60
          nullable: true
          description: Max requests per minute. null or 0 = unlimited.
        tpmLimit:
          type: object
          example: 100000
          nullable: true
          description: Max tokens per minute. null or 0 = unlimited.
        ownerId:
          type: object
          nullable: true
          description: >-
            User who owns/uses this key. Must belong to the caller’s tenant.
            Omitted or null = ownerless (CI/service key).
        teamId:
          type: object
          nullable: true
          description: >-
            Cost-center team this key bills to. Must belong to the caller’s
            tenant. When omitted and ownerId is set, defaults to that owner’s
            current team. Explicit null = unassigned (no team).
      required:
        - label
        - keyClass
        - budgetUsd
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````