Body
application/json
Response
Successful Response
The response is of type any.
curl --request POST \
--url https://control-plane.kubiya.ai/api/v1/analytics/batch \
--header 'Content-Type: application/json' \
--data '{
"execution_id": "<string>",
"turns": [
{
"execution_id": "<string>",
"turn_number": 123,
"turn_id": "<string>",
"model": "<string>",
"model_provider": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"duration_ms": 123,
"input_tokens": 0,
"output_tokens": 0,
"cache_read_tokens": 0,
"cache_creation_tokens": 0,
"total_tokens": 0,
"input_cost": 0,
"output_cost": 0,
"cache_read_cost": 0,
"cache_creation_cost": 0,
"total_cost": 0,
"finish_reason": "<string>",
"response_preview": "<string>",
"tools_called_count": 0,
"tools_called_names": [
"<string>"
],
"error_message": "<string>",
"metrics": {},
"runtime_minutes": 0,
"model_weight": 1,
"tool_calls_weight": 1,
"aem_value": 0,
"aem_cost": 0
}
],
"tool_calls": [
{
"execution_id": "<string>",
"turn_id": "<string>",
"tool_name": "<string>",
"tool_use_id": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"duration_ms": 123,
"tool_input": {},
"tool_output": "<string>",
"tool_output_size": 123,
"success": true,
"error_message": "<string>",
"error_type": "<string>",
"metadata": {}
}
],
"tasks": [
{
"execution_id": "<string>",
"task_number": 123,
"task_id": "<string>",
"task_description": "<string>",
"task_type": "<string>",
"status": "pending",
"started_at": "<string>",
"completed_at": "<string>",
"duration_ms": 123,
"result": "<string>",
"error_message": "<string>",
"metadata": {}
}
]
}'"<any>"Create analytics data in batch.
This endpoint allows workers to send all analytics data (turns, tool calls, tasks) in a single request, reducing round trips and improving performance.
curl --request POST \
--url https://control-plane.kubiya.ai/api/v1/analytics/batch \
--header 'Content-Type: application/json' \
--data '{
"execution_id": "<string>",
"turns": [
{
"execution_id": "<string>",
"turn_number": 123,
"turn_id": "<string>",
"model": "<string>",
"model_provider": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"duration_ms": 123,
"input_tokens": 0,
"output_tokens": 0,
"cache_read_tokens": 0,
"cache_creation_tokens": 0,
"total_tokens": 0,
"input_cost": 0,
"output_cost": 0,
"cache_read_cost": 0,
"cache_creation_cost": 0,
"total_cost": 0,
"finish_reason": "<string>",
"response_preview": "<string>",
"tools_called_count": 0,
"tools_called_names": [
"<string>"
],
"error_message": "<string>",
"metrics": {},
"runtime_minutes": 0,
"model_weight": 1,
"tool_calls_weight": 1,
"aem_value": 0,
"aem_cost": 0
}
],
"tool_calls": [
{
"execution_id": "<string>",
"turn_id": "<string>",
"tool_name": "<string>",
"tool_use_id": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"duration_ms": 123,
"tool_input": {},
"tool_output": "<string>",
"tool_output_size": 123,
"success": true,
"error_message": "<string>",
"error_type": "<string>",
"metadata": {}
}
],
"tasks": [
{
"execution_id": "<string>",
"task_number": 123,
"task_id": "<string>",
"task_description": "<string>",
"task_type": "<string>",
"status": "pending",
"started_at": "<string>",
"completed_at": "<string>",
"duration_ms": 123,
"result": "<string>",
"error_message": "<string>",
"metadata": {}
}
]
}'"<any>"Successful Response
The response is of type any.
Was this page helpful?