Keys / Pexels
PEXELS_API_KEY
The Pexels API key your app fetches photos and videos with. The API is free, with 200 requests an hour and 20,000 a month by default.
- Expires
- the docs don't say
- API
- none; one key per account
Get it
Create one on www.pexels.com/api/key. The steps aren't recorded yet.
Set it
PEXELS_API_KEY=...
The Ruby gem reads it from this variable when you don't pass a key. The JavaScript and .NET libraries take the key from your app. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- Pexels gives each account one key, and you can't change it yourself. Email
api@pexels.comto ask for a new one. Pexels has paused issuing new keys for now. - Deploy the new key everywhere that reads
PEXELS_API_KEY. It goes in theAuthorizationheader. - Once requests succeed with the new key, ask Pexels to cancel the old one.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.