# Authentication

How to authenticate API requests to AgenticFlow.

## API Keys

### Generating API Keys

1. Go to Settings → API Keys
2. Click "Create API Key"
3. Name your key
4. Copy the key (only shown once!)
5. Store securely

### Using API Keys

Include in the `Authorization` header:

```bash
curl -H "Authorization: Bearer YOUR_API_KEY" \
     https://api.agenticflow.com/v1/agents
```

## Security Best Practices

* Never commit API keys to version control
* Rotate keys regularly
* Use environment variables
* Implement key expiration
* Monitor key usage

## Error Responses

* `401 Unauthorized` - Invalid or missing API key
* `403 Forbidden` - Insufficient permissions
* `429 Too Many Requests` - Rate limit exceeded

[← Back to API Documentation](https://docs.agenticflow.ai/developers/broken-reference)
