Prerequisites
Before creating an API key, make sure you:- Have a BabySea account.
- Are signed in to the dashboard.
- Can manage the account. In a team workspace,
primary-ownerandownercan create keys, whilemembercan only view the page.
Step by step
Click Create API key
Click Create API key in the top right corner. BabySea opens the dialog Add API key.
Fill in Name
Enter a value in the field Name. The current dashboard accepts up to 100 characters.
| Example name | Use case |
|---|---|
prod-api-worker | Production backend generating images |
dev-frontend | Development environment |
staging-monitor | Staging health checks |
analytics-reader | Dashboard that reads usage data |
Choose Permissions
In the Permissions section, select one of the built-in presets:
See Scopes for the full endpoint mapping.
| Preset | Dashboard description |
|---|---|
Full Access | All permissions - read, write, delete |
Generate Only | Create & read generations + browse models |
Read Only | Read generations, account info, health - no spending |
Monitor Only | Health checks & model catalog - no account data |
Optional - add an IP allowlist
Use the field IP allowlist (optional) if you want the key to work only from specific source IPs. Enter the list as comma-separated values:The helper text under the field is
Comma-separated IPs. Leave empty to allow all IPs.Leave the field empty to allow requests from any IP. The current action accepts up to 50 entries.Store the key
After creation, BabySea opens the dialog View API key and shows the full secret once:The dialog includes:
- the warning text
You can only see this key once. Store it safely. Show valueandHide value- a copy button
- The final action Done
Using your key
- SDK
- cURL
- Python
TypeScript
Verify the new key
Before sending generation traffic, verify the key withGET /v1/status. This route requires the account:read scope, so it is included in Full Access and Read Only, but not in Generate Only or Monitor Only.
Terminal
apikey_name, apikey_prefix, and key timestamps.
If you want a quick test for a Generate Only key, send a normal generation request instead.
Store your key securely
- Environment variable
- Secrets manager
Add the key to your Then reference it in code:
.env file (make sure .env is in your .gitignore):.env
TypeScript
After creation
Your new key appears in the API keys table. From that table, owners can later:- Rotate the key to create a replacement key and keep the old key working during the selected grace period.
- Revoke the key to disable it immediately.
- Delete the key to permanently remove it and all associated logs.