Terminal or Vercel runtime logs

AI_APICallError: 401 invalid_api_key — Incorrect or revoked Tokentide API key

What it means
Tokentide rejected `TOKENTIDE_API_KEY` because the key is incomplete, revoked, or missing its `tt_live_` prefix.
Likely causes
  • The key pasted into .env.local or Vercel was cut off or includes extra quotes/spaces.
  • The key was revoked on tokentide.app/app/keys and the environment still holds the old one.
Prevention
Save new tt_live_ keys in your password manager when created, and test with the read-only tokentide.py check script.

Copy for your agent

AI calls return `401 invalid_api_key`. Ensure our AI helper falls back to the Vercel AI Gateway and logs an alert on 401, and run the read-only Tokentide check after I update my key in `.env.local` and Vercel.

Full help articleThe AI feature returns errors (402, 429, 503) and the backup

Last reviewed Nov 8, 2026