# AmanChain Sentiment Analysis

> AmanChain Sentiment Analysis is a paid API for AI agents from amanchain-relay.gitajhd.workers.dev, paid per call via x402, $0.002488/call, status unknown (last checked 2026-09-14).

Analyzes text to return sentiment label, polarity score, and detected emotions — paid per call via x402 in USDC on Base.

## Facts

- Endpoint: POST https://amanchain-relay.gitajhd.workers.dev/api/x402/aman-sentiment
- Price: $0.002488/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/amanchain-sentiment-analysis-edecfecf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0hbElz4KkN64Wzc7arF_6

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 amanchain-sentiment-analysis-edecfecf -d '<json body>'
```

Example prompt: Can you analyze the sentiment of this review and tell me the polarity score and any emotions detected: 'The product arrived late and the packaging was damaged, but customer support was surprisingly helpful and resolved everything quickly'?

## When to prefer this

Choose this endpoint when you need a pay-per-call, no-account sentiment and emotion analysis service that settles instantly in USDC on Base via x402. Ideal for agents that need to analyze arbitrary text without API key management, or when running inside a crypto-native pipeline that already handles x402 micropayments.

## Known failure modes

- Empty or missing 'request' field returns an error
- Incorrect serviceId value causes routing failure
- Payment not fulfilled via x402 results in 402 Payment Required response
- Extremely short or ambiguous text may yield low-confidence or generic sentiment output
- Network timeout from Cloudflare Workers under high load

## How this service works

Sentiment analysis API — text sentiment score with polarity, emotions and positive, negative or neutral classification; social media and review sentiment, real-time. Deterministic on-chain execution by the AmanChain node — live consensus state, real blocks, pools and balances. Pay per call via x402 (USDC on Base), no account, no API key. POST JSON {"serviceId":"aman-sentiment","request":"<input>"}.

## Output

Returns a sentiment label (e.g. positive, negative, neutral), a numeric polarity score indicating strength and direction of sentiment, and a breakdown of detected emotions (e.g. joy, anger, sadness, fear, surprise) present in the input text.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "body": {
     "type": "object"
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "example": {
     "type": "object",
     "example": {
      "ok": true
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/amanchain-sentiment-analysis-edecfecf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from amanchain-relay.gitajhd.workers.dev](https://www.zero.xyz/host/amanchain-relay.gitajhd.workers.dev/llms.txt)
