API Reference
Insights
Per-response token, performance, resource, feedback, and agent workflow details.
Insights endpoints expose the analytics and execution details behind generated responses.
Endpoints
GET /studio/insights/sessions/{sessionId}/messages/{messageIndex}
Return the complete Message Insights data for one generated response in an authenticated workspace. The response combines the same token, feedback, performance, comparison, resource, and agent-workflow information shown in Studio's Message Insights view. Numeric costs are returned in USD and durations are returned in seconds; clients may format them for display as needed. Feedback, agentWorkflow, and individual comparison metrics can be null when that data was not recorded.
- Full URL:
https://api.pickaxe.co/v1/studio/insights/sessions/{sessionId}/messages/{messageIndex}
Request Fields
sessionId(string (path), required): The conversation session ID. Workspace and Pickaxe history responses expose this value as responseId. Example:SESSION123messageIndex(number (path), required): Zero-based index of the generated response within the session. Use 0 for the first generated response, 1 for the second, and so on. Example:0feedbackIndex(number (query), optional): Optional zero-based conversation-message index used to select feedback. Omit it to infer the matching assistant-message index from the session. Supplying it is useful when a history payload already includes the feedback index. Example:1
Examples
curl -X GET "https://api.pickaxe.co/v1/studio/insights/sessions/SESSION123/messages/0?feedbackIndex=1" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response Shape
{
"success": true,
"data": {
"submissionId": "665f4f1d2f1b9c0012345678",
"sessionId": "SESSION123",
"messageIndex": 0,
"pickaxeId": "MY_FORM_ID",
"generatedAt": "2026-09-01T18:10:10Z",
"tokens": {
"input": 120,
"output": 30,
"total": 150,
"inputBreakdown": {
"knowledge": 60,
"endUser": 20,
"userMemory": 10
}
},
"feedback": {
"index": 1,
"feedbackType": "like",
"feedbackMessage": "Useful answer"
},
"performance": {
"costUsd": 0.033,
"tokens": 150,
"pickaxeLatencySeconds": 0.3,
"modelTTFTSeconds": 0.4,
"totalTTFTSeconds": 0.7,
"generationTimeSeconds": 2.5,
"isUsingCredits": true,
"model": "gpt-5",
"originalModel": null,
"isFallback": false
},
"comparison": {
"cost": { "value": 0.033, "min": 0.01, "max": 0.05, "average": 0.03 },
"tokens": { "value": 150, "min": 100, "max": 500, "average": 300 },
"pickaxeLatency": {
"value": 0.3,
"min": 0.1,
"max": 0.9,
"average": 0.4
},
"modelTTFT": { "value": 0.4, "min": 0.2, "max": 0.8, "average": 0.5 },
"totalTTFT": { "value": 0.7, "min": 0.4, "max": 1.4, "average": 0.9 },
"generationTime": { "value": 2.5, "min": 1, "max": 5, "average": 2.8 }
},
"resources": {
"knowledgeDocuments": [
{
"documentId": "DOC1",
"name": "Product guide",
"storageUrl": "https://example.com/product-guide.pdf",
"type": "pdf",
"isKnowledge": true
}
],
"endUserUploads": [],
"memories": [{ "name": "Company", "value": "Pickaxe" }],
"actions": [
{
"actionId": "ACTION1",
"displayName": "Search",
"description": "Searches a connected service",
"image": "https://example.com/action.png"
}
],
"mcps": [
{
"serverId": "MCP1",
"name": "CRM",
"tools": [
{ "name": "lookup", "description": "Find a record", "required": [] }
]
}
]
},
"agentWorkflow": {
"sessionId": "SESSION123",
"traceId": "trace_123",
"traceIds": ["trace_123"],
"groupId": "group_123",
"groupIds": ["group_123"],
"workflowName": "Submission Agent",
"startedAt": "2026-09-01T18:10:07Z",
"endedAt": "2026-09-01T18:10:10Z",
"totalDurationMs": 3000,
"status": "success",
"connectedTools": ["lookup"],
"usedTools": ["lookup"],
"rootStep": {
"id": "span_agent",
"parentId": null,
"traceId": "trace_123",
"type": "agent",
"title": "Submission Agent",
"status": "success"
},
"steps": [],
"traces": []
}
}
}
