REST API
Savings & Optimization
Recommendation engines that identify spend and latency you can remove without changing outcomes. These are advisory only — Evigauge never actuates a change to your agents.
Savings recommendations
HTTP
GET /v1/observ/orgs/{org}/workspaces/{ws}/savings/recommendations
Workspace-wide savings opportunities, ranked by estimated monthly value. Covers prompt caching and context optimization.
Auth: API key or JWT · Role: viewer
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
limit | integer | ➖ | 50 | Max recommendations returned |
Response 200 — not schema-modelled
JSON
{
"recommendations": [
{
"kind": "prompt_caching",
"scope": "checkout-agent",
"rationale": "A 4.1k-token system prompt is resent on every call; 82% of calls share it verbatim.",
"estimated_monthly_savings_usd": 214.60,
"affected_trace_count": 8120,
"confidence": "high"
}
],
"total_estimated_monthly_savings_usd": 214.60
}
Examples
recs = evigauge.get("/v1/observ/orgs/{org}/workspaces/{ws}/savings/recommendations",
params={"limit": 10})
print(f"Total opportunity: ${recs['total_estimated_monthly_savings_usd']:,.2f}/mo")
for r in recs["recommendations"]:
print(f" [{r['confidence']}] {r['kind']}: ${r['estimated_monthly_savings_usd']:.2f}/mo")
const recs = await evigauge.get(
"/v1/observ/orgs/{org}/workspaces/{ws}/savings/recommendations", { limit: 10 });
console.log(`Total opportunity: $${recs.total_estimated_monthly_savings_usd.toFixed(2)}/mo`);
recs.recommendations.forEach((r: any) =>
console.log(` [${r.confidence}] ${r.kind}: $${r.estimated_monthly_savings_usd.toFixed(2)}/mo`));
Savings for one trace
HTTP
GET /v1/observ/orgs/{org}/workspaces/{ws}/savings/trace/{trace_id}
The savings analysis narrowed to a single trace.
Auth: API key or JWT · Role: viewer
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
org | string | ✅ | Organization slug |
ws | string | ✅ | Workspace slug |
trace_id | string | ✅ | Trace ID |
Examples
s = evigauge.get(f"/v1/observ/orgs/{{org}}/workspaces/{{ws}}/savings/trace/{trace_id}")
print(s)
const s = await evigauge.get(
`/v1/observ/orgs/{org}/workspaces/{ws}/savings/trace/${traceId}`);
console.log(s);
Optimization flags
HTTP
GET /v1/observ/orgs/{org}/workspaces/{ws}/optimization/flags
Open optimization flags raised across the workspace.
Auth: API key or JWT · Role: viewer
Response 200 — not schema-modelled
JSON
{
"flags": [
{
"flag_id": "f_01J8...",
"kind": "over_provisioned_model",
"severity": "medium",
"first_seen": "2026-08-28T09:14:00Z",
"occurrence_count": 412,
"summary": "Extraction step uses a frontier model for a deterministic task."
}
]
}
Examples
flags = evigauge.get("/v1/observ/orgs/{org}/workspaces/{ws}/optimization/flags")
for f in flags["flags"]:
print(f"[{f['severity']}] {f['kind']} ×{f['occurrence_count']}")
const flags = await evigauge.get("/v1/observ/orgs/{org}/workspaces/{ws}/optimization/flags");
flags.flags.forEach((f: any) =>
console.log(`[${f.severity}] ${f.kind} ×${f.occurrence_count}`));
Over-provisioned traces
HTTP
GET /v1/observ/orgs/{org}/workspaces/{ws}/optimization/over-provisioned
Traces that used more model capability than the task required — the concrete
evidence behind an over_provisioned_model flag.
Auth: API key or JWT · Role: viewer
Examples
op = evigauge.get("/v1/observ/orgs/{org}/workspaces/{ws}/optimization/over-provisioned")
print(op)
const op = await evigauge.get(
"/v1/observ/orgs/{org}/workspaces/{ws}/optimization/over-provisioned");
console.log(op);