> ## 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.

# Set Key Rate Limits



## OpenAPI

````yaml PATCH /v1/keys/{id}/limits
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/{id}/limits:
    patch:
      tags:
        - keys
      summary: Set RPM / TPM rate limits on a key
      operationId: KeysController_updateLimits
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateKeyLimitsDto'
      responses:
        '200':
          description: Updated rate limits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyLimitsResponseDto'
        '404':
          description: Key not found
      security:
        - bearer: []
components:
  schemas:
    UpdateKeyLimitsDto:
      type: object
      properties:
        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.
    KeyLimitsResponseDto:
      type: object
      properties:
        id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        rpmLimit:
          type: object
          example: 60
          nullable: true
        tpmLimit:
          type: object
          example: 100000
          nullable: true
      required:
        - id
        - rpmLimit
        - tpmLimit
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````