A simple Python script to check your DeepSeek API account balance.
This script makes an HTTP GET request to the DeepSeek API to retrieve your account balance information. It uses environment variables to securely store your API key.
- Python 3.x
requests
librarypython-dotenv
library- A DeepSeek API key
- Install the required packages:
pip install requests python-dotenv
- Create a
.env
file in the root directory of your project and add your DeepSeek API key:
DEEPSEEK_API_KEY=your_api_key_here
Simply run the script:
python balance_checker.py
The script will output your current DeepSeek API account balance information in JSON format.
DEEPSEEK_API_KEY
: Your DeepSeek API authentication token
Never commit your .env
file to version control. Make sure to add .env
to your .gitignore
file.
This project is open source and available under the MIT License.