-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
API Key 余额信息查询 #79
Copy link
Copy link
Closed
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existsenhancementNew feature or requestNew feature or request
Description
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existsenhancementNew feature or requestNew feature or request
目前通过接口可以查询到部分Key信息,而无需对话请求。
可以在后台对Key测试后记录并显示当前查询到的信息。
以下是从代码中提取出的OpenAI官方API接口:
https://api.openai.com/dashboard/billing/subscription用于获取OpenAI订阅信息的API接口。调用方式和官方其他API一样,该接口需要在请求的Authorization标头中包含密钥。
https://api.openai.com/dashboard/billing/usage用于获取OpenAI使用情况的API接口。该接口也需要在请求的Authorization标头中包含密钥。
此外,还需要在URL的查询参数中提供起始日期和结束日期,以指定要获取的使用情况的时间范围(例如最近两个月)