# x402 Demo API – Sentiment Analysis

> x402 Demo API – Sentiment Analysis is a paid API for AI agents from x402-demo-api-theta.vercel.app, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Analyzes the sentiment of a given text, returning a sentiment classification (e.g. positive, negative, neutral) and confidence score, paid via x402 protocol on Base mainnet.

## Facts

- Endpoint: POST https://x402-demo-api-theta.vercel.app/api/sentiment
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-demo-api-sentiment-analysis-9b222d6e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SdYPjmiI4PjND0cWFE9R2

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 x402-demo-api-sentiment-analysis-9b222d6e -d '<json body>'
```

Example prompt: Can you analyze the sentiment of this customer review and tell me if it's positive, negative, or neutral along with a confidence score: "The product arrived quickly but the packaging was damaged and customer support was unresponsive."

## When to prefer this

Choose this endpoint when you need a quick, pay-per-use sentiment classification with no subscription required, especially in an x402-enabled agent workflow on Base mainnet. Good for one-off or low-volume sentiment checks on arbitrary text without committing to a full NLP platform.

## Known failure modes

- Missing or empty text input returns a 400 error
- Payment not processed via x402 on Base mainnet returns a 402 Payment Required
- Text too long or malformed request body returns a 422 error
- Service downtime on Vercel returns a 503

## How this service works

Paid API with real data: AI/LLM, crypto prices, web search, translation, trending topics, sentiment analysis, aggregator, and more. All endpoints use x402 protocol on Base mainnet.

## Output

Returns a sentiment classification label (positive, negative, or neutral) and a confidence score indicating how strongly the text aligns with that sentiment.

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-demo-api-sentiment-analysis-9b222d6e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-demo-api-theta.vercel.app](https://www.zero.xyz/host/x402-demo-api-theta.vercel.app/llms.txt)
