Authentication
The Anchor API uses API keys to authenticate requests. You can view and manage your API keys in the Anchor Dashboard.
API Keys
All API requests require authentication via the X-API-Key header:
curl https://api.getanchor.dev/v1/agents \
-H "X-API-Key: your-api-key-here"⚠️ Security Warning: Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
Getting Your API Key
Sign up at app.getanchor.dev to get your API key and workspace ID.
HTTPS Required
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Example Request
# Using curl
curl https://api.getanchor.dev/v1/agents \
-H "X-API-Key: anc_1234567890abcdef" \
-H "Content-Type: application/json"
# Using Python
import requests
headers = {
"X-API-Key": "anc_1234567890abcdef",
"Content-Type": "application/json"
}
response = requests.get(
"https://api.getanchor.dev/v1/agents",
headers=headers
)
# Using TypeScript/JavaScript
const response = await fetch('https://api.getanchor.dev/v1/agents', {
headers: {
'X-API-Key': 'anc_1234567890abcdef',
'Content-Type': 'application/json'
}
});