Code Monkey home page Code Monkey logo

lq204710475 / openai-chatgpt-billing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lonlie/openai-chatgpt-billing

0.0 0.0 0.0 45 KB

实现免登录查询OpenAI ChatGPT用量及余额,包含前端html页面和后端的主要逻辑,简洁高效,可以自己部署实现。 支持通过key(格式:sk-xxx)或者session key(格式:sees-xxx)查询。同时适用于共享大号额度查询的场景,可以查询指定用户公共ID(user_public_id或user_id,格式:user-xxx)的用量情况。 支持指定日期用量查询。 查询结果包含:剩余额度、总额度、已用额度、是否绑卡、key到期时间。 针对官方每分钟5次的限制做了优化。 可以分别统计各模型分别的用量。This project that allows login-free querying of OpenAI ChatGPT usage and balance.

Home Page: https://gptbill.lonlie.cn/

C# 35.23% HTML 64.77%

openai-chatgpt-billing's Introduction

openai-chatgpt-billing

2024-1-12 更新

说明:

  • 本项目实现实现免登录查询OpenAI ChatGPT用量及余额,包含前端html页面和后端的主要逻辑,简洁高效,可以自己部署实现。
  • 支持通过key(格式:sk-xxx)或者session key(格式:sees-xxx)查询。
  • 同时适用于共享大号额度查询的场景,可以查询指定用户公共ID(user_public_id或user_id,格式:user-xxx)的用量情况。
  • 支持指定日期用量查询。
  • 查询结果包含:剩余额度、总额度、已用额度、是否绑卡、key到期时间。
  • 针对官方每分钟5次的查询限制做了优化。 可以分别统计各模型分别的用量。

已部署好的版本,可直接在线使用:

image

接口依据:

相关功能基于官方的接口实现,主要是下面两个:

账号订阅的情况(通过sees):https://api.openai.com/v1/dashboard/billing/subscription

用量清单(通过sees):https://api.openai.com/v1/dashboard/billing/usage?start_date=2023-12-1&end_date=2023-12-12

指定日期用量情况(通过key):https://api.openai.com/v1/usage?date=2023-12-1&user_public_id=user-xxx

可参考的文章:

现存问题:

  • 通过key查询用量时,由于usage接口中没有提供具体使用了哪个dalle及图片质量参数,导致dalle相关相关模型的用量结果可能不精确

联系作者及充值购买相关账号额度资源:

image image

openai-chatgpt-billing's People

Contributors

lonlie avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.