{"openapi": "3.1.0", "info": {"title": "Cloud-FinOps-Arbitrage API", "version": "1.0.0", "description": "Four-stage deterministic cloud and AI infrastructure FinOps arbitrage compiler: exact Decimal multi-cloud bill diff auditing, polite SSRF-guarded live/offline upstream Pareto benchmarking, commitment/cliff & multi-team largest-remainder quota pool slicing, and deployable JSON/YAML/OpenAI-compatible routing policy compilation. Zero Savings = $0 Fee. Zero Customer Bill Resale. BYOK API keys never written to disk.", "contact": {"email": "finops@fastmesh.dev", "url": "https://finops.fastmesh.dev"}}, "servers": [{"url": "https://finops.fastmesh.dev", "description": "Production HTTPS Gateway"}], "paths": {"/health": {"get": {"operationId": "finopsHealth", "summary": "Service health, rate card telemetry, and billing policy", "responses": {"200": {"description": "Healthy"}}}}, "/openapi.json": {"get": {"operationId": "getOpenApi", "summary": "OpenAPI 3.1.0 contract document", "responses": {"200": {"description": "OpenAPI JSON"}}}}, "/v1/finops/audit-spend": {"post": {"operationId": "auditSpend", "summary": "Stage 1: Audit cloud/AI spend bills (CSV or JSON) with exact Decimal attribution", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"bill_csv": {"type": "string", "description": "CSV billing export (AWS CUR, GCP/Azure, LLM logs, GPU, S3 egress, Vector DB, B2B scrape)"}, "line_items": {"type": "array", "items": {"type": "object"}}}}}}}, "responses": {"200": {"description": "Exact Decimal spend audit & waste flags"}, "422": {"description": "Unbilled invalid or empty input ($0 charged)"}}}}, "/v1/finops/benchmark-upstreams": {"post": {"operationId": "benchmarkUpstreams", "summary": "Stage 2: Polite SSRF-guarded live/offline upstream benchmark & signed SHA-256 Pareto scorecard", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["targets"], "properties": {"mode": {"type": "string", "enum": ["auto", "live", "offline"]}, "category": {"type": "string", "enum": ["llm_inference", "gpu_compute", "storage_egress", "vector_db", "b2b_enrichment_scrape"]}, "samples_per_target": {"type": "integer", "minimum": 1, "maximum": 10}, "concurrency": {"type": "integer", "minimum": 1, "maximum": 6}, "timeout_s": {"type": "number", "minimum": 1, "maximum": 12}, "targets": {"type": "array", "minItems": 1, "maxItems": 10, "items": {"type": "object"}}}}}}}, "responses": {"200": {"description": "Pareto frontier & immutable scorecard_sha256"}, "422": {"description": "Unbilled invalid input or SSRF blocked ($0 charged)"}}}}, "/v1/finops/pool-model": {"post": {"operationId": "modelPool", "summary": "Stage 3: Reserved/Spot/Commitment cliff modeling & exact Decimal multi-team quota slicing", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"category": {"type": "string", "enum": ["llm_inference", "gpu_compute", "storage_egress", "vector_db", "b2b_enrichment_scrape"]}, "commitment_type": {"type": "string"}, "solo_unit_usd": {"type": "string"}, "pool_total_cost_usd": {"type": "string"}, "volume_tiers": {"type": "array", "items": {"type": "object"}}, "teams": {"type": "array", "items": {"type": "object"}}}}}}}, "responses": {"200": {"description": "Exact Decimal commitment & team allocation schedule (zero penny drift)"}, "422": {"description": "Unbilled invalid input ($0 charged)"}}}}, "/v1/finops/compile-arbitrage": {"post": {"operationId": "compileArbitrage", "summary": "Stage 4: Compile full multi-upstream arbitrage policy (JSON + YAML + OpenAI gateway config)", "description": "Strictly enforces Zero Savings = $0 Fee: when net_monthly_savings_usd <= 0.00 or input is invalid/unverified, billable_usd='0.00', charge_micros=0, zero_savings_zero_fee=true. Outcome fee capped at max_price_micros <= 2000000 ($2.00).", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"tenant_id": {"type": "string"}, "bill_csv": {"type": "string"}, "line_items": {"type": "array", "items": {"type": "object"}}, "benchmark": {"type": "object"}, "pool": {"type": "object"}, "max_price_micros": {"type": "integer", "maximum": 2000000}}}}}}, "responses": {"200": {"description": "Compiled JSON/YAML/OpenAI routing policy + signed receipt_sha256"}, "422": {"description": "Unbilled invalid input or SSRF blocked ($0 charged)"}}}}, "/webhooks/creem": {"post": {"operationId": "creemWebhook", "summary": "Creem HMAC-SHA256 verified idempotent credit pack webhook", "responses": {"200": {"description": "Webhook processed or idempotently replayed"}, "401": {"description": "Invalid creem-signature"}}}}, "/mcp": {"post": {"operationId": "mcpJsonRpc", "summary": "MCP JSON-RPC 2.0 endpoint (initialize, tools/list, tools/call)", "responses": {"200": {"description": "JSON-RPC 2.0 response envelope"}}}}}}