Validate LLM API keys and probe which capabilities are accessible — from the terminal.
Supports Anthropic, OpenAI, Google Gemini, Mistral, Groq, Cohere, Together AI, Perplexity, DeepSeek, xAI, Hugging Face, and Replicate.
go install github.com/datumbrain/keyprobe@latestOr build from source:
git clone https://github.com/datumbrain/keyprobe
cd keyprobe
go build -o keyprobe .keyprobe <api-key> [flags]
Provider is auto-detected from the key prefix. Use a --<provider> flag to override.
keyprobe sk-ant-api03-... # Anthropic (auto-detected)
keyprobe sk-proj-... # OpenAI (auto-detected)
keyprobe AIzaSy... # Gemini (auto-detected)
keyprobe --anthropic <key>
keyprobe --openai <key>
keyprobe --gemini <key>
keyprobe --mistral <key>
keyprobe --groq <key>
keyprobe --cohere <key>
keyprobe --together <key>
keyprobe --perplexity <key>
keyprobe --deepseek <key>
keyprobe --xai <key>
keyprobe --huggingface <key>
keyprobe --replicate <key>CLI (default)
Provider: Anthropic
Status: ✓ VALID
Tested: claude-haiku-4-5-20251001 (used for validation)
Capabilities:
✓ Messages API (chat) Send and receive chat messages
✓ Streaming Stream tokens in real-time
✓ Claude Sonnet 4 access Access to claude-sonnet-4-20250514
✗ Claude Opus 4 access Access to claude-opus-4-20250514
✓ Claude Code (CLI) Run `claude` CLI — requires Sonnet 4 or Opus 4 access
✓ Batch API Asynchronous large-scale message processing
✓ Files API (beta) Upload and manage files for use in messages
JSON
keyprobe --output json <key>{
"provider": "Anthropic",
"valid": true,
"model": "claude-haiku-4-5-20251001 (used for validation)",
"capabilities": [
{ "name": "Messages API (chat)", "available": true, "description": "Send and receive chat messages" },
{ "name": "Streaming", "available": true, "description": "Stream tokens in real-time" }
]
}| Code | Meaning |
|---|---|
0 |
Key is valid |
1 |
Key is invalid or an error occurred |
| Provider | Auto-detected prefix |
|---|---|
| Anthropic | sk-ant- |
| OpenAI | sk-, sk-proj- |
| Google Gemini | AIzaSy |
| Groq | gsk_ |
| Replicate | r8_ |
| Hugging Face | hf_ |
| xAI | xai- |
| Perplexity | pplx- |
| Together AI | together-, tgr_ |
| Mistral | 32-char key |
| DeepSeek | 64-char key |
| Cohere | sk-cohere- or 40-char key |
MIT