Giter VIP home page Giter VIP logo

openai-balance's Introduction

Openai-Balance

一个由 go 语言编写的 Openai 余额获取程序,只需要提供 Api Key 即可获取

Why

Openai四月份的更新,导致credit_grants接口只能使用浏览器token访问,若使用Api Key则会返回:Your request to GET /dashboard/billing/credit_grants must be made with a session key (that is, it can only be made from the browser). You made it with the following key type: secret.,大意就是不再支持Api Key来调用这个接口了。

How

参考网上大佬的方案,暂时只能使用subscription接口获取总额度,然后使用usage接口获取使用量,相减来得到余额。

Usage

1.下载程序到服务器

wget https://github.com/LaoYutang/openai-balance/releases/download/release/openai-balance-linux-amd64 -O openai-balance
chmod +x openai-balance

2.使用获取余额

./openai-balance -k $你的Api Key

另外可以是用 -p 添加网络代理地址 例子:-p http://[email protected]:8888

openai-balance's People

Contributors

laoyutang avatar

Stargazers

 avatar  avatar  avatar Wizyoung avatar  avatar  avatar

Watchers

Kostas Georgiou avatar  avatar

Forkers

chappyhome wrhsd1

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.