Overview
The Unleeshed Partner API uses API Key authentication for all server-to-server requests. API keys are issued to licensed partners and provide secure access to your licensed personas and commentary generation.Getting Your API Key
- Log into the Partner Dashboard
- Navigate to Developer → API Keys
- Click Create API Key
- Select the required scopes (permissions)
- Copy and securely store the key
Using Your API Key
Include the API key in theX-Api-Key header for all requests:
API Key Scopes
API keys have granular scopes that control what actions they can perform:Key Format
API keys follow this format:Security Best Practices
Never expose keys in client-side code
Never expose keys in client-side code
API keys should only be used in server-side code. Never include them in:
- JavaScript bundles served to browsers
- Mobile app source code
- Public repositories
- Client-side environment variables
Use environment variables
Use environment variables
Store API keys in environment variables or a secrets manager:
Rotate keys periodically
Rotate keys periodically
Rotate your API keys every 90 days or immediately if you suspect compromise:
- Create a new API key in the dashboard
- Update your application to use the new key
- Verify the new key works
- Revoke the old key
Use IP restrictions (optional)
Use IP restrictions (optional)
For additional security, restrict your API key to specific IP addresses:
- Go to Developer → API Keys
- Click on your key
- Add allowed IP addresses
Error Responses
Authentication errors return a401 status code:
Rate Limiting
API keys are subject to rate limits:
When rate limited, you’ll receive a
429 response with a Retry-After header.
Next Steps
Create Your First Topic
Learn how to generate commentary with your API key.
API Reference
Explore all available endpoints.