Authentication
Last updated: Mar 10, 2026
Authentication
# Authentication
The Microdil API uses API keys to authenticate requests.
## Obtaining an API Key
1. Sign in to your [Developer Dashboard](/developer/)
2. Create a new application
3. Generate an API key for your application
4. Copy and securely store your API key
⚠️ **Important**: Your API key will only be displayed once. Store it securely.
## Using Your API Key
Include your API key in the `Authorization` header of every request:
```
Authorization: Bearer YOUR_API_KEY
```
## API Key Format
API keys are prefixed with `md_` followed by a random string:
```
md_abc123def456ghi789jkl012mno345pqr678
```
## Security Best Practices
1. **Never commit API keys to version control**
2. **Use environment variables** to store keys
3. **Rotate keys regularly** for security
4. **Use different keys** for development and production
5. **Revoke compromised keys** immediately
## Rate Limiting
Each API key has rate limits:
- **60 requests per minute**
- **10,000 requests per day**
Rate limit information is included in response headers:
- `X-RateLimit-Limit`: Total requests allowed
- `X-RateLimit-Remaining`: Requests remaining
- `X-RateLimit-Reset`: Time when limit resets
## Testing Authentication
Test your API key with a simple request:
```bash
curl -X GET https://api.microdil.com/v1/status \
-H "Authorization: Bearer YOUR_API_KEY"
```
Expected response:
```json
{
"status": "ok",
"authenticated": true,
"application": "Your App Name"
}
```