Create

Sign in to ReadmeX

or

How we handle your data: Privacy Policy

ReadmeX

Your AI reading companion

What would you like to catch up on?

Pick a briefing, or ask your own question.

Your community and people briefings stay personal to you.

Story

Mastra launches Metrics API for token usage, cost and latency

AI summary

Mastra introduced a Metrics API that lets developers query token usage, model cost, latency and error rates for production projects through the Mastra Client SDK, Mastra CLI or observability endpoints. The API supports totals, breakdowns, time series and percentile queries, combinable with time ranges and status filters, for custom reports, dashboards, downstream data pushes or alerts when model costs or error rates rise. According to the Mastra blog, queries require a platform access token and project ID plus the region-specific observability base URL (US and EU), with @mastra/client-js 1.9.0+ and mastra CLI 1.9.2+; Mastra also says the API can be paired with code mode so agents construct their own queries.

In-depth insight

It gives Mastra Platform users programmatic access to cost, latency and error data, making it easier to feed dashboards, alerts and custom reports.

MastraMastra PlatformMastra Client SDK

Original · 3 min readRead the original
Group chat

No comments yet. Start the conversation.