Documentation Index
Fetch the complete documentation index at: https://docs.meshai.dev/llms.txt
Use this file to discover all available pages before exploring further.
Cost Summary
Get aggregate cost data for your tenant.
| Parameter | Type | Default | Description |
|---|
period | string | month | day, week, month |
from | string | Start of month | ISO 8601 date |
to | string | Today | ISO 8601 date |
curl "https://api.meshai.dev/cost/summary?period=month&from=2026-03-01" \
-H "Authorization: Bearer msh_YOUR_API_KEY"
{
"success": true,
"data": {
"total_cost_usd": 1245.67,
"total_input_tokens": 15234000,
"total_output_tokens": 4567000,
"total_requests": 8923,
"period": "month",
"from": "2026-03-01T00:00:00Z",
"to": "2026-03-17T23:59:59Z"
}
}
Cost by Agent
Break down costs per agent, sorted by cost descending.
curl "https://api.meshai.dev/cost/by-agent?from=2026-03-01&limit=10" \
-H "Authorization: Bearer msh_YOUR_API_KEY"
{
"success": true,
"data": [
{
"agent_id": "agt_abc123",
"agent_name": "production-summarizer",
"team": "support-team",
"total_cost_usd": 456.78,
"input_tokens": 5600000,
"output_tokens": 1200000,
"requests": 3400
}
],
"meta": { "total": 12, "page": 1, "limit": 10 }
}
Cost by Team
Break down costs per team.
curl "https://api.meshai.dev/cost/by-team?from=2026-03-01" \
-H "Authorization: Bearer msh_YOUR_API_KEY"
{
"success": true,
"data": [
{
"team": "support-team",
"total_cost_usd": 645.23,
"input_tokens": 7800000,
"output_tokens": 2100000,
"requests": 4500,
"agent_count": 5
},
{
"team": "sales-team",
"total_cost_usd": 412.30,
"input_tokens": 5200000,
"output_tokens": 1500000,
"requests": 2800,
"agent_count": 3
}
]
}
Cost by Model
Break down costs per model.
curl "https://api.meshai.dev/cost/by-model?from=2026-03-01" \
-H "Authorization: Bearer msh_YOUR_API_KEY"
{
"success": true,
"data": [
{
"model_provider": "openai",
"model_name": "gpt-4o",
"total_cost_usd": 890.12,
"input_tokens": 10200000,
"output_tokens": 3100000,
"requests": 5800
},
{
"model_provider": "anthropic",
"model_name": "claude-sonnet-4-20250514",
"total_cost_usd": 355.55,
"input_tokens": 5034000,
"output_tokens": 1467000,
"requests": 3123
}
]
}
Cost Time Series
Get cost data as a time series for charting.
| Parameter | Type | Default | Description |
|---|
granularity | string | day | hour, day, week |
from | string | 30 days ago | ISO 8601 date |
to | string | Today | ISO 8601 date |
agent_id | string | — | Filter to a specific agent |
team | string | — | Filter to a specific team |
curl "https://api.meshai.dev/cost/timeseries?granularity=day&from=2026-03-01" \
-H "Authorization: Bearer msh_YOUR_API_KEY"
{
"success": true,
"data": [
{
"timestamp": "2026-03-01T00:00:00Z",
"cost_usd": 72.34,
"input_tokens": 890000,
"output_tokens": 267000,
"requests": 520
},
{
"timestamp": "2026-03-02T00:00:00Z",
"cost_usd": 68.90,
"input_tokens": 845000,
"output_tokens": 251000,
"requests": 498
}
]
}