Authentication
All API endpoints (except/api/v1/health) require authentication using a Bearer token.
Getting your API key
- Sign up at pixcraft.es
- Subscribe to an API plan at pixcraft.es/developers
- Navigate to Dashboard → API Keys
- Click Create API Key
px_live_a1b2c3d4e5f6...
Using your API key
Include the key in theAuthorization header of every request:
API key properties
Each API key has the following configuration:Note: Monthly usage limits are tracked at the account level, not per key. All your API keys and widgets share the same monthly counter. See Rate Limiting for details.
Error responses
Example error response:
Security best practices
- Never expose your API key in client-side code — always call the API from your backend
- Use domain restrictions — configure
allowed_domainsto limit where the key can be used - Rotate keys — if a key is compromised, deactivate it and create a new one
- Use separate keys — create different keys for development, staging, and production