Skip to main content
GET
/
orgs
/
{org_id}
/
orgs
/
usage
Get Consolidated Sub-Organizations Usage
curl --request GET \
  --url https://api.useinvent.com/orgs/{org_id}/orgs/usage
[
  {
    "org_id": "<string>",
    "org_name": "<string>",
    "event_name": "run",
    "amount_credits": 123,
    "amount_monetary": 123,
    "date": "2023-11-07T05:31:56Z"
  }
]

Path Parameters

org_id
string
required

The ID of the org

Query Parameters

from_date
string<date-time> | null

Start date for the usage period

to_date
string<date-time> | null

End date for the usage period

interval
enum<string>
required

Meter interval for the usage chart

Available options:
hour,
day,
week,
month,
year
type
enum<string>

Meter ID for the organization

Available options:
run,
ai_tokens,
ai_sst,
ai_tts,
ai_embeddings,
ai_memory_reconcile,
ai_memory_summarize,
broadcast_whatsapp,
broadcast_email,
broadcast_sms
page
number

Page number

take
number

Number of items to take

next
string

Next page token (Only used on special endpoints)

Response

200 - application/json

Per-sub-organization usage grouped by event type and time bucket.

org_id
string
required

Unique identifier of the sub-organization

org_name
string
required

Name of the sub-organization

event_name
enum<string>
required

Meter ID for the organization

Available options:
run,
ai_tokens,
ai_sst,
ai_tts,
ai_embeddings,
ai_memory_reconcile,
ai_memory_summarize,
broadcast_whatsapp,
broadcast_email,
broadcast_sms
amount_credits
number
required

Total credits consumed in the time bucket

amount_monetary
number
required

Total monetary amount in the time bucket

date
string<date-time> | null
required

Start of the time bucket