Use your own Grok API key
Run AI on your own xAI account. About five minutes.
Why this is the best way
- Cheap. About a tenth to a fifth of a cent per Enhance. A thousand cost $1 to $2 (estimates).
- Private. Your post goes from your Mac straight to xAI, never through ScreenPost's server.
- No limit. After the 10 free AI uses, your key runs AI.
- Yours. You set the limits and can turn the key off any time.
Or let Grok Bot do the clicking
In ScreenPost, click Open Grok Bot, then press ⌘V and Return in Grok Bot.
It opens console.x.ai and stops at API Keys. You click Create API key and paste the key into ScreenPost. The bot never sees the key.
Steps
- Open console.x.ai. xAI's developer console, separate from the Grok chat app. Open console.x.ai
- Sign in with X. Use your X account. Open accounts.x.ai
- Add credits and set a limit. Billing, then API spend management. Buy $10 of prepaid credit, auto top-up off. Open xAI billing docs
- Create an API key. API Keys, then Create API Key. Name it ScreenPost. Open API Keys
- Copy the key. Copy it now. ScreenPost picks it up from your clipboard.
- Paste it in ScreenPost. Settings, AI, Use your own Grok key, then Test and save. The key stays in your Keychain.
What it costs
Per million tokens: grok-4.3 is $1.25 in and $2.50 out. grok-4.7, grok-4.6 and grok-4.5 are $2 in and $6 out. An Enhance is about 1,000 tokens in and a few hundred out.
Spending limits
Prepaid credits with auto top-up off is the safest limit. When the credits run out, xAI stops answering.
With auto top-up, set a monthly maximum in API spend management. xAI's Usage explorer shows what your key spent.
Rotate or revoke a key
In API Keys, delete the key to revoke it, or create a new one and delete the old one. Then paste the new key in ScreenPost Settings. Remove deletes it from your Mac.
When your key runs out
If xAI rejects your key, you are out of credit, or a rate limit doesn't clear, ScreenPost stops and says: Your xAI key couldn't be used. Fix key opens Settings. Nothing runs in the background.
Troubleshooting
401: xAI doesn't accept the key. Create a new one and paste it again.
403: the key isn't allowed to do this. Check its restrictions and your credits.
429: too many requests. ScreenPost retries once. If it still fails, wait a minute.
Out of credits: add credits under Billing, API spend management.
Model not available: choose another model in Settings.
Couldn't reach xAI: check your connection. Nothing was spent.
Privacy
Requests go from your Mac to api.x.ai with your key. ScreenPost's server never sees them.
xAI says it keeps API requests for 30 days to check for abuse, then deletes them, and doesn't train on them without permission (docs.x.ai/docs/faq/security).