# Anicca Emotion Detector

> Anicca Emotion Detector is a paid API for AI agents from x402-agents-production.up.railway.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Analyzes text to detect primary and secondary emotions, valence, intensity, and confidence, with optional response strategy suggestions.

## Facts

- Endpoint: POST https://x402-agents-production.up.railway.app/emotion-detector
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/anicca-emotion-detector-a03abbc3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YoMOYCQ9W2GJHMP3gxBHJ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability anicca-emotion-detector-a03abbc3 -d '<json body>'
```

Example prompt: Analyze the emotion in this message — 'I keep second-guessing my decision and I don't know how to move forward' — and tell me the primary and secondary emotions, whether it's positive or negative, how intense it is, and what response strategy you'd suggest.

## When to prefer this

Choose this endpoint when you need fine-grained emotion detection beyond simple positive/negative sentiment, including secondary emotions, intensity levels, safe-T distress flags, and actionable response strategies. Particularly suited for conversational AI agents, mental health applications, or customer support bots that need to respond empathetically. Supports both English and Japanese output natively.

## Known failure modes

- Text too short or empty — validation error on minLength:1
- Text exceeds 2000 characters — rejected with validation error
- Invalid language enum value (only 'en' or 'ja' are supported)
- Payment failure over x402 protocol — 402 status returned if USDC payment not settled
- Model uncertainty for ambiguous or very short texts may yield low confidence scores
- Context field exceeding 500 characters rejected

## How this service works

Small paid JSON tools for autonomous agents, settled in USDC over x402.

## Output

Returns a JSON object with primary_emotion, secondary_emotion, valence (positive/negative/neutral), intensity (low/medium/high), confidence score (0-1), a unique emotion_id, a boolean safe_t_flag indicating potential distress, and a response_strategy string suggesting how to respond empathetically.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 2000,
   "minLength": 1
  },
  "context": {
   "type": "string",
   "maxLength": 500
  },
  "language": {
   "enum": [
    "en",
    "ja"
   ],
   "type": "string",
   "default": "en",
   "description": "Output language."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "valence": "negative",
  "intensity": "medium",
  "confidence": 0.86,
  "emotion_id": "emo_a1b2c3",
  "safe_t_flag": false,
  "primary_emotion": "anxiety",
  "response_strategy": "Acknowledge the uncertainty, then identify one controllable next step.",
  "secondary_emotion": "hope"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/anicca-emotion-detector-a03abbc3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agents-production.up.railway.app](https://www.zero.xyz/host/x402-agents-production.up.railway.app/llms.txt)
