Get an API key
Keys are free. Choose the type that matches where your code runs:
Secret key sn_sk_ | Publishable key sn_pk_ | |
|---|---|---|
| Runs on | Servers, scripts, notebooks, cron jobs | Web pages (browser) |
| Limit | 300/minute, 10,000/day | 120/minute, 5,000/day |
| Protection | Refused if sent from a browser | Accepted only from your registered origins |
Your key is ready. Copy it now: it is shown only once.
Management token (keep it private, never in your web page). You need it to rotate or revoke this publishable key.
A publishable key also comes with a management token (sn_mt_…). Store it privately, for example in a password manager: it is the only way to rotate or revoke that key yourself.
After creating a key, read Authentication for how to send it, rotate it and keep it safe.