---
title: "Sentiment Classification"
method: POST
path: "/v1/sentiment-classification"
tags: ["documents"]
---

# Sentiment Classification

`POST /v1/sentiment-classification`

## Request

- Base URL: `https://agent.pocket.network`
- URL: `https://agent.pocket.network/v1/sentiment-classification`
- Auth: none required

Lexicon-based sentiment scoring: label a text positive, negative or neutral with a score and the positive and negative word hits behind it (AFINN-derived word list, not a trained model). POST /v1/sentiment with {text}. Deterministic. Pay per request in USDC; no account, no API key.

## Request body

- object: The request body for POST /v1/sentiment.
  - `text` string, required: The text to score.

## Response `200`

The upstream response, served after payment settles.

- object: For POST /v1/sentiment, a JSON object with label, score, positive_hits, negative_hits and the lexicon used. Errors return a JSON object with an `error` field. Properties are pinned from live paid responses; nothing is required, because every route's 2xx response is validated against this one schema.
  - `label` string
  - `score` number
  - `positive_hits` number
  - `negative_hits` number
  - `lexicon` string
  - `deterministic` boolean
  - `service` string

## Other responses

- `400`: Malformed request.
- `402`: Payment required. The x402 v2 terms are in the PAYMENT-REQUIRED header and, identically, in this body; sign the chosen option and retry with the PAYMENT-SIGNATURE header. The receipt arrives in PAYMENT-RESPONSE.
- `503`: This service is not currently available to serve.

---

[API](https://skmtc.dev/pocket/apis/pocket-agentic-portal.md) · [All operations](https://skmtc.dev/pocket/apis/pocket-agentic-portal/llms.txt) · [OpenAPI document](https://skmtc.dev/pocket/apis/pocket-agentic-portal/revisions/96d2176db014?raw)
