Usage Get
- Retrieve organization usage metrics.
- Supports relative ranges such as
last_30m,last_1h... as well as absolute RFC3339 time ranges.
POST /v1/usage/get
Auth and Rate Limits
- Authentication is required. Include a valid API key in the
Authorizationheader. - This endpoint follows the standard API rate limiting for authenticated requests.
Request Body
- The body must be a JSON object.
- Provide either
relative_range, or bothfromandto.
| Parameter | Type | Description | Required | Default |
|---|---|---|---|---|
user_ids | string[] | Optional list of organization user UUIDs. Omit it, pass an empty array, or pass "all" to query the full organization. | No | All users |
media_type | string | Filter by analyzed media lane. Allowed values: "all", "video", "audio", "image". | No | "all" |
ingest_sources | string[] | Filter by source category. Allowed values: "api", "ui", "meeting". | No | All sources |
usage_type | string | Metric to graph. Allowed values: "minutes_processed", "mb_processed". | No | "minutes_processed" |
relative_range | string | Grafana-style quick range. Allowed values: last_30m, last_1h, last_3h, last_6h, last_12h, last_24h, last_2d, last_7d, last_30d, last_90d. | No | None |
from | string | Absolute range start in RFC3339 format, for example 2026-03-26T10:00:00Z. Required when relative_range is omitted. | Conditionally | None |
to | string | Absolute range end in RFC3339 format, for example 2026-03-26T11:00:00Z. Required when relative_range is omitted. | Conditionally | None |
Response
{
"status": true,
"code": 200,
"message": "Usage data retrieved successfully",
"data": {
"total_value": 842.75,
"unit": "minutes",
"bucket_interval": "5m",
"usage_type": "minutes_processed",
"media_type": "video",
"ingest_sources": ["api", "ui"],
"all_users": false,
"user_ids": [
"f88f1b49-61f2-4e59-b287-9cb7621bc5d8"
],
"from": "2026-03-26T09:00:00Z",
"to": "2026-03-26T12:00:00Z",
"relative_range": null,
"points": [
{
"timestamp": "2026-03-26T09:00:00Z",
"unix_seconds": 1774515600,
"value": 24.5
},
{
"timestamp": "2026-03-26T09:05:00Z",
"unix_seconds": 1774515900,
"value": 18.0
}
]
}
}
Example Request
curl -X POST https://api.deepfaic.com/v1/usage/get \
-H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" \
-d '{
"user_ids": ["f88f1b49-61f2-4e59-b287-9cb7621bc5d8"],
"media_type": "video",
"ingest_sources": ["api", "ui"],
"usage_type": "minutes_processed",
"relative_range": "last_24h"
}'