Activity endpoints require a JWT. They show requests made with the account’s API keys; they do not expose activity belonging to another account.
Choose the view
| Use case | Endpoint | What it returns |
|---|---|---|
| Show a request history table | GET /v1/activity | One row per completed, failed, or cancelled chat, embedding, transcription, speech, or combined voice stage, newest first |
| Build a period dashboard | GET /v1/activity/summary | Totals for requests, tokens, credits, and model usage |
Query the usage log
/v1/activityJWTAll query parameters are optional:
/v1/activity?limit=50&offset=0&workspace_id=...&model=openai/gpt-4o&status=completed| Parameter | Meaning |
|---|---|
limit | Maximum number of rows to return. |
offset | Number of rows to skip when paging through older records. |
workspace_id | Restrict results to one workspace. |
model | Restrict results to one model id, such as openai/gpt-4o. |
status | Filter by completed, failed, or cancelled. |
The response is a 200 array ordered newest first:
[
{
"id": "...",
"workspace_id": "910e5104-f604-47d4-b194-3db2fbd83f76",
"model": "openai/gpt-4o",
"prompt_tokens": 12,
"completion_tokens": 3,
"total_tokens": 15,
"cost_credits": 0.0247,
"latency_ms": 842,
"status": "completed",
"error_code": null,
"created_at": "2026-07-14T13:00:00Z"
}
]Activity fields
| Field | Meaning |
|---|---|
workspace_id | Workspace associated with the API key used for the request. Omitted when unavailable. |
model | Model id selected for the gateway call. |
prompt_tokens / completion_tokens / total_tokens | Token counts recorded when the service reports them. |
cost_credits | Ngamia credits charged for a completed request or stage. |
latency_ms | Request latency in milliseconds. |
status | completed, failed, or cancelled. |
error_code | Error code for a failed request; omitted when there is no error. |
created_at | Time the activity record was created, in ISO 8601 format. |
Failed and cancelled requests are recorded for troubleshooting. A voice reservation is released when a stage fails or is interrupted; completed stages are recorded with their settled cost. Use error_code with the Errors page when building a support or retry view.
Build a period summary
/v1/activity/summaryJWTPass period as today, week, month, or year. The default is month:
/v1/activity/summary?period=month{
"total_requests": 142,
"total_tokens": 58230,
"total_cost_credits": 118.44,
"period_start": "2026-07-01T00:00:00Z",
"period_end": "2026-07-14T23:59:59Z",
"by_model": [
{
"model": "openai/gpt-4o",
"request_count": 90,
"total_tokens": 40000,
"total_cost_credits": 90.2
}
]
}Use the top-level totals for a “this period” card and by_model for a per-model breakdown. For an audit table, combine the summary with filtered rows from GET /v1/activity rather than trying to reconstruct individual calls from the aggregate response.
For workspace-scoped views, first obtain the workspace id from Profile & workspaces. For credit balance and ledger details, see Billing & credits.