Authorizations
API key for authentication
Path Parameters
Task ID
Example:
"550e8400-e29b-41d4-a716-446655440000"
curl --request GET \
--url https://api.workser.ai/tasks/{id}/steps-and-usages \
--header 'x-api-key: <api-key>'
{
"steps": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"task_id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Create user registration endpoint",
"description": "Implement POST /auth/register endpoint with validation",
"status": "in_progress",
"type": "ai_agent_message",
"metadata": {
"path": "src/pages/index.tsx",
"tool": "read_file_from_sandbox"
},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-15T12:00:00.000Z"
}
],
"usages": [
{
"id": "41219200-f300-4e7f-9b42-a93e6053609f",
"task_id": "b6e03e3a-8b29-4e13-be9c-0cdc7a4309c7",
"usage_type": "llm_call",
"provider": "zai",
"model": "glm-4.6",
"remark": "run--fbc6da64-57b9-4805-b06d-4e587c794e86-0",
"request_data": {},
"response_data": {
"id": "202510012106299ba4756e42f3470e",
"logprobs": null,
"model_name": "glm-4.6",
"token_usage": {
"total_tokens": 9710,
"prompt_tokens": 9662,
"completion_tokens": 48,
"prompt_tokens_details": {
"audio_tokens": null,
"cached_tokens": 43
},
"completion_tokens_details": null
},
"service_tier": null,
"finish_reason": "tool_calls",
"system_fingerprint": null
},
"usage_metadata": {
"input_tokens": 9662,
"total_tokens": 9710,
"output_tokens": 48,
"cache_read_tokens": 43,
"input_token_details": {
"cache_read": 43
},
"output_token_details": {}
},
"price": {
"input_price": 0.006957,
"total_price": 0.00709,
"output_price": 0.000127,
"cache_read_price": 0.000006
},
"final_price": 0.00709,
"created_at": "2025-10-01T13:06:31.345Z",
"updated_at": "2025-10-01T13:06:31.345Z"
}
]
}
Retrieves comprehensive information including all task steps and their associated resource usage records. This provides complete visibility into task execution costs, token consumption, and detailed billing information.
curl --request GET \
--url https://api.workser.ai/tasks/{id}/steps-and-usages \
--header 'x-api-key: <api-key>'
{
"steps": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"task_id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Create user registration endpoint",
"description": "Implement POST /auth/register endpoint with validation",
"status": "in_progress",
"type": "ai_agent_message",
"metadata": {
"path": "src/pages/index.tsx",
"tool": "read_file_from_sandbox"
},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-15T12:00:00.000Z"
}
],
"usages": [
{
"id": "41219200-f300-4e7f-9b42-a93e6053609f",
"task_id": "b6e03e3a-8b29-4e13-be9c-0cdc7a4309c7",
"usage_type": "llm_call",
"provider": "zai",
"model": "glm-4.6",
"remark": "run--fbc6da64-57b9-4805-b06d-4e587c794e86-0",
"request_data": {},
"response_data": {
"id": "202510012106299ba4756e42f3470e",
"logprobs": null,
"model_name": "glm-4.6",
"token_usage": {
"total_tokens": 9710,
"prompt_tokens": 9662,
"completion_tokens": 48,
"prompt_tokens_details": {
"audio_tokens": null,
"cached_tokens": 43
},
"completion_tokens_details": null
},
"service_tier": null,
"finish_reason": "tool_calls",
"system_fingerprint": null
},
"usage_metadata": {
"input_tokens": 9662,
"total_tokens": 9710,
"output_tokens": 48,
"cache_read_tokens": 43,
"input_token_details": {
"cache_read": 43
},
"output_token_details": {}
},
"price": {
"input_price": 0.006957,
"total_price": 0.00709,
"output_price": 0.000127,
"cache_read_price": 0.000006
},
"final_price": 0.00709,
"created_at": "2025-10-01T13:06:31.345Z",
"updated_at": "2025-10-01T13:06:31.345Z"
}
]
}
API key for authentication
Task ID
"550e8400-e29b-41d4-a716-446655440000"