For the complete documentation index, see llms.txt. This page is also available as Markdown.

Metrics

List latest metric values

get

List the latest value for each metric in the workspace.

Permissions: authenticated (any role).

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Query parameters
sourcestring · enumOptionalDefault: productionPossible values:
scopestring · enumOptionalDefault: aggregatePossible values:
entity_typestring · max: 64 · nullableOptional
entity_idstring · max: 128 · nullableOptional
service_idstring · max: 64 · nullableOptional
run_idstring · max: 64 · nullableOptional
session_idstring · max: 128 · nullableOptional
date_fromstring · date-time · nullableOptional
date_tostring · date-time · nullableOptional
latest_onlybooleanOptionalDefault: true
limitinteger · min: 1 · max: 500OptionalDefault: 100
offsetintegerOptionalDefault: 0
Responses
200

Successful Response

application/json
get/v1/{workspace_id}/metrics
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 available metrics (builtin + custom)

get

List all available metrics (builtin + custom defined on workspace).

Permissions: authenticated (any role).

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Responses
200

Successful Response

application/json
get/v1/{workspace_id}/metrics/catalog
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

get

Get values for a specific metric with optional time range.

Permissions: authenticated (any role).

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
metric_keystring · min: 1 · max: 64Required

Metric key (lowercase alphanumeric + underscores)

Pattern: ^[a-z][a-z0-9_]*$
Query parameters
sourcestring · enumOptionalDefault: productionPossible values:
scopestring · enumOptionalDefault: aggregatePossible values:
entity_typestring · max: 64 · nullableOptional
entity_idstring · max: 128 · nullableOptional
service_idstring · max: 64 · nullableOptional
run_idstring · max: 64 · nullableOptional
session_idstring · max: 128 · nullableOptional
date_fromstring · date-time · nullableOptional
date_tostring · date-time · nullableOptional
limitinteger · min: 1 · max: 365OptionalDefault: 90
Responses
200

Successful Response

application/json
get/v1/{workspace_id}/metrics/{metric_key}
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 metric

get

Get time-series trend for a specific metric.

Permissions: authenticated (any role).

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
metric_keystring · min: 1 · max: 64Required

Metric key (lowercase alphanumeric + underscores)

Pattern: ^[a-z][a-z0-9_]*$
Query parameters
sourcestring · enumOptionalDefault: productionPossible values:
scopestring · enumOptionalDefault: aggregatePossible values:
entity_typestring · max: 64 · nullableOptional
entity_idstring · max: 128 · nullableOptional
service_idstring · max: 64 · nullableOptional
run_idstring · max: 64 · nullableOptional
session_idstring · max: 128 · nullableOptional
daysinteger · min: 1 · max: 365OptionalDefault: 30
Responses
200

Successful Response

application/json
get/v1/{workspace_id}/metrics/{metric_key}/trend
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
    }
  ]
}

Get LLM inference cost by model for a closed month

get

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.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Query parameters
close_monthstring · dateRequired

Any date within the closed month to report, e.g. 2026-07-01

Responses
200

Successful Response

application/json

Per-model LLM inference cost for one close month.

close_monthstring · dateRequired

First day of the closed month this breakdown covers

currencystringOptional

Currency of every amount in this response

Default: USD
total_cost_usdnumberRequired

Amigo's cost to serve this workspace, not an amount owed. Sum of priced models; excludes any model where is_priced is false

has_unpriced_usagebooleanRequired

True when some usage could not be priced, so total_cost_usd understates actual spend

get/v1/{workspace_id}/cost-to-serve/llm-inference
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
    }
  ]
}

Get apportioned infrastructure cost by component for a closed month

get

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.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Query parameters
close_monthstring · dateRequired

Any date within the closed month to report, e.g. 2026-07-01

Responses
200

Successful Response

application/json

Per-component infrastructure cost for one close month.

close_monthstring · dateRequired

First day of the closed month this breakdown covers

currencystringOptional

Currency of every amount in this response

Default: USD
total_cost_usdnumberRequired

Amigo's cost to serve this workspace, not an amount owed. Sum of all components for the month

get/v1/{workspace_id}/cost-to-serve/infrastructure
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?