# AsterPay AI Sentiment Analysis

> AsterPay AI Sentiment Analysis is a paid API for AI agents from x402.asterpay.io, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Analyzes text to return a sentiment classification (positive/negative/neutral), a numeric sentiment score, and emotion breakdown

## Facts

- Endpoint: GET https://x402.asterpay.io/v2/x402/ai/sentiment
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/asterpay-ai-sentiment-analysis-58aa8579
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_F34YNlchnsXNlKmGQqdZP

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 asterpay-ai-sentiment-analysis-58aa8579
```

Example prompt: What's the sentiment of this customer review — is it positive, negative, or neutral, and how confident are you? The review says: 'The product exceeded my expectations but shipping took forever.'

## When to prefer this

Choose this endpoint when you need a quick, cheap ($0.01 USDC), pay-per-call sentiment score with emotion breakdown for arbitrary text, especially in agent workflows that require micropayment-native APIs via the x402 protocol. Prefer it over free-tier alternatives when you need reliable uptime, per-call billing without subscription overhead, and emotion-level granularity beyond simple positive/negative classification.

## Known failure modes

- Missing required 'text' query parameter returns a validation error
- Empty or whitespace-only text may return low-confidence or neutral results
- Very long text strings may be truncated or rejected
- Payment failure (insufficient USDC balance or x402 auth error) blocks the call
- Non-English text may return lower accuracy or unexpected results

## How this service works

AI-powered sentiment analysis. Send text, get sentiment score + emotions. Paid via x402.

## Output

Returns a JSON object with a 'sentiment' enum (positive, negative, or neutral), a 'score' float between -1 and 1 indicating sentiment polarity and intensity, a 'confidence' float between 0 and 1, and an optional 'emotions' object with per-emotion scores such as joy, trust, and surprise.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "schema": {
  "type": "object",
  "required": [
   "sentiment",
   "score"
  ],
  "properties": {
   "score": {
    "type": "number",
    "maximum": 1,
    "minimum": -1
   },
   "sentiment": {
    "enum": [
     "positive",
     "negative",
     "neutral"
    ],
    "type": "string"
   },
   "confidence": {
    "type": "number",
    "maximum": 1,
    "minimum": 0
   }
  }
 },
 "example": {
  "score": 0.85,
  "emotions": {
   "joy": 0.7,
   "trust": 0.6,
   "surprise": 0.2
  },
  "sentiment": "positive",
  "confidence": 0.92
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/asterpay-ai-sentiment-analysis-58aa8579/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.asterpay.io](https://www.zero.xyz/host/x402.asterpay.io/llms.txt)
