# 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](/developers/api.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.agenticflow.ai/developers/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
