Pular para o conteúdo

/api/v1/analytics/consumption

GET
/api/v1/analytics/consumption
curl --request GET \
--url 'https://api.endless.zaia.app/api/v1/analytics/consumption?granularity=hourly'

Retrieves workspace consumption analytics for LLM spend, extra executions, channel types, and LLM cost.

channelIds
Any of:
Array<string>
compareRangeEnd

The end date of the comparison period.

string format: date-time
nullable

The end date of the comparison period.

compareRangeStart

The start date of the comparison period.

string format: date-time
nullable

The start date of the comparison period.

granularity
required

The granularity of the consumption series.

string
Allowed values: hourly daily weekly monthly

The granularity of the consumption series.

rangeEnd

The end date of the analytics period.

string format: date-time
nullable

The end date of the analytics period.

rangeStart

The start date of the analytics period.

string format: date-time
nullable

The start date of the analytics period.

responderIds
Any of:
Array<string>

Consumption analytics retrieved successfully.

Media typeapplication/json
object
byChannelType
required
Array<object>
object
agenticExecutions
required
integer
channelType
required
string
Allowed values: api instagram other telegram waha whatsapp widget widget-test
credits
required
integer
current
required
object
agenticExecutions
required
integer
credits
required
integer
llmCalls
required
integer
executions
required
Array<object>
object
agenticExecutions
required
integer
channelId
required
string
nullable
channelName
required
string
nullable
channelType
required
string
Allowed values: api instagram other telegram waha whatsapp widget widget-test
responderEntity
required
string
Allowed values: agents squads workflows
responderId
required
string
responderName
required
string
responderPicture
required
string
nullable
spend
required
integer
extraExecutions
required
object
amount
required
integer
consumed
required
integer
remaining
required
integer
llm
required
Array<object>
object
calls
required
integer
credits
required
integer
inputTokens
required
integer
model
required
string
outputTokens
required
integer
provider
required
string
previous
required
object
agenticExecutions
required
integer
credits
required
integer
llmCalls
required
integer
series
required
Array<object>
object
agenticExecutions
required
integer
credits
required
integer
periodEnd
required
string format: date-time
periodStart
required
string format: date-time
Example
{
"byChannelType": [
{
"channelType": "api"
}
],
"executions": [
{
"channelType": "api",
"responderEntity": "agents"
}
]
}

Unauthorized.

Media typeapplication/json

The description of a known exception.

object
code

The error code.

string
cta

The error call-to-action.

object
type
required
string
Allowed values: support-contact
url
required
string format: uri
feedback
required

The error feedback.

object
enUs
string
esEs
string
ptBr
string
message
required

The error message.

string
name
required

The error name.

string
Example
{
"cta": {
"type": "support-contact"
}
}