API keys
Create API keys under Developers › API keys, each with only the permissions you choose, for your own code, the CLI or a site.
API keys let your own code and tools work with your account: list and read what you've made, list your leads, start animations and render videos. The CLI uses a key to add marketplace components.
Create a key
- Go to Developers › API keys (/studio/developers/api).
- Give the key a name, such as "Website build" (optional).
- Under What this key can do, tick only what it needs.
- Choose Create API key.
- Copy the key straight away. It is shown only once.
Keys start with pgm_. You can have up to 10 active keys.
What a key can do
Each key has only the permissions ticked when it was made:
- Published animations: list animations you have published with a share link, and their embeds, and read the marketplace catalog. This is the default, and the CLI needs it.
- Read animations, Read decks, Read graphics and Read logos: list and read them, with their share links.
- Read leads: list the emails people left on your sign-up cards.
- Make animations: start a new animation from a prompt. It uses your credits the same way the studio does.
- Render videos: render an MP4 or GIF of an animation. The download is kept for a day.
A key can't change your account settings, billing or team. Marketplace downloads made with a key count toward your plan's monthly allowance, the same as downloading in the studio.
Revoking
Revoke a key from the same page when you no longer need it, or if it may have been shared. It stops working at once.
Using the API
Send the key as a bearer token in the Authorization header. Requests are rate-limited; over the limit you get a 429 response and should retry after a minute. Starting animations and renders has its own, lower limits. The endpoints, scopes and webhook events are described in the API documentation.