API Integration Guide
Integrate LLM Metrix data into your existing tools and workflows.
Getting Started
Authentication
All API requests require an API key:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.llmmetrix.com/v1/visibility
Generate your API key at Settings > API.
Core Endpoints
Get Visibility Score
GET /v1/visibility
Returns current visibility score and breakdown.
Get Mentions
GET /v1/mentions
Parameters:
engine: Filter by AI enginesentiment: Filter by sentimentfrom,to: Date range
Get Competitors
GET /v1/competitors
Returns competitor comparison data.
Webhooks
Configure webhooks to receive real-time updates:
- Go to Settings > Webhooks
- Add your endpoint URL
- Select events to subscribe to
- Verify with test event
Event Types
visibility.changedmention.newalert.triggeredcompetitor.updated
Rate Limits
| Plan | Requests/min | Requests/day |
|---|---|---|
| Starter | 60 | 10,000 |
| Pro | 300 | 100,000 |
| Enterprise | Custom | Unlimited |
SDKs
Official SDKs available:
- JavaScript/TypeScript
- Python
- Ruby
- Go
Example Integration
import { LLMMetrixClient } from '@llmmetrix/sdk';
const client = new LLMMetrixClient('YOUR_API_KEY');
// Get visibility score
const visibility = await client.getVisibility();
// Get recent mentions
const mentions = await client.getMentions({
engine: 'chatgpt',
limit: 10
});