Skip to main content
GET
/
api
/
v1
/
meters
/
model-usage
/
usage
Get model usage meters
curl --request GET \
  --url https://dev-chat-engine.actualize.ae/api/v1/meters/model-usage/usage

Query Parameters

window
string
required

Even sum aggregations window

Example:

"MINUTE"

startDate
string<date-time>
required

Start date in UTC, below minute precision will be ignored

Example:

"2025-01-01T00:00"

endDate
string<date-time>
required

End date in UTC, below minute precision will be ignored, should greater than Start date

Example:

"2026-01-01T00:00"

source
string

Source of the meter, for now can be only chat-engine, this can be helpfully if same metering system is used by multiple sources

Example:

"chat-engine"

userId
string

User Id, can have multiple agents attached to it

Example:

"user-123"

agentId
string

Agent id, can have multiple sessions attached to it

Example:

"agent-123"

sessionId
string

Session id, can have multiple message attached to it

Example:

"session-123"

runId
string

Run id, a run represent a session send+reply (input output) message, can have multiple generations attached to it, with inputs and outputs

Example:

"run-123"

modelName
string

Model name, example: gpt-4o-mini, gpt-4o ....

Example:

"gpt-4o"

modelProvider
string

Model provider, example: openai, anthropic ....

Example:

"openai"

unitType
string

Type of the unit

Example:

"input_tokens"

unitCost
string

Unit cost of the meter, example: 0.015_per_million

Example:

"0.015_per_million"

orgId
string

Organization id

Example:

"org-123"

credentialId
string

The Id of the credential used to create the usage

Example:

"openai_key_123"

externalCustomerId
string

The external customer ID for the meter, this can be a phone number, whatsapp number or any external customer id

Example:

"1234567890"

Response

Return modal usage meters.