Analytics
Return an AI-generated summary of API traffic for the given window.
The response always includes enabled and unavailable_reason so the client can render a meaningful onboarding state even when no AI provider is configured or the project has not opted in. The summary field is non-null only when all of the following are true:
- projects.ai_api_traffic_summary_enabled = true
- An AI provider is configured and available
- The AI call returns parseable JSON within the bounded summary deadline
This endpoint never returns a 5xx from an AI failure — it always returns 200 with summary: null and a human-readable unavailable_reason.
get/projects/{project_id}/api-analytics/summary
Request
- Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
- URL: /api/projects/{project_id}/api-analytics/summary
- Auth: HTTP bearer
Path parameters
project_idinteger required
Project ID
Query parameters
environment_idinteger
Environment ID (optional)
start_datestring required
Window start (ISO 8601)
end_datestring required
Window end (ISO 8601)
refreshboolean
Bypass and replace the backend AI summary cache
Response
AI traffic summary (summary field may be null when AI is unavailable)
Changes
No recorded changes to this operation across all 53 revisions of this API.