# fastapi.online Emotion Detection

> fastapi.online Emotion Detection is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Detects emotions expressed in a given text string using a self-hosted AI model

## Facts

- Endpoint: POST https://api.fastapi.online/emotion-detect
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastapi-online-emotion-detection-268d95ac
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hBSbaTfnFzfjijuXkcZhZ

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 fastapi-online-emotion-detection-268d95ac -d '<json body>'
```

Example prompt: Detect the emotion in this text: 'I can't believe they cancelled my order again — I'm absolutely furious and I want a refund immediately!'

## When to prefer this

Choose this endpoint when you need lightweight, pay-per-call emotion detection without a subscription or signup, especially in crypto-native or agent-driven pipelines using x402 payment protocol. Ideal for low-volume or bursty workloads where you pay $0.001 USDC per call rather than maintaining an API key subscription. Prefer over large LLM-based sentiment analysis when cost efficiency and speed matter more than nuanced reasoning.

## Known failure modes

- Empty or missing text field returns a 422 validation error
- Text exceeding 8000 characters is rejected
- Model inference timeout for unusually complex or long inputs
- Payment not included or insufficient results in a 402 Payment Required response
- Ambiguous or emotionless text may return low-confidence or neutral output

## How this service works

Chat, embeddings, OCR, speech-to-text, image editing, image understanding (captioning/Q&amp;A), text-to-speech, translation, writing tools, classification tools, developer tools, local utilities, format/checksum validators, encoding &amp; crypto utilities, date/time calculators, geo/coordinate math, math &amp; finance calculators, novelty tools, and business/social writing generators — 179 endpoints in all, across multiple specialized self-hosted models. Pay per call with crypto — no signup — or get an API key.

## Output

Returns the dominant emotion detected in the input text, likely including an emotion label (e.g. anger, joy, sadness, fear, surprise, disgust) and potentially a confidence score. The response is structured JSON from the self-hosted inference model.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 8000,
   "minLength": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastapi-online-emotion-detection-268d95ac/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.fastapi.online](https://www.zero.xyz/host/api.fastapi.online/llms.txt)
