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

# 查询积分使用情况

> 查询当前用户和令牌的积分余额及使用情况



## OpenAPI

````yaml cn/api-manual/account-management/get-credits.json GET /v1/credits
openapi: 3.1.0
info:
  title: 查询积分使用情况接口
  description: 查询当前用户和令牌的积分余额及使用情况
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: 生产环境
security:
  - bearerAuth: []
tags:
  - name: 账户管理
    description: 账户相关接口，包括积分查询等
paths:
  /v1/credits:
    get:
      tags:
        - 账户管理
      summary: 查询积分使用情况
      description: 查询当前用户和令牌的积分余额及使用情况
      operationId: getCredits
      responses:
        '200':
          description: 积分信息查询成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditsResponse'
              example:
                data:
                  token:
                    remaining_credits: 99416.4429
                    unlimited_credits: false
                    used_credits: 583.5571
                  user:
                    remaining_credits: 1095.3996
                    used_credits: 135.9048
                message: ''
                success: true
        '400':
          description: 请求参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 400
                  message: Invalid request
                  type: invalid_request_error
        '401':
          description: 未认证、Token无效或过期
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 401
                  message: Invalid or expired token
                  type: authentication_error
        '403':
          description: 无权限访问
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 403
                  message: Access denied
                  type: permission_error
        '429':
          description: 请求频率超限
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 429
                  message: Rate limit exceeded
                  type: rate_limit_error
                  fallback_suggestion: retry after 60 seconds
        '500':
          description: 服务器内部错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 500
                  message: Internal server error
                  type: internal_server_error
                  fallback_suggestion: try again later
        '502':
          description: 上游服务错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 502
                  message: Upstream service error
                  type: upstream_error
                  fallback_suggestion: try again later
        '503':
          description: 服务暂时不可用
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 503
                  message: Service temporarily unavailable
                  type: service_unavailable_error
                  fallback_suggestion: retry after 30 seconds
components:
  schemas:
    CreditsResponse:
      type: object
      required:
        - data
        - message
        - success
      properties:
        data:
          type: object
          required:
            - token
            - user
          properties:
            token:
              type: object
              description: 令牌积分信息
              required:
                - remaining_credits
                - unlimited_credits
                - used_credits
              properties:
                remaining_credits:
                  type: number
                  format: double
                  description: 令牌剩余积分
                  example: 99416.4429
                unlimited_credits:
                  type: boolean
                  description: 该令牌是否无最大使用额度限制
                  example: false
                used_credits:
                  type: number
                  format: double
                  description: 令牌已使用积分
                  example: 583.5571
            user:
              type: object
              description: 用户积分信息
              required:
                - remaining_credits
                - used_credits
              properties:
                remaining_credits:
                  type: number
                  format: double
                  description: 用户剩余积分
                  example: 1095.3996
                used_credits:
                  type: number
                  format: double
                  description: 用户已使用积分
                  example: 135.9048
        message:
          type: string
          description: 响应消息
          example: ''
        success:
          type: boolean
          description: 请求是否成功
          example: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              description: HTTP状态错误代码
              example: 401
            message:
              type: string
              description: 错误描述信息
              example: Invalid or expired token
            type:
              type: string
              description: 错误类型
              example: authentication_error
            param:
              type: string
              description: 相关参数名称
              example: token
            fallback_suggestion:
              type: string
              description: 错误处理建议
              example: retry after 60 seconds
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##所有接口均需要使用Bearer Token进行认证##

        **获取 API Key ：**

        访问 [API Key 管理页面](https://evolink.ai/dashboard/keys) 获取您的 API Key

        **使用时在请求头中添加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````