Analyze usage patterns and identify optimization opportunities to reduce costs and improve efficiency.
GEThttps://api.aitronos.com/v1/analytics/usage/optimization/{org_id}
org_id string required
The organization ID.
days integer
Number of days to analyze. Default: 30. Range: 7-90.
metric string optional
Metric type to analyze: neurons, synapses, or omit for combined metrics. Default: combined (null).
Returns optimization recommendations and potential cost savings.
Bash
- Bash
- Python
- Python
- JavaScript
curl "https://api.aitronos.com/v1/analytics/usage/optimization/org_abc123?days=30" \
-H "X-API-Key: $FREDDY_API_KEY"Response:
200 OK
{
"organization_id": "org_abc123",
"metric": null,
"current_efficiency": {
"score": 72,
"rating": "good",
"cost_per_request": 0.0025,
"avg_response_time_ms": 850
},
"optimization_opportunities": [
{
"type": "off_peak_shifting",
"description": "Move 20% of requests to off-peak hours",
"estimated_savings_percent": 15,
"effort": "low"
},
{
"type": "caching",
"description": "Cache repeated queries to reduce redundant calls",
"estimated_savings_percent": 10,
"effort": "medium"
}
],
"recommendations": [
"Batch similar requests during off-peak hours",
"Implement response caching for frequently repeated queries"
],
"potential_savings": {
"estimated_percent": 25,
"estimated_monthly_reduction": 3750
}
}