Created
March 20, 2026 05:31
-
-
Save jongan69/0fb9832010ac559e2abce1a6e6c9946c to your computer and use it in GitHub Desktop.
Bash Script for checking if api key is working
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| API_KEY=$(/usr/bin/security find-generic-password -a jon -s openclaw-anthropic-key -w) && curl -s https://api.anthropic.com/v1/messages -H "x-api-key: $API_KEY" -H "anthropic-version: 2023-06-01" -H "content-type: application/json" -d '{"model":"claude-haiku-4-5-20251001","max_tokens":10,"messages":[{"role":"user","content":"hi"}]}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment