x402 Content Classifier
Classify text or structured data into categories using Claude AI. Optional confidence scoring and multi-label output. Part of the x402 micropayment task market.
Live service: https://project-classifier-production.up.railway.app (pending deployment)
Smithery: gary-edgington/x402-content-classifier (pending submission)
Payment: $0.005 USDC per call · x402 v2 · Base mainnet
Supported Classification Modes
| Preset | Labels | Use case |
|---|---|---|
sentiment | positive, neutral, negative | Tone analysis |
topic | technology, finance, health, legal, science, sports, other | Content routing |
intent | question, request, complaint, feedback, informational | Support triage |
urgency | critical, high, medium, low | Prioritization queues |
custom | caller-supplied taxonomy | Any domain |
Endpoints
POST /v1/classify — Paid
Requires x402 payment header. $0.005 USDC on Base mainnet.
Request body:
{
"input": "<text or JSON string to classify>",
"input_type": "text",
"preset": "sentiment",
"taxonomy": [],
"multi_label": false,
"explain": true
}
Query params:
?multi_label=true— return ranked list of all matching labels rather than a single top label.
Response (200):
{
"label": "positive",
"confidence": 0.92,
"labels": [
{"label": "positive", "confidence": 0.92},
{"label": "neutral", "confidence": 0.06},
{"label": "negative", "confidence": 0.02}
],
"reasoning": "The text expresses strong satisfaction and approval with no negative indicators.",
"meta": {
"preset": "sentiment",
"multi_label": false,
"input_type": "text",
"model": "claude-haiku-4-5"
}
}
Response (402 — no payment):
{
"x402Version": 2,
"accepts": [{
"scheme": "exact",
"network": "eip155:8453",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "5000",
"payTo": "0x8fC4006534801c17A3368075A1Fb3b3C511EdB1F",
"maxTimeoutSeconds": 300
}],
"error": "Payment required"
}
POST /v1/classify/trial — Free
No payment required. Same classification logic. Limits: 4KB max input, single-label only, sentiment and topic presets only.
GET /health
{ "status": "ok", "service": "classifier-agent", "version": "0.1.0" }
MCP Tool
This service exposes a single MCP tool via SSE transport for use with MCP-compatible agents and Claude Desktop.
SSE endpoint: https://project-classifier-production.up.railway.app/sse
classify_content
Classify text or structured data into a category using Claude AI.
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | ✅ | Text or JSON string to classify |
input_type | string | — | text (default) or json |
preset | string | — | sentiment, topic, intent, urgency, or custom |
taxonomy | array | — | Custom label list (required when preset=custom) |
multi_label | boolean | — | If true, return ranked label list |
explain | boolean | — | If true, include reasoning string |
x402 Payment Details
| Setting | Value |
|---|---|
| Network | Base mainnet (eip155:8453) |
| USDC contract | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| Amount | 5000 atomic units ($0.005) |
| Receiving wallet | 0x8fC4006534801c17A3368075A1Fb3b3C511EdB1F |
| Facilitator | https://api.cdp.coinbase.com/platform/v2/x402 |
| EIP-712 domain | USD Coin |
Pipeline Example
Agents can chain services via the A2A hub discovery manifest:
Raw CSV → Formatter (/v1/format) → Classifier (/v1/classify)
Raw JSON → Schema Checker (/v1/schema-check) → Classifier (/v1/classify)
Each hop settles independently on Base mainnet via x402.
Ecosystem
This service is part of a three-service x402 task market:
- SchemaCheck Agent — JSON Schema validation
- Formatter — data format conversion
- Classifier (this service) — content classification
- A2A Hub — service discovery
Full capability manifest: GET https://project-a2a-production.up.railway.app/v1/capabilities
服务器配置
{
"mcpServers": {
"x402-classifier": {
"url": "https://web-production-2d1051.up.railway.app/sse"
}
}
}