Getting Started
API Keys
API keys are the simplest way to authenticate with the Anagrama API. Generate a key in the Developer Portal and include it in every request.
How to get a key
- Sign in at playanagrama.com
- Open Developer Portal → API Keys
- Click Generate New Key and give it a name
- Copy the key immediately — it is only shown once
Using your key
There are two ways to authenticate with your API key:
Option 1: Environment variable (recommended)
Set the ANAGRAMA_API_KEY environment variable. All SDKs read it automatically — no code changes needed.
export ANAGRAMA_API_KEY="ak_your_key_here"Option 2: Pass it in your code
Pass the key directly to the SDK constructor. This takes priority over the environment variable.
curl "https://api.playanagrama.com/api/v1/words/random" \
-H "Authorization: Bearer ak_your_key_here"Raw HTTP header
If you're not using an SDK, include your key as a Bearer token in the Authorization header:
Authorization: Bearer ak_your_key_hereMonitor request volume on the Usage dashboard, or set up Webhooks to get notified about key events. Need full gameplay access? Use the Device Code Flow for CLI/terminal applications.