Metrics
List the latest value for each metric in the workspace.
Permissions: authenticated (any role).
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
productionPossible values: aggregatePossible values: true1000Successful Response
Validation Error
Rate limited
GET /v1/{workspace_id}/metrics HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"metrics": [
{
"metric_key": "text",
"source": "production",
"entity_type": "text",
"entity_id": "text",
"service_id": "text",
"run_id": "text",
"session_id": "text",
"period_start": "2026-01-01T00:00:00.000Z",
"period_end": "2026-01-01T00:00:00.000Z",
"event_count": 1,
"avg_confidence": 1,
"unit": "text",
"computed_at": "2026-01-01T00:00:00.000Z",
"metric_type": "text",
"value": 1
}
]
}List all available metrics (builtin + custom defined on workspace).
Permissions: authenticated (any role).
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Successful Response
Rate limited
GET /v1/{workspace_id}/metrics/catalog HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"metrics": [
{
"key": "text",
"name": "text",
"description": "text",
"metric_type": "numerical",
"source": "call_intelligence",
"custom_source_key": "text",
"extraction_mode": "static",
"granularity": "aggregate",
"period_granularity": "daily",
"latency_tier": "batch",
"model_tier": "free",
"unit": "text",
"has_prompt": false,
"builtin": true
}
]
}Get values for a specific metric with optional time range.
Permissions: authenticated (any role).
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Metric key (lowercase alphanumeric + underscores)
^[a-z][a-z0-9_]*$productionPossible values: aggregatePossible values: 90Successful Response
Validation Error
Rate limited
GET /v1/{workspace_id}/metrics/{metric_key} HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"metrics": [
{
"metric_key": "text",
"source": "production",
"entity_type": "text",
"entity_id": "text",
"service_id": "text",
"run_id": "text",
"session_id": "text",
"period_start": "2026-01-01T00:00:00.000Z",
"period_end": "2026-01-01T00:00:00.000Z",
"event_count": 1,
"avg_confidence": 1,
"unit": "text",
"computed_at": "2026-01-01T00:00:00.000Z",
"metric_type": "text",
"value": 1
}
]
}Get time-series trend for a specific metric.
Permissions: authenticated (any role).
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Metric key (lowercase alphanumeric + underscores)
^[a-z][a-z0-9_]*$productionPossible values: aggregatePossible values: 30Successful Response
Validation Error
Rate limited
GET /v1/{workspace_id}/metrics/{metric_key}/trend HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"metrics": [
{
"metric_key": "text",
"source": "production",
"entity_type": "text",
"entity_id": "text",
"service_id": "text",
"run_id": "text",
"session_id": "text",
"period_start": "2026-01-01T00:00:00.000Z",
"period_end": "2026-01-01T00:00:00.000Z",
"event_count": 1,
"avg_confidence": 1,
"unit": "text",
"computed_at": "2026-01-01T00:00:00.000Z",
"metric_type": "text",
"value": 1
}
]
}LLM inference cost to serve this workspace in a closed month, by model.
This is what Amigo pays LLM vendors to serve this workspace — not an amount owed and not a contracted price. Direct spend: the workspace's own tokens, priced per call against vendor rates. Available once the month's close job has run.
cost_usd is null for a model with no rate card entry. That usage is real, so it is reported with its token counts and excluded from total_cost_usd, and has_unpriced_usage flags that the total understates actual spend.
Permissions: Amigo staff only (require_amigo_admin). Not available to customer admins — this is Amigo's cost structure, not the customer's bill.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Any date within the closed month to report, e.g. 2026-07-01
Successful Response
Per-model LLM inference cost for one close month.
First day of the closed month this breakdown covers
Currency of every amount in this response
USDAmigo's cost to serve this workspace, not an amount owed. Sum of priced models; excludes any model where is_priced is false
True when some usage could not be priced, so total_cost_usd understates actual spend
Requires an Amigo administrator identity
Validation Error
Rate limited
GET /v1/{workspace_id}/cost-to-serve/llm-inference?close_month=2026-01-01 HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"close_month": "2026-01-01",
"currency": "USD",
"total_cost_usd": 1,
"has_unpriced_usage": true,
"models": [
{
"model": "text",
"input_tokens": 1,
"output_tokens": 1,
"cached_tokens": 1,
"cost_usd": 1,
"is_priced": true
}
]
}Infrastructure cost to serve this workspace for a closed month.
This is what Amigo pays Databricks to serve this workspace — not an amount owed and not a contracted price. Databricks compute and storage are pooled, so these are usage-weighted shares rather than metered quantities — a weaker claim than the LLM inference endpoint, whose figures are this workspace's own tokens priced directly. Kept separate so neither number inherits the other's caveats.
Sourced from the monthly cost-allocation ledger, which reconciles 100% of the Databricks bill to zero residual. Available once the month's close job has run (T+3). Components with no spend are omitted (no $0.00 rows), and account-level overhead is never attributed to a workspace.
Permissions: Amigo staff only (require_amigo_admin). Not available to customer admins — this is Amigo's cost structure, not the customer's bill.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Any date within the closed month to report, e.g. 2026-07-01
Successful Response
Per-component infrastructure cost for one close month.
First day of the closed month this breakdown covers
Currency of every amount in this response
USDAmigo's cost to serve this workspace, not an amount owed. Sum of all components for the month
Requires an Amigo administrator identity
Validation Error
Rate limited
GET /v1/{workspace_id}/cost-to-serve/infrastructure?close_month=2026-01-01 HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"close_month": "2026-01-01",
"currency": "USD",
"total_cost_usd": 1,
"components": [
{
"component": "text",
"allocation": "text",
"cost_usd": 1
}
]
}Last updated
Was this helpful?

