openAI-dashboard is an open-source Dashboard that allows the user to visualize in a clear and intuitive way how OpenAI models are being used.
git clone https://github.com/Rayjay-8/openAI-dashboard.git
cd openAI-dashboard
npm install
Copy the .env.local.example file in this directory to .env.local (which will be ignored by Git):
Variable | Description |
---|---|
OPENAI_API_KEY |
OpenAI API Key. |
OPENAI_API_SESS |
OpenAI Bearer session obtained from /features or /subscription routes |
OPENAI_BEARER_TOKEN |
To get user info, obtained from /login route |
npm run dev
Open http://localhost:3000 with your browser to see the result.
Routes:
-
user info obs: token = OPENAI_BEARER_TOKEN https://api.openai.com/dashboard/onboarding/login
-
graph data obs: token = OPENAI_API_SESS https://api.openai.com/dashboard/billing/usage?end_date=2023-06-01&start_date=2023-05-01
-
soft and hard limit obs: token = OPENAI_API_SESS https://api.openai.com/dashboard/billing/subscription
-
get request number, tokens and context obs: token = OPENAI_API_KEY https://api.openai.com/v1/usage?date=2023-05-08
- GitHub issues - to report bugs
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.