Skip to main content
The API is available exclusively on Enterprise plans. Contact us to learn more about enterprise pricing and features.
The Macaly API uses API keys for authentication. API keys are team-scoped and share the same credit system as the web interface.

Getting an API Key

  1. Log in to your Macaly account
  2. Click on your team dropdown (top right)
  3. Select “API Keys”
  4. Click “Create API Key”
  5. Copy the key immediately (it will only be shown once)

Using the API Key

Include the API key in the Authorization header for all requests:
Authorization: Bearer macaly_your_api_key_here

Example Request

curl -X POST https://www.macaly.com/api/chat \
  -H "Authorization: Bearer macaly_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"content": "Create a landing page"}'

API Key Format

PropertyValue
Prefixmacaly_
Full length~39 characters
Examplemacaly_abc123def456ghi789jkl012mno345

Security Best Practices

API keys provide full access to your team’s resources and credits. Treat them like passwords.
  1. Store keys securely - Use environment variables, never commit to code
  2. Rotate keys regularly - Revoke and recreate keys periodically
  3. Use separate keys - Create different keys for different environments/applications
  4. Monitor usage - Check your balance regularly via the dashboard
  5. Revoke compromised keys - If a key is exposed, revoke it immediately

Rate Limits

  • Failed API key attempts are rate limited to 5 per minute per IP
  • This protects against brute-force attacks

Key Management

You can manage your API keys in the Macaly dashboard:
  • View keys - See all active keys with their creation date and last used time
  • Create keys - Generate new keys with optional names for identification
  • Revoke keys - Disable keys that are no longer needed or compromised