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

# Update API Key

Updates the information of a specific API key using its UUID.


## OpenAPI

````yaml openapi.yaml PUT /api_keys/{uuid}
openapi: 3.1.0
info:
  title: GeekAI API Docs
  description: >-
    GeekAI API Specification Document Provides AI capabilities such as chat,
    image generation, speech processing, video generation, ai agents and file
    extract.
  version: 1.0.0
servers:
  - url: https://geekai.dev/api/v1
    description: base URL
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /api_keys/{uuid}:
    put:
      tags:
        - API_KEY
      summary: Update API Key Information
      description: Updates a specific API key using its UUID.
      operationId: updateApiKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - group
              properties:
                name:
                  type: string
                  description: >-
                    A name to identify the API key's use case, for management
                    and cost tracking.
                  default: default
                  example: geekai
                group:
                  type: string
                  description: >-
                    The proxy strategy group. Valid values are: lowcost
                    (prioritize low cost), balance (balanced), ha (high
                    availability), and none (no proxy).
                  enum:
                    - lowcost
                    - balance
                    - ha
                    - none
                  default: balance
                  example: balance
                credit_limit:
                  type: number
                  description: >-
                    Credit limit in "coins" (1 coin = 0.01 currency units).
                    Limits consumption for time-limited API keys. Usage is
                    blocked after the limit is reached.
                  default: 0
                  example: 10000
                expired_at:
                  type: string
                  format: date
                  description: Expiration date. The key becomes unusable after this date.
                  default: ''
                  example: '2025-12-31'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Success/failure message.
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: API key not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/StandardError'
components:
  responses:
    ValidationError:
      description: validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: validation_error
              message:
                type: string
                example: validation error
              details:
                type: object
                additionalProperties:
                  type: string
                example:
                  field: error message
    Unauthorized:
      description: unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: unauthorized
              message:
                type: string
                example: invalid api key or token
    StandardError:
      description: standard error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: error code
          example: invalid_request
        message:
          type: string
          description: error message
          example: invalid request
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: token
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: api key

````