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

# Revoke API key

> Revokes an API key so it can no longer authenticate requests.



## OpenAPI

````yaml /hub/openapi/hub.json delete /api/v1/hub/keys/{id}
openapi: 3.0.1
info:
  title: Fanify Hub API
  description: Generate media and text with Fanify credits. All prices use EUR.
  version: v1
servers:
  - url: https://fanifyai.com
security: []
paths:
  /api/v1/hub/keys/{id}:
    delete:
      tags:
        - API keys
      summary: Revoke API key
      description: Revokes an API key so it can no longer authenticate requests.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: int32
        - name: X-Requested-With
          in: header
          description: Must be XMLHttpRequest.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: API key revoked.
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                required:
                  - type
                  - title
                  - status
                  - code
                type: object
                properties:
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                    format: int32
                  detail:
                    type: string
                    nullable: true
                  instance:
                    type: string
                  code:
                    enum:
                      - unauthorized
                    type: string
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                  unrepresentable:
                    type: array
                    items:
                      type: string
              example:
                type: https://fanifyai.com/docs/hub/errors#unauthorized
                title: Unauthorized
                status: 401
                code: unauthorized
        '404':
          description: Resource not found
          content:
            application/problem+json:
              schema:
                required:
                  - type
                  - title
                  - status
                  - code
                type: object
                properties:
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                    format: int32
                  detail:
                    type: string
                    nullable: true
                  instance:
                    type: string
                  code:
                    enum:
                      - resource_not_found
                    type: string
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                  unrepresentable:
                    type: array
                    items:
                      type: string
              example:
                type: https://fanifyai.com/docs/hub/errors#resource_not_found
                title: Resource not found
                status: 404
                code: resource_not_found
        '429':
          description: Rate limit reached
          headers:
            Retry-After:
              description: Seconds before retrying.
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                required:
                  - type
                  - title
                  - status
                  - code
                type: object
                properties:
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                    format: int32
                  detail:
                    type: string
                    nullable: true
                  instance:
                    type: string
                  code:
                    enum:
                      - rate_limited
                    type: string
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                  unrepresentable:
                    type: array
                    items:
                      type: string
              example:
                type: https://fanifyai.com/docs/hub/errors#rate_limited
                title: Rate limit reached
                status: 429
                code: rate_limited
      security:
        - ConsoleSession: []
components:
  securitySchemes:
    ConsoleSession:
      type: apiKey
      description: >-
        Fanify console session. X-Requested-With: XMLHttpRequest is also
        required.
      name: .AspNetCore.Cookies
      in: cookie

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.