Authentication
LLMTune uses workspace-scoped API keys for programmatic access. All API requests require authentication using a Bearer token in the Authorization header.Creating an API Key
- Navigate to API Keys in the LLMTune dashboard.
- Click Create API Key.
- Give your key a descriptive name (e.g.,
production-backend,staging-testing). - Copy the generated key immediately – you won’t be able to see it again.
llmtune_sk_...
Using an API Key
Include the key as a Bearer token in theAuthorization header:
Example Request
Workspace Scoping
API keys are scoped to your workspace:- All keys in a workspace share the same resources (datasets, models, deployments)
- Keys grant access to all workspace features (inference, fine-tuning, deployment, etc.)
- Usage is tracked per key for analytics and debugging
Security Best Practices
Store Keys Securely
- Never commit API keys to version control
- Use environment variables to store keys
- Use secret managers (AWS Secrets Manager, HashiCorp Vault, etc.) in production
Rotate Keys Regularly
- Rotate keys periodically (e.g., every 90 days)
- Rotate immediately if a key is compromised
- Update integration environments with new keys before deleting old ones
Use Separate Keys
- Different keys per environment – Use separate keys for staging and production
- Different keys per service – Use different keys for different backend services
- Different keys per team – Use different keys for different teams or projects
Restrict Access
- Delete unused keys from the dashboard to reduce exposure
- Monitor key usage in the Usage dashboard
- Revoke compromised keys immediately
Key Management
Viewing Keys
- See all your API keys in the API Keys section of the dashboard
- View key metadata (name, created date, last used)
- Note: You cannot view the key value after creation
Revoking Keys
- Go to API Keys in the dashboard
- Find the key you want to revoke
- Click Revoke or Delete
- Confirm the revocation
401 Unauthorized.
Error Responses
Invalid or missing API keys return:401 Unauthorized
Next Steps
- Read the API Overview for endpoint details
- Check the Inference API Guide for usage examples
- Review API Endpoints for all available endpoints