API Keys
API keys authenticate requests to the model gateway. Create a separate key for each application or environment so access and usage can be controlled independently.
Before You Start
- Confirm which models the application must access.
- Decide the token limits, expiration, and optional IP restrictions required by your policy.
- Prepare a secret manager or environment-variable store for the key.
Create an API Key
- Open Account → API Keys (in your deployed Console).
- Select Create New Key.
- Enter Name, then keep All Models selected or choose an explicit model allowlist.
- Configure the optional controls required by your policy: TPM (Tokens Per Minute), Yearly Token Limit, total/yearly/monthly Spending Limits, IP Whitelist, and Expires At.
- Enable Context Record only when request/response recording is approved for this application.
- Create the key and copy it to your secret manager immediately.
Protect the credential
Never commit an API key to source control, paste it into documentation, or print it in logs. Examples in Docs use environment variables.
Verify the Result
Use the key in the request from Quickstart, then confirm the request appears in Usage or History.
Troubleshooting
- Confirm the key is enabled, unexpired, and allowed to access the selected model.
- Confirm the request uses
Authorization: Bearer <API_KEY>. - Check token, spending, model, and IP restrictions before creating another key.
Next Step
Continue to Quickstart to make the first request.