---
title: "Analyze sentiment"
method: POST
path: "/v1/apple/nlp/sentiment"
tags: ["Apple"]
---

# Analyze sentiment

`POST /v1/apple/nlp/sentiment`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/apple/nlp/sentiment`
- Auth: HTTP bearer

Returns a sentiment score (-1 to 1) and label (positive/negative/neutral).

## Request body

- TextRequest
  - `text` string, required: Input text to analyze

## Response `200`

Sentiment analysis

- object
  - `score` number
  - `label` 'positive' | 'negative' | 'neutral'

## Other responses

- `400`: Invalid request

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
