# X Pay Sentiment Analysis

> X Pay Sentiment Analysis is a paid API for AI agents from www.api-xpay.com, paid per call via x402, $10/call, status unknown (last checked 2026-10-02).

Analyzes text sentiment and returns a positive/negative/neutral label with a confidence score, paid per-request via USDC on Base using the x402 protocol.

## Facts

- Endpoint: POST https://www.api-xpay.com/x402/sentiment?utm_source=zero.xyz
- Price: $10/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x-pay-sentiment-analysis-b6516fee
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_x23vVkZcewIVqt5Q3NlXF

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 x-pay-sentiment-analysis-b6516fee -d '<json body>'
```

Example prompt: Analyze the sentiment of this customer review for me: 'The product arrived quickly and works perfectly, but the packaging was a bit flimsy.' I need the label and confidence score.

## When to prefer this

Choose this endpoint when you need pay-per-request sentiment scoring without a subscription, particularly when operating in a crypto-native or x402-enabled agent workflow using USDC on Base. It is ideal for low-volume or on-demand classification tasks where you want to pay only for what you use, and when integration with Base blockchain payment rails is already in place.

## Known failure modes

- Missing or malformed 'input' body causes a validation error
- Insufficient USDC balance or failed x402 payment results in a 402 Payment Required response
- Unsupported HTTP method (not POST/PUT/PATCH) returns an enum validation error
- Empty or non-text body may produce low-confidence or erroneous sentiment scores
- Network or facilitator downtime may return a 503 or timeout

## How this service works

AI sentiment analysis of text

## Output

Returns a JSON object with a sentiment label (e.g. 'positive', 'negative', 'neutral'), a numeric confidence score between 0 and 1, the payment asset used (USDC), the network (Base), and a success boolean confirming the request completed.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "asset": "USDC",
  "label": "positive",
  "score": 0.8,
  "network": "base",
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x-pay-sentiment-analysis-b6516fee/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.api-xpay.com](https://www.zero.xyz/host/www.api-xpay.com/llms.txt)
