This article provides access to Analytics API endpoints with the data and metrics available in the Project tab in Dashboard.
Check the generic variables needed to use the API.
| Method |
Path |
Description |
| GET |
/analytics/requests/total-cost |
Returns the total accumulated cost of all requests made. |
| GET |
/analytics/requests/average-cost-per-request |
Returns the average cost per request, displayed in USD. |
| GET |
/analytics/requests/average-request-time |
Provides the average time taken to process a request. |
| GET |
/analytics/requests/total-requests |
Returns the total number of requests made. |
| GET |
/analytics/requests/total-requests-with-error |
Returns the total number of requests that resulted in errors. |
| GET |
/analytics/requests/overall-error-rate |
Calculates the percentage of requests that resulted in errors. |
| GET |
/analytics/requests/total-cost-per-day |
Provides a breakdown of total costs incurred per day. |
| GET |
/analytics/requests/total-requests-per-day |
Returns the number of requests made per day. |
| GET |
/analytics/requests/activity-per-agent |
Returns the cost, number of requests and number of tokens, grouped by agent and model. |
All endpoints require authentication using one of the following:
- Authorization: Bearer $GEAI_APITOKEN
- Authorization: Bearer $OAuth_accesstoken
For $OAuth_accesstoken, you must also include the header: ProjectId: $PROJECT_ID (otherwise, this and OrganizationId:$ORGANIZATION_ID headers are optional)
Some endpoints may require additional headers such as:
- Content-Type: application/json
Returns the total accumulated cost of all requests made within the selected period, expressed in USD, supporting analysis of overall platform usage expenses.
| Name |
Type |
Description |
| startDate |
string |
Start date for the query (YYYY-MM-DD) |
| endDate |
string |
End date for the query (YYYY-MM-DD) |
- Method: GET
- Path: $BASE_URL/v1/analytics/requests/total-cost
- Body: Empty
{
"totalCost": number // the total cost for the requested period. Expressed in USD.
}
curl -X GET "$BASE_URL/v1/analytics/requests/total-cost?startDate=2024-01-01&endDate=2024-01-31" \
-H "Authorization: Bearer $GEAI_APITOKEN" \
-H "Content-Type: application/json" \
-H "OrganizationId: $ORGANIZATION_ID" \
-H "ProjectId: $PROJECT_ID"
Returns the average cost incurred per request during the selected period. Expressed in USD.
| Name |
Type |
Description |
| startDate |
string |
Start date for the query (YYYY-MM-DD) |
| endDate |
string |
End date for the query (YYYY-MM-DD) |
- Method: GET
- Path: $BASE_URL/v1/analytics/requests/average-cost-per-request
- Body: Empty
{
"averageCostPerRequest": number // Expressed in USD
}
curl -X GET "$BASE_URL/v1/analytics/requests/average-cost-per-request?startDate=2024-01-01&endDate=2024-01-31" \
-H "Authorization: Bearer $GEAI_APITOKEN" \
-H "Content-Type: application/json" \
-H "OrganizationId: $ORGANIZATION_ID" \
-H "ProjectId: $PROJECT_ID"
Provides the average processing time for each request, enabling performance monitoring and optimization analysis.
| Name |
Type |
Description |
| startDate |
string |
Start date for the query (YYYY-MM-DD) |
| endDate |
string |
End date for the query (YYYY-MM-DD) |
- Method: GET
- Path: $BASE_URL/v1/analytics/requests/average-request-time
- Body: Empty
{
"averageRequestTime": number // average request time in milliseconds.
}
curl -X GET "$BASE_URL/v1/analytics/requests/average-request-time?startDate=2024-01-01&endDate=2024-01-31" \
-H "Authorization: Bearer $GEAI_APITOKEN" \
-H "Content-Type: application/json" \
-H "OrganizationId: $ORGANIZATION_ID" \
-H "ProjectId: $PROJECT_ID"
Returns the total number of requests made, offering a high-level overview of activity and adoption.
| Name |
Type |
Description |
| startDate |
string |
Start date for the query (YYYY-MM-DD) |
| endDate |
string |
End date for the query (YYYY-MM-DD) |
- Method: GET
- Path: $BASE_URL/v1/analytics/requests/total-requests
- Body: Empty
{
"totalRequests": integer // Total number of requests in the period.
}
curl -X GET "$BASE_URL/v1/analytics/requests/total-requests?startDate=2024-01-01&endDate=2024-01-31" \
-H "Authorization: Bearer $GEAI_APITOKEN" \
-H "Content-Type: application/json" \
-H "OrganizationId: $ORGANIZATION_ID" \
-H "ProjectId: $PROJECT_ID"
Returns the total number of requests that resulted in errors, supporting error tracking and reliability assessment.
| Name |
Type |
Description |
| startDate |
string |
Start date for the query (YYYY-MM-DD) |
| endDate |
string |
End date for the query (YYYY-MM-DD) |
- Method: GET
- Path: $BASE_URL/v1/analytics/requests/total-requests-with-error
- Body: Empty
{
"totalRequestsWithError": integer // number of requests with error in the period.
}
curl -X GET "$BASE_URL/v1/analytics/requests/total-requests-with-error?startDate=2024-01-01&endDate=2024-01-31" \
-H "Authorization: Bearer $GEAI_APITOKEN" \
-H "Content-Type: application/json" \
-H "OrganizationId: $ORGANIZATION_ID" \
-H "ProjectId: $PROJECT_ID"
Calculates the percentage of requests that failed, supporting analysis of overall error rate and system stability.
| Name |
Type |
Description |
| startDate |
string |
Start date for the query (YYYY-MM-DD) |
| endDate |
string |
End date for the query (YYYY-MM-DD) |
- Method: GET
- Path: $BASE_URL/v1/analytics/requests/overall-error-rate
- Body: Empty
{
"overallErrorRate": number // error rate as expressed from 0 to 1
curl -X GET "$BASE_URL/v1/analytics/requests/overall-error-rate?startDate=2024-01-01&endDate=2024-01-31" \
-H "Authorization: Bearer $GEAI_APITOKEN" \
-H "Content-Type: application/json" \
-H "OrganizationId: $ORGANIZATION_ID" \
-H "ProjectId: $PROJECT_ID"
Provides a breakdown of total costs incurred per day, allowing for daily cost monitoring and trend analysis.
| Name |
Type |
Description |
| startDate |
string |
Start date for the query (YYYY-MM-DD) |
| endDate |
string |
End date for the query (YYYY-MM-DD) |
- Method: GET
- Path: $BASE_URL/v1/analytics/requests/total-cost-per-day
- Body: Empty
{
"totalCostPerDay": [
{
"date": "string", // Date in YYYY-MM-DD.
"totalCost": number // Total cost for the day (USD).
}
]
}
curl -X GET "$BASE_URL/v1/analytics/requests/total-cost-per-day?startDate=2024-01-01&endDate=2024-01-31" \
-H "Authorization: Bearer $GEAI_APITOKEN" \
-H "Content-Type: application/json" \
-H "OrganizationId: $ORGANIZATION_ID" \
-H "ProjectId: $PROJECT_ID"
Returns the number of requests made per day.
| Name |
Type |
Description |
| startDate |
string |
Start date for the query (YYYY-MM-DD) |
| endDate |
string |
End date for the query (YYYY-MM-DD) |
| agentName |
string |
Agent name (optional) |
- Method: GET
- Path: $BASE_URL/v1/analytics/requests/total-requests-per-day
- Body: Empty
{
"totalRequestsPerDay": [
{
"date": "string", // Format YYYY-MM-DD (one response for each day of the requested period).
"totalRequests": integer, // Total requests during the date specified above
"totalRequestsWithError": integer // Total requests with error during the date specified above.
}
]
}
curl -X GET "$BASE_URL/v1/analytics/requests/total-requests-per-day?startDate=2024-01-01&endDate=2024-01-31&agentName=" \
-H "Authorization: Bearer $GEAI_APITOKEN" \
-H "Content-Type: application/json" \
-H "OrganizationId: $ORGANIZATION_ID" \
-H "ProjectId: $PROJECT_ID"
Returns the cost and number of requests and API Tokens grouped by Agent and model, supporting Agent-level usage and cost analysis.
| Name |
Type |
Description |
| startDate |
string |
Start date for the query (YYYY-MM-DD) |
| endDate |
string |
End date for the query (YYYY-MM-DD) |
- Method: GET
- Path: $BASE_URL/v1/analytics/requests/activity-per-agent
- Body: Empty
{
"activity": [
{
"agentName": "string", // Agent name.
"model": "string", // Model name.
"totalCost": number, // Total cost for the Agent/model
"totalRequests": integer // Number of requests for the Agent/model.
"totalTokens": integer // Number of tokens consumed by the Agent.
}
]
}
curl -X GET "$BASE_URL/v1/analytics/requests/activity-per-agent?startDate=2024-01-01&endDate=2024-01-31" \
-H "Authorization: Bearer $GEAI_APITOKEN" \
-H "Content-Type: application/json" \
-H "OrganizationId: $ORGANIZATION_ID" \
-H "ProjectId: $PROJECT_ID"
Since version 2025-09.