{"openapi":"3.1.0","info":{"title":"Fortune Demo","description":"Pay-per-call fortune-telling API on x402 and MPP. Powered by @agentcash/router.","version":"1.0.0","x-guidance":"POST /api/fortune for a single fortune ($0.001, x402 exact or MPP one-shot). POST /api/fortune/premium for x402 upto (handler calls charge(amount)). POST /api/fortune/llm for MPP request-mode metered billing. POST /api/fortune/stream for MPP-streamed token-by-token billing. POST /api/fortune/dynamic for body-derived pricing. POST /api/fortune/membership for pay-once-then-SIWX-replay. GET /api/fortune/profile and GET/POST /api/fortune/favorites are SIWX (identity, no payment).","guidance":"POST /api/fortune for a single fortune ($0.001, x402 exact or MPP one-shot). POST /api/fortune/premium for x402 upto (handler calls charge(amount)). POST /api/fortune/llm for MPP request-mode metered billing. POST /api/fortune/stream for MPP-streamed token-by-token billing. POST /api/fortune/dynamic for body-derived pricing. POST /api/fortune/membership for pay-once-then-SIWX-replay. GET /api/fortune/profile and GET/POST /api/fortune/favorites are SIWX (identity, no payment).","contact":{"email":"contact@fulinlabs.com"}},"servers":[{"url":"https://fortune.fulinlabs.com"}],"tags":[{"name":"Fortune"}],"paths":{"/api/fortune":{"post":{"operationId":"fortune","summary":"Random fortune — fixed price; x402 exact or MPP one-shot","tags":["Fortune"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}]},"responses":{"200":{"description":"Successful response"},"402":{"description":"Payment Required"}}}},"/api/fortune/premium":{"post":{"operationId":"fortune_premium","summary":"Premium fortune with category selection (rate limited per category)","tags":["Fortune"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","enum":["love","career","health"]}},"required":["category"]}}}},"responses":{"200":{"description":"Successful response"},"402":{"description":"Payment Required"}}}},"/api/fortune/profile":{"get":{"operationId":"fortune_profile","summary":"Get verified wallet identity (SIWX, no payment)","tags":["Fortune"],"security":[{"siwx":[]}],"responses":{"200":{"description":"Successful response"},"402":{"description":"Authentication Required"}}}},"/api/fortune/membership":{"post":{"operationId":"fortune_membership","summary":"Pay once via x402; subsequent calls replay free with a SIWX signature","tags":["Fortune"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]},"security":[{"siwx":[]}],"responses":{"200":{"description":"Successful response"},"402":{"description":"Authentication Required"}}}},"/api/fortune/favorites":{"post":{"operationId":"fortune_favorites","summary":"Save a favorite fortune (SIWX protected, max 3 per wallet)","tags":["Fortune"],"security":[{"siwx":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fortune":{"type":"string","minLength":1,"description":"The fortune text to save"}},"required":["fortune"]}}}},"responses":{"200":{"description":"Successful response"},"402":{"description":"Authentication Required"}}},"get":{"operationId":"fortune_favorites","summary":"Get your saved favorite fortunes","tags":["Fortune"],"security":[{"siwx":[]}],"responses":{"200":{"description":"Successful response"},"402":{"description":"Authentication Required"}}}},"/api/fortune/dynamic":{"post":{"operationId":"fortune_dynamic","summary":"Body-derived pricing fortune with pre-payment validation","tags":["Fortune"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"1.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","enum":["love","career","health","wealth"]},"depth":{"default":"brief","type":"string","enum":["brief","detailed","comprehensive"]}},"required":["category"]}}}},"responses":{"200":{"description":"Successful response"},"402":{"description":"Payment Required"}}}},"/api/fortune/llm":{"post":{"operationId":"fortune_llm","summary":"Request-mode metered fortune — bills unitCost per request via MPP session","tags":["Fortune"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":280}},"required":["prompt"]}}}},"responses":{"200":{"description":"Successful response"},"402":{"description":"Payment Required"}}}},"/api/fortune/stream":{"post":{"operationId":"fortune_stream","summary":"Streaming fortune — bills per yielded token via MPP session vouchers","tags":["Fortune"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":280}},"required":["prompt"]}}}},"responses":{"200":{"description":"Successful response"},"402":{"description":"Payment Required"}}}}},"components":{"securitySchemes":{"siwx":{"type":"apiKey","in":"header","name":"SIGN-IN-WITH-X"}}}}