{"openapi":"3.1.0","info":{"title":"Lockin-Breaker-Studio API (W4-F10)","version":"1.0.0","description":"Three-stage SaaS Escape Studio: Stage 1 exact Decimal 3-year TCO & live SQLite benchmark, Stage 2 lossless SQLite/Postgres/JSONL migration + Zapier/Make Python webhook codegen + per-row SHA-256 Merkle parity proof (with atomic rollback & $0 billing on failure), and Stage 3 standalone open-DB REST + /mcp microservice compiler. Zero customer DB retention.","contact":{"email":"escape@fastmesh.dev","url":"https://escape.fastmesh.dev"},"x-organism-id":"f10_lockin_breaker_studio","x-zero-retention":true},"servers":[{"url":"https://escape.fastmesh.dev"},{"url":"http://127.0.0.1:9030"}],"paths":{"/health":{"get":{"summary":"Service health, port, and capability status","responses":{"200":{"description":"Service healthy"}}}},"/openapi.json":{"get":{"summary":"OpenAPI 3.1.0 machine-readable specification","responses":{"200":{"description":"OpenAPI JSON"}}}},"/v1/escape/tco-benchmark":{"post":{"summary":"Stage 1: Exact Decimal 3-year SaaS TCO, bloat/orphan FK audit & live SQLite benchmark","responses":{"200":{"description":"Signed TCO & live SQLite benchmark scorecard"},"422":{"description":"Invalid input ($0 billed)"}}}},"/v1/escape/dry-run":{"post":{"summary":"Stage 2 Preview: Ecosystem auto-detection, PK/FK/type inference & conflict audit","responses":{"200":{"description":"Dry-run schema & conflict report"},"422":{"description":"Empty or corrupt input ($0 billed)"}}}},"/v1/escape/migrate":{"post":{"summary":"Stage 2 Execute: Lossless SQLite + Postgres DDL + JSONL + webhook codegen + SHA-256 parity","responses":{"200":{"description":"Verified lossless migration bundle"},"403":{"description":"Forbidden output path ($0 billed)"},"422":{"description":"Corrupt input or atomic rollback on parity failure ($0 billed)"}}}},"/v1/escape/verify-parity":{"post":{"summary":"Independent canonical per-row SHA-256 & Merkle verifier (catches 1-byte tamper)","responses":{"200":{"description":"Parity verification proof (parity_ok=false billed $0.00)"},"422":{"description":"Invalid input ($0 billed)"}}}},"/v1/escape/wrap-api":{"post":{"summary":"Stage 3: Compile migrated SQLite DB into standalone runnable REST + /mcp API package","responses":{"200":{"description":"Compiled open-DB microservice package"},"422":{"description":"Invalid input ($0 billed)"}}}},"/v1/escape/full-studio":{"post":{"summary":"Idempotent Stage 1 + Stage 2 + Independent Parity + Stage 3 orchestration","responses":{"200":{"description":"Complete verified escape studio bundle"},"422":{"description":"Invalid input or rollback ($0 billed)"}}}},"/webhooks/creem":{"post":{"summary":"Creem HMAC-SHA256 webhook verification (zero hardcoded secrets)","responses":{"200":{"description":"Verified webhook receipt"},"401":{"description":"Invalid signature"},"503":{"description":"CREEM_WEBHOOK_SECRET not configured"}}}},"/mcp":{"post":{"summary":"JSON-RPC 2.0 MCP endpoint (initialize, tools/list, tools/call)","responses":{"200":{"description":"JSON-RPC 2.0 result"},"422":{"description":"Invalid/empty MCP request ($0 billed)"}}}}},"x-mcp-tools":[{"name":"escape_tco_benchmark","description":"Stage 1: Compute exact Decimal 3-year SaaS TCO (seats + API overages + add-ons) vs self-hosted open-stack cost, audit duplicate fields / orphan FKs / redundant automations, and run a live SQLite insert/query benchmark with SHA-256 scorecard.","inputSchema":{"type":"object","properties":{"platform":{"type":"string","description":"SaaS platform (salesforce, hubspot, airtable, shopify, zapier, make, notion, auto)."},"seats":{"type":"integer","minimum":1},"seat_price_monthly_usd":{"type":"string"},"annual_escalation_pct":{"type":"string"},"api_overage_monthly_usd":{"type":"string"},"addons_monthly_usd":{"type":"string"},"self_hosted_infra_monthly_usd":{"type":"string"},"self_hosted_ops_monthly_usd":{"type":"string"},"one_time_migration_usd":{"type":"string"},"source_data":{"description":"Optional SaaS export payload for bloat audit and data-driven SQLite benchmark."},"benchmark_rows":{"type":"integer","default":400},"tenant_id":{"type":"string"},"no_cache":{"type":"boolean","default":false}}}},{"name":"escape_dry_run","description":"Stage 2 Preview: Auto-detect SaaS ecosystem across Salesforce/HubSpot, Airtable, Shopify, Zapier/Make, and Notion; infer PK/FK/StrongTypes/currency/dates; report nulls, BOM, orphan FKs, duplicate PKs, sparse columns, and mixed-type conflicts.","inputSchema":{"type":"object","properties":{"source_data":{"description":"Raw CSV/JSON/JSONL/Markdown export, multi-table dict, or base64 wrapper."},"platform":{"type":"string","default":"auto"},"table_name":{"type":"string","default":"records"},"tenant_id":{"type":"string"},"no_cache":{"type":"boolean","default":false}},"required":["source_data"]}},{"name":"escape_migrate","description":"Stage 2 Execute: Losslessly migrate SaaS exports into SQLite + standard Postgres DDL + canonical JSONL + Zapier/Make Python stdlib webhook skeleton with per-row SHA-256 & Merkle parity proof. Atomically rolls back ($0 billed) on any row drop, corrupt input, or parity mismatch.","inputSchema":{"type":"object","properties":{"source_data":{"description":"Raw SaaS export payload or multi-table dict."},"platform":{"type":"string","default":"auto"},"table_name":{"type":"string","default":"records"},"output_dir":{"type":"string","description":"Optional authorized output directory inside sandbox/state/temp."},"redact":{"type":"boolean","default":false},"tenant_id":{"type":"string"},"no_cache":{"type":"boolean","default":false}},"required":["source_data"]}},{"name":"escape_verify_parity","description":"Independent Parity Verifier: Compare source vs migrated SQLite/JSONL/rows via canonical per-row SHA-256 and Merkle table digest. Detects 1-byte tampering immediately (parity_ok=false, $0 billed).","inputSchema":{"type":"object","properties":{"source_data":{},"source_rows":{"type":"array","items":{"type":"object"}},"source_tables":{"type":"object"},"target_sqlite_path":{"type":"string"},"target_sqlite_base64":{"type":"string"},"target_jsonl":{"type":"string"},"target_rows":{"type":"array","items":{"type":"object"}},"target_tables":{"type":"object"},"type_map":{"type":"object"},"type_maps":{"type":"object"},"expected_dataset_merkle_sha256":{"type":"string"},"redact":{"type":"boolean","default":false}}}},{"name":"escape_wrap_api","description":"Stage 3: Compile a migrated SQLite database into a standalone runnable Python 3 stdlib REST + /mcp API microservice package with API key auth, token-bucket rate limiter, optional Creem billing guard, CRUD/query routes, and /v1/export Zero-Lock-In full export.","inputSchema":{"type":"object","properties":{"sqlite_base64":{"type":"string"},"sqlite_path":{"type":"string"},"source_data":{"description":"Optional raw SaaS export to auto-migrate and wrap."},"service_name":{"type":"string","default":"escaped_open_api"},"port":{"type":"integer","default":9130},"rate_limit_rpm":{"type":"integer","default":120},"burst_size":{"type":"integer","default":30},"require_auth":{"type":"boolean","default":false},"api_key":{"type":"string"},"enable_creem_billing":{"type":"boolean","default":false},"output_dir":{"type":"string"},"tenant_id":{"type":"string"}}}},{"name":"escape_full_studio","description":"Full Studio Orchestrator: Runs Stage 1 (Decimal 3-year TCO + live SQLite benchmark), Stage 2 (lossless SQLite/Postgres/JSONL/+webhook migration), independent per-row SHA-256 parity verification, and Stage 3 (standalone REST + /mcp API compilation) in one idempotent call.","inputSchema":{"type":"object","properties":{"source_data":{"description":"Raw SaaS export payload or multi-table dict."},"platform":{"type":"string","default":"auto","enum":["auto","salesforce_hubspot","airtable","shopify","zapier_make","notion","generic","salesforce","hubspot","zapier","make"]},"seats":{"type":"integer"},"service_name":{"type":"string"},"output_dir":{"type":"string"},"redact":{"type":"boolean","default":false},"tenant_id":{"type":"string"},"no_cache":{"type":"boolean","default":false}},"required":["source_data"]}}],"x-pricing-micros":{"tco_benchmark":100000,"dry_run":50000,"migrate":250000,"verify_parity":50000,"wrap_api":250000,"full_studio":500000}}