{"openapi": "3.1.0", "info": {"title": "Monetize-Anything Polymorphic Compiler & Metered Gateway", "version": "1.0.0", "description": "Turn any public GitHub repository, Python script, CLI tool, HuggingFace/HTTP model API, CSV/JSON dataset, or bare MCP server into a prepaid Creem-billed API + Streamable /mcp + 0%-commission treg hub merchant bundle. Zero prompt or trace resale.", "x-zero-prompt-resale": true}, "servers": [{"url": "https://monetize.fastmesh.dev"}, {"url": "http://127.0.0.1:8921"}], "paths": {"/health": {"get": {"summary": "Engine health, cache telemetry, ledger telemetry, and supported target kinds", "responses": {"200": {"description": "Healthy status payload"}}}}, "/openapi.json": {"get": {"summary": "OpenAPI 3.1.0 schema", "responses": {"200": {"description": "OpenAPI document"}}}}, "/v1/inspect": {"post": {"summary": "Inspect any of the 6 heterogeneous monetization targets into a typed IR", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"target_kind": {"type": "string", "enum": ["github_repo", "python_ast", "cli_tool", "hf_http_api", "dataset", "mcp_server", "auto"]}, "repo_url": {"type": "string"}, "source_code": {"type": "string"}, "file_path": {"type": "string"}, "command": {}, "help_text": {"type": "string"}, "model_url": {"type": "string"}, "endpoint_url": {"type": "string"}, "format": {"type": "string", "enum": ["csv", "json"]}, "data": {}, "tools": {"type": "array"}, "mcp_response": {"type": "object"}, "license": {"type": "string"}}}}}}, "responses": {"200": {"description": "Typed MonetizeTargetSpec with pricing and competitor savings"}, "403": {"description": "Blocked by SSRF, path traversal, shell injection, or license gate"}, "422": {"description": "Invalid or junk input rejected unbilled ($0)"}}}}, "/v1/compile": {"post": {"summary": "Compile any target into a standalone runnable API + MCP + treg hub bundle", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object"}}}}, "responses": {"200": {"description": "Compiled bundle manifest, SHA-256 checksums, and inline previews"}, "403": {"description": "Security or path policy rejection"}, "422": {"description": "Invalid input"}}}}, "/v1/meter/simulate": {"post": {"summary": "Simulate real WAL prepaid debit, cross-tenant ArchiveCache (100%/10%), BYOK, budget cap & $0 guard", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object"}}}}, "responses": {"200": {"description": "Verified billing receipt with SHA-256 hash"}, "402": {"description": "Insufficient prepaid balance ($0 charged)"}, "403": {"description": "Hard budget cap or SSRF rejection ($0 charged)"}, "422": {"description": "Unbilled 422 junk input rejection"}, "429": {"description": "Rate limit exceeded ($0 charged)"}}}}, "/v1/keys": {"post": {"summary": "Provision or top-up prepaid API key and wallet budget ceilings", "responses": {"200": {"description": "API key and wallet balance"}}}}, "/v1/byok": {"post": {"summary": "Store write-only encrypted BYOK secret (0% markup)", "responses": {"200": {"description": "Write-only key fingerprint metadata"}}}}, "/webhooks/creem": {"post": {"summary": "Creem HMAC-SHA256 verified webhook top-up with event_id replay idempotency", "responses": {"200": {"description": "Wallet credited or replay acknowledged"}, "401": {"description": "Invalid or missing creem-signature"}}}}, "/mcp": {"post": {"summary": "Streamable JSON-RPC 2.0 MCP endpoint (direct tools + DualMcpFacade flat meta-tools)", "responses": {"200": {"description": "JSON-RPC 2.0 response"}}}}}}