Fetch Task Agent Credit Report

Retrieve aggregate credit usage for a specific Task Agent. This report includes: - Total credits charged across all Task Agent runs - Number of runs included in the report Filters: - `start_date`: Include runs created on or after this date - `end_date`: Include runs created on or before this date Credit reports are limited to a maximum 3-month lookback window. If `start_date` is omitted, the report defaults to the earliest permitted date.

Authentication

AuthorizationBearer

API key or access token, sent as Authorization: Bearer <token>. The simplest option: create an API key in your dashboard under Settings, then paste it here.

OR
AuthorizationBearer

API key or access token, sent as Authorization: Bearer <token>. The simplest option: create an API key in your dashboard under Settings, then paste it here.

Path parameters

org_idstringRequiredformat: "uuid"
The organization ID
project_idstringRequiredformat: "uuid"
The project ID
task_agent_idstringRequiredformat: "uuid"
The task agent ID

Query parameters

start_datestring or nullOptional

Start date for the report (e.g., ‘2023-06-01’, ‘24 hours ago’, ‘yesterday’).

end_datestring or nullOptional

End date for the report (e.g., ‘2023-06-30’, ‘now’, ‘today’).

Response

Task Agent credit report
task_agent_idstringformat: "uuid"
Unique identifier of the TaskAgent.
date_rangemap from strings to nullable strings
Time period covered by the report.
total_creditsstringformat: "^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$"
Total credits charged across TaskAgent runs in the reporting period.
total_runsinteger>=0
Number of TaskAgent runs included in the report.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error