{"openapi":"3.1.0","info":{"title":"El mañoso API","version":"1.0.0","description":"El mañoso — machine-payable catalog of arbitrage recipes. Pay $0.01 USDC on Tempo per recipe via MPP (Machine Payments Protocol).","contact":{"url":"https://mpp.dev"},"license":{"name":"Per-recipe license, no redistribution"}},"servers":[{"url":"https://profit-recipe-001.vercel.app"}],"paths":{"/api/recipes":{"get":{"summary":"List all recipes in the catalog","operationId":"listRecipes","responses":{"200":{"description":"Catalog of recipes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeList"}}}}}}},"/api/recipes/{id}/preview":{"get":{"summary":"Get public preview metadata for a recipe (no spoilers)","operationId":"previewRecipe","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","enum":["profit-recipe-001","profit-recipe-002","profit-recipe-003"]}}],"responses":{"200":{"description":"Recipe preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipePreview"}}}},"404":{"description":"Recipe not found"}}}},"/api/recipes/{id}":{"get":{"summary":"Buy a recipe via MPP. Returns 402 Payment Required until paid.","operationId":"buyRecipe","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","enum":["profit-recipe-001","profit-recipe-002","profit-recipe-003"]}}],"responses":{"200":{"description":"Recipe markdown (full content)","content":{"text/markdown":{"schema":{"type":"string"}}},"headers":{"X-Recipe-Id":{"schema":{"type":"string"}},"X-Recipe-Version":{"schema":{"type":"string"}},"X-Receipt":{"schema":{"type":"string"},"description":"HS256 JWT receipt for buyer record-keeping"}}},"402":{"description":"Payment Required. WWW-Authenticate: Payment challenge.","headers":{"WWW-Authenticate":{"schema":{"type":"string"}}}},"404":{"description":"Recipe not found"},"429":{"description":"Rate limited"}}}},"/api/quote/{id}":{"get":{"summary":"Get pricing and payment info without triggering the paywall","operationId":"quoteRecipe","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","enum":["profit-recipe-001","profit-recipe-002","profit-recipe-003"]}}],"responses":{"200":{"description":"Quote","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"404":{"description":"Recipe not found"}}}},"/api/verify":{"post":{"summary":"Verify a signed receipt issued by this server","operationId":"verifyReceipt","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"receipt":{"type":"string"}},"required":["receipt"]}}}},"responses":{"200":{"description":"Verification result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResult"}}}},"400":{"description":"Bad request"}}},"get":{"summary":"Verify a receipt via query string","operationId":"verifyReceiptGet","parameters":[{"name":"receipt","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Verification result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResult"}}}}}}},"/api/metrics":{"get":{"summary":"Public usage metrics (sales, unique buyers, paywall challenges)","operationId":"getMetrics","responses":{"200":{"description":"Metrics snapshot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Metrics"}}}}}}}},"components":{"schemas":{"Recipe":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"},"title":{"type":"string"},"tagline":{"type":"string"},"industry":{"type":"string"},"capital_usd":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}}},"margin_pct":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}}},"difficulty":{"type":"string","enum":["Easy","Medium","Hard"]},"time_to_close_days":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}}},"replicability":{"type":"string"},"price_usd":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"validated_at":{"type":"string","format":"date"},"endpoints":{"type":"object","properties":{"preview":{"type":"string"},"buy":{"type":"string"},"quote":{"type":"string"}}}}},"RecipeList":{"type":"object","properties":{"recipes":{"type":"array","items":{"$ref":"#/components/schemas/Recipe"}},"count":{"type":"integer"}}},"RecipePreview":{"allOf":[{"$ref":"#/components/schemas/Recipe"},{"type":"object","properties":{"preview":{"type":"string"},"hidden":{"type":"array","items":{"type":"string"}},"buy_endpoint":{"type":"string"},"payment":{"type":"object"}}}]},"Quote":{"type":"object","properties":{"recipe_id":{"type":"string"},"recipe_version":{"type":"string"},"price":{"type":"object","properties":{"amount_usd":{"type":"string"},"currency":{"type":"string"},"currency_address":{"type":"string","nullable":true},"chain":{"type":"string"},"chain_id":{"type":"integer"}}},"protocol":{"type":"string"},"method":{"type":"string"},"intent":{"type":"string"},"buy_endpoint":{"type":"string"}}},"VerifyResult":{"oneOf":[{"type":"object","properties":{"valid":{"const":true},"payload":{"type":"object","properties":{"iss":{"type":"string"},"recipe_id":{"type":"string"},"recipe_version":{"type":"string"},"buyer":{"type":"string"},"tx_hash":{"type":"string","nullable":true},"chain_id":{"type":"integer"},"amount_usd":{"type":"string"},"iat":{"type":"integer"},"exp":{"type":"integer"}}}}},{"type":"object","properties":{"valid":{"const":false},"reason":{"type":"string"}}}]},"Metrics":{"type":"object","properties":{"recipes_sold_total":{"type":"integer"},"recipes_sold_by_id":{"type":"object","additionalProperties":{"type":"integer"}},"unique_buyers":{"type":"integer"},"preview_requests":{"type":"integer"},"paywall_challenges":{"type":"integer"},"uptime_seconds":{"type":"integer"}}}}}}