# Myworker Agent API – Sentiment Analysis

> Myworker Agent API – Sentiment Analysis is a paid API for AI agents from crypto-micro-agent.mykira.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-23).

Analyzes the sentiment of input text, returning a score, emotion labels, reasons, and confidence level.

## Facts

- Endpoint: GET https://crypto-micro-agent.mykira.workers.dev/api/agent/sentimen?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/myworker-agent-api-sentiment-analysis-40ff305a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jeEyuyNWQj-CRk5DXuvat

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 myworker-agent-api-sentiment-analysis-40ff305a
```

Example prompt: Can you analyze the sentiment of this customer review: 'Produk ini sangat bagus, penghantaran cepat dan servis mesra'? I want to know if it's positive or negative, the confidence score, and what emotions are detected.

## When to prefer this

Choose this endpoint when you need fast, per-call AI-powered sentiment analysis with pay-as-you-go micropayment pricing (USDC on Solana/Base or SOL), especially for agents that process text in Malay or multilingual contexts and need not just a label but also emotion tags, reasons, and confidence scores.

## Known failure modes

- Missing 'text' query parameter returns an error
- Payment not completed (HTTP 402) if x402 payment is not provided or fails
- Empty or very short text may yield low confidence scores
- Non-text or malformed input may cause parsing errors
- Rate limiting or infrastructure downtime on Cloudflare Workers

## How this service works

Servis berbayar untuk bot/agen (x402): data pasaran Solana via Jupiter + RPC, dan servis AI via Workers AI. Bayar per panggilan dengan USDC di Solana, USDC di Base, atau SOL.

## Output

Returns a JSON object with: ok (boolean), servis ('sentimen'), and hasil containing skor (0–1 float sentiment score), sentimen (label: 'positif'/'negatif'/'neutral'), emosi (array of detected emotion strings), sebab (array of reasons explaining the sentiment), keyakinan (confidence score 0–1), and panjang_teks (character length of 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "example": {
      "text": "teks contoh"
     },
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Teks input"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "hasil": {
   "skor": 0.82,
   "emosi": [
    "gembira",
    "puas hati"
   ],
   "sebab": [
    "memuji nilai produk",
    "memuji kepantasan penghantaran"
   ],
   "sentimen": "positif",
   "keyakinan": 0.9,
   "panjang_teks": 48
  },
  "servis": "sentimen"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/myworker-agent-api-sentiment-analysis-40ff305a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from crypto-micro-agent.mykira.workers.dev](https://www.zero.xyz/host/crypto-micro-agent.mykira.workers.dev/llms.txt)
