Authenticate with an API key
Every Letra API request carries your key as Authorization: Bearer letra_sk_.... Letra makes one key per product, shows it once and can't show it again.
Keep the key on your server. A request without it, or with a revoked one, answers 401 unauthorized.
Send the key
curl https://letralayer.com/api/v1/score \ -H "Authorization: Bearer $LETRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "text": "A short draft to check." }'A 200 means the key works. Check a key by its status, never by printing it: a key in a log or a chat is a leaked key.
Get a key
API keys aren't self-serve yet. Ask for one and say what you're building. Each product gets its own key; a staging server and production never share one.
Keep it safe
- Keep it in an environment variable on your server, such as
LETRA_API_KEY. Never in source code, a config file in git, or a browser. - Call Letra from your backend only. A key in a web page or an app bundle can be read by anyone who opens it.
- If a key leaks, tell us: we revoke it and make you a new one. A revoked key answers
401from the next request.
API keys and personal keys
An API key is for a product and works on the API only. A personal key is for one person's Letra ID and works on the Letra MCP only: connect an agent with a personal key. Neither works at the other's address.