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

# API 密钥用量

> 返回当前 API 密钥的用量统计：已分配请求总数、剩余额度及当前请求配额的到期日期。无需参数，密钥从 `ApiKey` 请求头读取。



## OpenAPI

````yaml openapi-zh-Hans.json GET /key-usage-info
openapi: 3.0.3
info:
  contact: {}
  title: Sorsa.io API
  version: '3.0'
servers:
  - url: https://api.sorsa.io/v3
security: []
paths:
  /key-usage-info:
    get:
      tags:
        - 实用工具
      summary: API 密钥用量
      description: 返回当前 API 密钥的用量统计：已分配请求总数、剩余额度及当前请求配额的到期日期。无需参数，密钥从 `ApiKey` 请求头读取。
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/technical.KeysResp'
          description: 成功
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: 请求无效
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: 禁止访问
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: 未找到
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: 服务器内部错误
      security:
        - ApiKeyAuth: []
components:
  schemas:
    technical.KeysResp:
      properties:
        key_requests:
          description: 当前周期分配的请求数。
          example: 100
          type: integer
        remaining_requests:
          description: 剩余请求数。
          example: 100
          type: integer
        total_requests:
          description: 所有周期累计使用的请求数。
          example: 1000
          type: integer
        valid_until:
          description: 当前请求余额的到期日期，采用 ISO 8601 格式。
          example: '2021-01-01T00:00:00Z'
          type: string
      type: object
    handler.ErrorResponse:
      properties:
        message:
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: ApiKey
      type: apiKey

````