Skip to content

Input an OpenAI API key and get information about the account, GPT-4 availability, API usage, and other related information.

License

Notifications You must be signed in to change notification settings

CCCBora/openai_api_key_status

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

title colorFrom colorTo sdk sdk_version app_file pinned license python_version
Openai Api Key Status
gray
green
gradio
3.26.0
app.py
false
mit
3.10.10

OpenAI API Key Status Checker

This web app allows you to input your OpenAI API key and get information about your account, GPT-4 availability, API usage, and other related information.

Usage - Huggingface Spaces

  1. Go to OpenAI API Key Status Checker.
  2. Enter your OpenAI API key in the provided textbox.
  3. Click the 'Submit' button to display the information associated with your API key.

Usage - API

  1. Install gradio_client.
pip install gradio_client
  1. Connect the client and call the API.
from gradio_client import Client

client = Client("https://shaocongma-openai-api-key-status.hf.space/")
json_file_path = client.predict("sk-......", 
                        api_name="/get_key_info")
  1. Read the output JSON file.
with open(json_file_path, "r") as f:
    result = f.read()
print(result)
  1. Sample output:
# result - valid key
{"account_name": "Peter Parker", "key_availability": true, "gpt4_availability": true, "has_payment_method": true, "used": 10.33174, "limit": 120.0}
# result - invalide key
{"account_name": "", "key_availability": false, "gpt4_availability": "", "has_payment_method": "", "used": "", "limit": ""}

License

This project is released under the MIT License. Please see the LICENSE file for more information.

About

Input an OpenAI API key and get information about the account, GPT-4 availability, API usage, and other related information.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages