> ## 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 /keys
openapi: 3.1.0
info:
  title: Wardin API
  version: 1.0.0
  description: >-
    Wardin REST API — manage virtual keys, budgets, policies, and pull
    analytics.
  contact:
    name: Wardin Support
    url: https://wardin.ai
servers:
  - url: https://api.wardin.ai/v1
    description: Production
security:
  - BearerAuth: []
paths:
  /keys:
    post:
      tags:
        - Keys
      summary: Create a virtual key
      operationId: createKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                monthlyBudgetUsd:
                  type: number
                  nullable: true
                rpmLimit:
                  type: integer
                  nullable: true
                tpmLimit:
                  type: integer
                  nullable: true
                ownerId:
                  type: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/VirtualKey'
                  - type: object
                    properties:
                      key:
                        type: string
                        description: The full key value — only returned at creation.
components:
  schemas:
    VirtualKey:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        monthlyBudgetUsd:
          type: number
          nullable: true
        currentSpendUsd:
          type: number
        rpmLimit:
          type: integer
          nullable: true
        tpmLimit:
          type: integer
          nullable: true
        status:
          type: string
          enum:
            - active
            - paused
            - budget_exceeded
            - revoked
        createdAt:
          type: string
          format: date-time
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: A `wardin_sk_` virtual key with manager-level access.

````