Build custom integrations, automate workflows, and extend MetaFinOps with our RESTful API.
Everything you need to make your first API call.
API key-based authentication via Bearer tokens. Generate keys from your dashboard under Settings → API Keys.
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.metafinops.com/v1/costs/summary
All API requests are made to the following base URL. All communication is encrypted over HTTPS.
https://api.metafinops.com/v1
Rate limits scale with your plan. Limits are applied per API key and tracked via response headers.
Access cost data, GPU metrics, token analytics, budgets, anomalies, and recommendations.
/v1/costs/summary
Retrieve cost summary by date range
/v1/costs/by-service
Cost breakdown by cloud service
/v1/gpu/utilization
GPU utilization metrics
/v1/gpu/idle
Idle GPU instance detection
/v1/tokens/usage
Token consumption by model/provider
/v1/tokens/cost
Token cost analytics
/v1/budgets
Create budget policy
/v1/budgets/{id}/alerts
Budget alert history
/v1/anomalies
Detected cost anomalies
/v1/reports/generate
Generate cost report
/v1/carbon/footprint
Carbon emissions data
/v1/recommendations
Cost optimization recommendations
Official client libraries to get you up and running in minutes.
$ pip install metafinops
from metafinops import Client
client = Client(api_key="YOUR_API_KEY")
costs = client.costs.summary(
start="2026-03-01",
end="2026-03-31"
)
print(costs.total)
$ npm install @metafinops/sdk
import { MetaFinOps } from "@metafinops/sdk";
const client = new MetaFinOps("YOUR_API_KEY");
const costs = await client.costs.summary({
start: "2026-03-01",
end: "2026-03-31",
});
$ go get github.com/metafinops/go-sdk
import mfo "github.com/metafinops/go-sdk"
client := mfo.NewClient("YOUR_API_KEY")
costs, err := client.Costs.Summary(&mfo.SummaryParams{
Start: "2026-03-01",
End: "2026-03-31",
})
terraform {
required_providers {
metafinops = {
source = "metafinops/metafinops"
version = "~> 1.0"
}
}
}
provider "metafinops" {
api_key = var.metafinops_api_key
}
Receive real-time notifications when key events occur in your MetaFinOps account.
cost.anomaly.detected
Unusual spend detected
budget.threshold.reached
Budget limit hit
gpu.idle.detected
Idle GPU found
report.generated
Report ready to download
X-MetaFinOps-Signature header.{
"event": "cost.anomaly.detected",
"timestamp": "2026-03-31T14:22:00Z",
"data": {
"anomaly_id": "ano_8xK2mP",
"service": "aws-ec2",
"expected_cost": 1240.00,
"actual_cost": 3870.50,
"severity": "high",
"account": "prod-us-east-1"
}
}
Verification tip: Compute HMAC-SHA256 of the raw request body using your webhook secret and compare it to the X-MetaFinOps-Signature header value.
All responses follow a consistent envelope structure for easy parsing.
{
"status": "success",
"data": {
"total_cost": 48520.75,
"currency": "USD",
"period": {
"start": "2026-03-01",
"end": "2026-03-31"
},
"services": [ ... ]
},
"meta": {
"request_id": "req_a1b2c3d4e5",
"timestamp": "2026-03-31T10:15:30Z"
}
}