API Key Security
API keys authenticate your requests to the Pictify API. Proper key management is essential for security.Key Format
A key is a single secret with full access to your account’s (or team’s) resources. New keys start withpic_live_ followed by 64 hex characters; keys created before September 2026 are bare 64-character hex strings and remain valid. There are no key types or sandbox keys — every key is live, and every render it makes consumes your plan’s monthly credits.
Creating API Keys
Dashboard
- Open Settings in the dashboard
- Click New key
- Copy the key — the list shows it masked, and the Copy button gives you the full value
Key Properties
Each key includes:- Secret - The key value itself (
pic_live_+ 64 hex characters) - Created - Creation timestamp
- Last used - When the API was last called from this account (shared across keys, not tracked per key)
Storing Keys Securely
Environment Variables
The recommended approach for most applications:Secrets Managers
For production environments, use a secrets manager:AWS Secrets Manager
Google Secret Manager
HashiCorp Vault
Kubernetes Secrets
Key Rotation
Regularly rotate API keys to limit exposure from potential leaks.Rotation Process
- Create new key - Generate a new API key in the dashboard
- Update applications - Deploy the new key to all services
- Verify - Confirm all services are using the new key
- Revoke old key - Delete the old key from the dashboard
Zero-Downtime Rotation
For production systems, use overlapping validity:Access Control
Principle of Least Privilege
Create separate keys for different purposes:
Every key has the same full access. Separate keys limit the blast radius of a leak and let you rotate one environment without touching the others; they do not carry different permissions.
Team Access
- Limit who can create keys - Only admins should create production keys
- Audit key usage - Monitor which keys are being used
- Remove departed employees - Revoke keys when team members leave
Monitoring & Auditing
Track Key Usage
The dashboard shows when the API was last called (Settings) and every render the API produced (Renders, filtered to the API source). Review it for renders you do not recognise.Usage Emails
Pictify emails you when you pass 50% and 90% of your monthly renders. A spike you did not expect is the earliest sign of a leaked key.Handling Compromised Keys
If you suspect a key has been compromised:Immediate Actions
- Revoke immediately - Delete the key in the dashboard
- Create new key - Generate a replacement
- Update services - Deploy the new key
- Review logs - Check for unauthorized usage
Investigation
- Identify scope - What data could have been accessed?
- Check usage - Review API logs for suspicious activity
- Determine source - How was the key exposed?
- Prevent recurrence - Implement safeguards
Security Checklist
- API keys stored in environment variables or secrets manager
-
.envfiles excluded from version control - Separate keys for production and development
- Keys rotated regularly (at least annually)
- Unused keys revoked
- API usage monitored for anomalies
- Access to key creation restricted
- Incident response plan documented