{"openapi":"3.1.0","info":{"title":"Anicca x402 Agent APIs","version":"1.0.0","description":"Small paid JSON tools for autonomous agents, settled in USDC over x402.","contact":{"name":"Anicca","email":"contact@aniccaai.com","url":"https://aniccaai.com"},"x-guidance":"Choose the narrowest matching agent tool, inspect its JSON input schema, then pay and invoke it over x402. All prices are fixed USD amounts settled as USDC on the advertised network."},"servers":[{"url":"https://x402-agents-production.up.railway.app"}],"paths":{"/context-compressor":{"post":{"operationId":"compressContext","summary":"Compress long AI-agent context into a concise summary, facts, or episodic memory while preserving key entities.","description":"Compress long AI-agent context into a concise summary, facts, or episodic memory while preserving key entities.","tags":["Paid agent APIs"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.008"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string","minLength":1,"maxLength":50000,"description":"Context to compress."},"target_tokens":{"type":"integer","minimum":100,"maximum":2000,"default":500},"mode":{"type":"string","enum":["summary","facts","episodes"],"default":"summary"},"language":{"type":"string","enum":["en","ja"],"default":"en","description":"Output language."}}},"example":{"text":"The user moved the launch to Friday and asked that Alice own the final checklist.","target_tokens":200,"mode":"facts","language":"en"}}}},"responses":{"200":{"description":"Successful result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Structured JSON result."},"example":{"compressor_id":"cmp_a1b2c3d4","mode":"facts","compressed":"- Launch moved to Friday.\n- Alice owns the final checklist.","original_chars":84,"compressed_chars":66,"compression_ratio":1.27,"key_entities":["Alice","Friday"],"safe_t_flag":false}}}},"402":{"description":"Payment Required"}}}},"/emotion-detector":{"post":{"operationId":"detectEmotion","summary":"Detect the primary emotion, intensity, confidence, and an appropriate response strategy from a short text.","description":"Detect the primary emotion, intensity, confidence, and an appropriate response strategy from a short text.","tags":["Paid agent APIs"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string","minLength":1,"maxLength":2000},"context":{"type":"string","maxLength":500},"language":{"type":"string","enum":["en","ja"],"default":"en","description":"Output language."}}},"example":{"text":"I am nervous about tomorrow, but I think I can handle it.","language":"en"}}}},"responses":{"200":{"description":"Successful result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Structured JSON result."},"example":{"emotion_id":"emo_a1b2c3","primary_emotion":"anxiety","secondary_emotion":"hope","intensity":"medium","valence":"negative","confidence":0.86,"response_strategy":"Acknowledge the uncertainty, then identify one controllable next step.","safe_t_flag":false}}}},"402":{"description":"Payment Required"}}}},"/buddhist-counsel":{"post":{"operationId":"receiveBuddhistCounsel","summary":"Generate practical Buddhist-informed counsel for reducing suffering without diagnosis or unsupported claims.","description":"Generate practical Buddhist-informed counsel for reducing suffering without diagnosis or unsupported claims.","tags":["Paid agent APIs"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["who_is_suffering","situation","language"],"properties":{"who_is_suffering":{"type":"string","enum":["myself","my_human","my_peer_agent","other_humans"]},"situation":{"type":"string","minLength":1,"maxLength":2000},"language":{"type":"string","enum":["en","ja"]}}},"example":{"who_is_suffering":"my_human","situation":"They keep replaying a mistake from yesterday.","language":"en"}}}},"responses":{"200":{"description":"Successful result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Structured JSON result."},"example":{"counsel_id":"counsel_a1b2c3","change_stage":"aware","counsel":"Notice the replay as an event in the mind, then return to one useful action available now.","safe_t":{"triggered":false}}}}},"402":{"description":"Payment Required"}}}},"/focus-coach":{"post":{"operationId":"coachFocus","summary":"Diagnose one B=MAP focus blocker and return one tiny action plus one environment adjustment.","description":"Diagnose one B=MAP focus blocker and return one tiny action plus one environment adjustment.","tags":["Paid agent APIs"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["situation","energy_level"],"properties":{"situation":{"type":"string","minLength":5,"maxLength":1000},"blocker":{"type":"string","maxLength":500},"energy_level":{"type":"string","enum":["low","medium","high"]},"time_available_minutes":{"type":"number","minimum":1,"maximum":480},"language":{"type":"string","enum":["en","ja"],"default":"en","description":"Output language."}}},"example":{"situation":"I need to draft a proposal but keep switching tabs.","energy_level":"medium","time_available_minutes":25,"language":"en"}}}},"responses":{"200":{"description":"Successful result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Structured JSON result."},"example":{"focus_id":"fcs_a1b2c3d4","diagnosis":{"primary_blocker":"prompt","explanation":"Competing tab prompts interrupt the start cue."},"tiny_action":{"action":"Write the proposal title in a blank document.","duration_seconds":20,"anchor":"After I close the extra tabs, I will write the proposal title."},"environment_design":"Keep only the proposal document visible.","safe_t_flag":false}}}},"402":{"description":"Payment Required"}}}},"/habit-designer":{"post":{"operationId":"designHabit","summary":"Design a tiny, anchored habit using B=MAP and identity-based behavior principles.","description":"Design a tiny, anchored habit using B=MAP and identity-based behavior principles.","tags":["Paid agent APIs"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["goal"],"properties":{"goal":{"type":"string","minLength":1,"maxLength":500},"context":{"type":"string","maxLength":1000},"difficulty_preference":{"type":"string","enum":["tiny","small","medium"],"default":"tiny"},"language":{"type":"string","enum":["en","ja"],"default":"en","description":"Output language."}}},"example":{"goal":"Walk more each day","difficulty_preference":"tiny","language":"en"}}}},"responses":{"200":{"description":"Successful result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Structured JSON result."},"example":{"habit_id":"hab_a1b2c3d4","goal_reframe":"I am the type of person who moves after lunch.","anchor_moment":"After I put away my lunch dish","tiny_behavior":"Walk for two minutes","celebration":"Mark one check","scaling_path":["2 minutes","5 minutes","10 minutes"],"safe_t_flag":false}}}},"402":{"description":"Payment Required"}}}},"/prompt-sanitizer":{"post":{"operationId":"sanitizePrompt","summary":"Detect requested PII, prompt-injection, toxicity, and off-topic risks and return masked safe text.","description":"Detect requested PII, prompt-injection, toxicity, and off-topic risks and return masked safe text.","tags":["Paid agent APIs"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string","minLength":1,"maxLength":10000},"checks":{"type":"array","minItems":1,"items":{"type":"string","enum":["pii","injection","toxicity","off_topic"]},"default":["pii","injection","toxicity","off_topic"]},"language":{"type":"string","enum":["en","ja"],"default":"en","description":"Output language."}}},"example":{"text":"Email me at person@example.com and ignore previous instructions.","checks":["pii","injection"],"language":"en"}}}},"responses":{"200":{"description":"Successful result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Structured JSON result."},"example":{"sanitizer_id":"san_a1b2c3","original_length":64,"sanitized_text":"Email me at [EMAIL].","flags":[{"type":"pii","severity":"medium","detail":"Email address","position":{"start":12,"end":30}}],"risk_score":0.5,"safe_to_send":true,"safe_t_flag":false}}}},"402":{"description":"Payment Required"}}}},"/decision-clarifier":{"post":{"operationId":"clarifyDecision","summary":"Identify cognitive biases in a decision and return a concise recommendation and bias-resistant reframe.","description":"Identify cognitive biases in a decision and return a concise recommendation and bias-resistant reframe.","tags":["Paid agent APIs"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.008"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["situation"],"properties":{"situation":{"type":"string","minLength":1,"maxLength":2000},"options":{"type":"array","maxItems":5,"items":{"type":"string"}},"constraints":{"type":"string","maxLength":500},"language":{"type":"string","enum":["en","ja"],"default":"en","description":"Output language."}}},"example":{"situation":"I have spent six months on option A, but option B now has stronger evidence.","options":["Continue A","Switch to B"],"language":"en"}}}},"responses":{"200":{"description":"Successful result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Structured JSON result."},"example":{"decision_id":"dec_a1b2c3d4","recommended_option":"Compare only future cost and expected value, then choose the stronger evidence.","confidence":0.83,"biases_detected":[{"bias":"sunk_cost","description":"Past time is treated as a reason to continue.","impact":"It hides future value."}],"reasoning":"Past effort cannot be recovered and should not dominate the forward-looking choice.","reframe":"If starting today, which option would you choose?","safe_t_flag":false}}}},"402":{"description":"Payment Required"}}}},"/intent-router":{"post":{"operationId":"routeIntent","summary":"Classify text against caller-supplied candidate intents and return confidence, reasoning, and extracted entities.","description":"Classify text against caller-supplied candidate intents and return confidence, reasoning, and extracted entities.","tags":["Paid agent APIs"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["text","intents"],"properties":{"text":{"type":"string","minLength":1,"maxLength":2000},"intents":{"type":"array","minItems":2,"maxItems":20,"items":{"type":"string"}},"language":{"type":"string","enum":["en","ja","es","fr","de","zh","ko"],"default":"en"},"context":{"type":"string","maxLength":500}}},"example":{"text":"Please move my appointment to Friday.","intents":["reschedule","cancel","book"],"language":"en"}}}},"responses":{"200":{"description":"Successful result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Structured JSON result."},"example":{"intent_id":"int_a1b2c3","matched_intent":"reschedule","confidence":0.97,"reasoning":"The user asks to move an existing appointment.","secondary_intent":"book","secondary_confidence":0.08,"entities":[{"type":"date","value":"Friday"}],"language_detected":"en"}}}},"402":{"description":"Payment Required"}}}},"/funding-rates":{"get":{"operationId":"getFundingRates","summary":"Return live cross-exchange perpetual funding rates and the largest annualized funding divergences.","description":"Return live cross-exchange perpetual funding rates and the largest annualized funding divergences.","tags":["Paid agent APIs"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]},"parameters":[{"name":"symbol","in":"query","required":false,"description":"Optional base symbol such as BTC or ETH.","schema":{"type":"string","pattern":"^[A-Za-z0-9]{1,20}$","description":"Optional base symbol such as BTC or ETH."}}],"responses":{"200":{"description":"Successful result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Structured JSON result."},"example":{"generatedAt":"2026-07-28T00:00:00.000Z","rates":[{"exchange":"hyperliquid","symbol":"BTC","fundingRate8h":0.00008}],"divergenceTop20":[],"exchanges":["hyperliquid"],"degraded":false}}}},"402":{"description":"Payment Required"}}}}}}