Go to file
Xerxes-2 2d0cbeaf18
feat: update request payload type to be generic and adjust test bodies to use GeminiRequest
2025-08-03 22:13:11 +10:00
.github/workflows feat: add GitHub Actions workflow for building and testing 2025-07-07 00:02:54 +08:00
src feat: update request payload type to be generic and adjust test bodies to use GeminiRequest 2025-08-03 22:13:11 +10:00
.gitignore feat: update configuration handling to support case-sensitive Config.toml and add example configuration file 2025-07-18 00:17:26 +08:00
Cargo.lock feat: add structured logging with tracing 2025-07-28 22:49:04 +08:00
Cargo.toml feat: add structured logging with tracing 2025-07-28 22:49:04 +08:00
Config.toml.example feat: add configurable retry mechanism for API requests 2025-07-31 20:57:19 +08:00
README.md feat: update README and main.rs to enhance proxy support with authentication details 2025-07-07 01:12:08 +08:00

README.md

Gemini-Keychecker

A tool to validate Google Gemini API keys.

Usage

Basic Usage

# Validate keys from keys.txt and save valid ones to output_keys.txt
./target/release/gemini-keychecker

# Specify custom input and output files
./target/release/gemini-keychecker -i my_keys.txt -o valid_keys.txt

Advanced Usage

# Use proxy with authentication
./target/release/gemini-keychecker -x http://username:password@proxy.example.com:8080

# Adjust concurrency and timeout
./target/release/gemini-keychecker -c 50 -t 30

# Use custom API host
./target/release/gemini-keychecker -u https://custom-api.googleapis.com/

Command Line Options

Options:
  -i, --input-path <INPUT_PATH>    Input file containing API keys [default: keys.txt]
  -o, --output-path <OUTPUT_PATH>  Output file for valid keys [default: output_keys.txt]
  -u, --api-host <API_HOST>        API host URL [default: https://generativelanguage.googleapis.com/]
  -t, --timeout-sec <TIMEOUT_SEC>  Request timeout in seconds [default: 60]
  -c, --concurrency <CONCURRENCY>  Max concurrent requests [default: 30]
  -x, --proxy <PROXY>              Proxy URL (supports http://user:pass@host:port)
  -h, --help                       Print help
  -V, --version                    Print version

Input Format

Create a text file with one API key per line

Proxy Configuration

The tool supports HTTP/HTTPS proxies with optional authentication:

# HTTP proxy without authentication
./target/release/gemini-keychecker -x http://proxy.example.com:8080

# HTTP proxy with authentication
./target/release/gemini-keychecker -x http://username:password@proxy.example.com:8080

# HTTPS proxy with authentication
./target/release/gemini-keychecker -x https://user:pass@secure-proxy.com:8443