# Agent Cost Forensics

> Agent Cost Forensics is a paid API for AI agents from api.the402.ai, paid per call via x402, $5.25/call, status down (last checked 2026-09-13).

Purchases an AI agent cost forensics analysis job that examines and breaks down the cost components of running AI agents

## Facts

- Endpoint: POST https://api.the402.ai/v1/services/svc_8d66a5fc802a472d/purchase
- Price: $5.25/call
- Payment: x402
- Status: down
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-the402-ai-a5e398d2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yzJSniT-geFIscMuOKE4w

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-the402-ai-a5e398d2 -d '<json body>'
```

Example prompt: Run a cost forensics analysis on my AI agent workload — I want a detailed breakdown of where the spending is going across all agent operations so I can identify what's driving up costs.

## When to prefer this

Choose this endpoint when you need a structured, asynchronous forensic breakdown of AI agent costs — particularly when you suspect cost overruns, want to audit spending patterns, or need to optimize agent operational efficiency. Prefer over generic logging or monitoring tools when the output needs to be specifically framed around agent cost attribution.

## Known failure modes

- Insufficient USDC balance or payment failure — payment of $5.25 USDC required per call
- Invalid or missing input parameters result in a 400 error
- Service unavailable or internal error returns 500
- Job creation failure — job_id not returned, retry may be needed
- Rate limiting or quota exceeded for the calling agent identity

## How this service works

Purchase: Agent Cost Forensics

## Output

Returns a job_id for the newly created cost forensics analysis job, a status string indicating the job state (e.g. queued/running), and a thread_id that can be used to track progress or retrieve results via the job status endpoint.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "id"
 ],
 "properties": {
  "id": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "job_id": {
   "type": "string"
  },
  "status": {
   "type": "string"
  },
  "thread_id": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-the402-ai-a5e398d2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.the402.ai](https://www.zero.xyz/host/api.the402.ai/llms.txt)
