A

Asterpay · AI Sentiment

by Asterpay

POSTBaseEthereumArbitrumPolygonOptimismeip155:1187947933

$0.004

per call · USD Coin on Base

Analyze sentiment of text. Returns positive/negative/neutral score.

Endpoint

POST https://x402.asterpay.io/v1/ai/sentiment

1

Calls / 30d

1

Unique payers / 30d

Sep 7

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://x402.asterpay.io/v1/ai/sentiment", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "text": "The text to analyze for sentiment..."
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://x402.asterpay.io/v1/ai/sentiment" \
  -H "Content-Type: application/json" \
  -d '{"text":"The text to analyze for sentiment..."}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "confidence": 0.92,
  "emotions": {
    "joy": 0.7,
    "surprise": 0.2,
    "trust": 0.6
  },
  "score": 0.85,
  "sentiment": "positive"
}

Payment details

Pay to0xd5f8481d8f25d3966d2010dbf9b47ffbdf745a9e
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Ethereum, Arbitrum, Polygon, Optimism, eip155:1187947933
Schemesexact

Is this your API?

Pin it to the top of Social & Community and the homepage with a featured placement.

Get featured →

More from Asterpay & similar services