Skip to main content
POST
Get Agent Analytics
Use this API to fetch AI token usage analytics and execution counts. Data is aggregated from per-workspace Firestore usage documents. Filter by agentId, year, month, and/or model.

Endpoint

POST https://api.velt.dev/v2/agents/analytics/get

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

Params

data
object
required

Example Requests

1. Aggregate analytics (all agents)

2. Single agent analytics

3. Filtered by year and month

4. Filtered by model

Response

The analytics object maps to the AgentAnalyticsResponse interface. Model keys are formatted as provider_model (e.g. "claude_claude-sonnet-4-6").

Success Response

TokenUsageSummary fields (repeated in every breakdown): tokenUsage breakdown keys: executionCounts map:

Failure Response

Errors: INVALID_ARGUMENT (invalid year or month format).