# Tanship PayAI — Emotion Detection API

> Tanship PayAI — Emotion Detection API is a paid API for AI agents from x402.tanship.dev, paid per call via x402, $0.008/call, status unknown (last checked 2026-09-14).

Detects and classifies emotions from text or other input via a payment-gated AI endpoint using the x402 micropayment protocol on Base.

## Facts

- Endpoint: POST https://x402.tanship.dev/v1/ai/emotion
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tanship-payai-emotion-detection-api-3e7652d9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__ZjP5C4MfYSM8WAFdaImr

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 tanship-payai-emotion-detection-api-3e7652d9 -d '<json body>'
```

Example prompt: Can you analyze the emotion in this message: 'I waited 45 minutes and no one helped me — totally unacceptable'? I need to know what emotion it's expressing.

## When to prefer this

Choose this endpoint when you need lightweight, per-call micropayment-gated emotion detection without a subscription, especially in agentic pipelines that already use x402/USDC payments on Base. Ideal for low-volume or pay-as-you-go use cases where spinning up a dedicated NLP service is overkill.

## Known failure modes

- Missing or malformed 'input' object returns a 400/422 validation error
- Insufficient USDC payment or missing x402 payment header returns HTTP 402 Payment Required
- Empty or unsupported body content may yield low-confidence or null emotion results
- Network or edge inference latency may cause occasional timeouts
- Unsupported bodyType values other than json/form-data/text will be rejected

## How this service works

Payment-gated AI and browser automation API using the x402 protocol. All /v1/* endpoints require USDC payment on Base (eip155:8453) via x402 v2 exact scheme.

## Output

Returns an emotion classification or set of emotion labels (e.g. joy, anger, sadness, fear, surprise, disgust) along with confidence scores, describing the emotional content of the provided input text.

## 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"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tanship-payai-emotion-detection-api-3e7652d9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.tanship.dev](https://www.zero.xyz/host/x402.tanship.dev/llms.txt)
