AI Studio Docs
Developer API

Authentication

An API key, in a Bearer header

Every request needs an API Key, created from Workspace Settings, sent as a Bearer token:

Authorization: Bearer ak_your_key_here

What a key represents

A key represents your workspace, not a specific person. It carries no individual role, whoever's automation holds the key can do anything the API surface allows for that workspace.

Rate limits

Requests are rate-limited, currently per calling IP address rather than per key. If you're building something that calls the API frequently from a shared IP, design for a 429 response and back off, rather than assuming an unlimited rate.

Expiry

A key expires (90 days by default) and stops authenticating once it does. Rotate it before then.

On this page