GET
/
api
/
v1
/
projects
/
{slug}
/
spend
curl "https://api.costmcp.com/api/v1/projects/slideshow-studio/spend?from=2026-07-01T00:00:00Z" \
  -H "Authorization: Bearer $COSTMCP_API_KEY"
{
  "project": {
    "slug": "slideshow-studio",
    "name": "Slideshow Studio",
    "budget": 200
  },
  "total_usd": 28.2,
  "message_count": 40,
  "messages": [
    {
      "id": "uuid",
      "message_type": "usage",
      "amount_usd": 0.04,
      "unit_type": "image",
      "quantity": 1,
      "feature": "slide_generation",
      "batch_id": null,
      "created_at": "2026-07-09T21:48:21.437Z"
    }
  ]
}
Requires permission read_summaries. Returns up to 500 messages, newest first.
slug
string
required
Project slug
from
string
ISO datetime lower bound (inclusive)
to
string
ISO datetime upper bound (inclusive)
project
object
required
{ slug, name, budget }
total_usd
number
required
Sum for the filtered window
message_count
number
required
Count of returned messages
messages
array
required
Ledger rows with id, message_type, amount_usd, unit_type, quantity, feature, batch_id, created_at
StatusMeaning
404Project not found in workspace
500Query failure
curl "https://api.costmcp.com/api/v1/projects/slideshow-studio/spend?from=2026-07-01T00:00:00Z" \
  -H "Authorization: Bearer $COSTMCP_API_KEY"
{
  "project": {
    "slug": "slideshow-studio",
    "name": "Slideshow Studio",
    "budget": 200
  },
  "total_usd": 28.2,
  "message_count": 40,
  "messages": [
    {
      "id": "uuid",
      "message_type": "usage",
      "amount_usd": 0.04,
      "unit_type": "image",
      "quantity": 1,
      "feature": "slide_generation",
      "batch_id": null,
      "created_at": "2026-07-09T21:48:21.437Z"
    }
  ]
}