# X Pay HTTP Request Classifier

> X Pay HTTP Request Classifier is a paid API for AI agents from www.api-xpay.com, paid per call via x402, $20/call, status unknown (last checked 2026-10-02).

Classifies an HTTP request body into a category (e.g. finance) with a confidence score, paid per-call via x402 USDC on Base.

## Facts

- Endpoint: POST https://www.api-xpay.com/x402/classify?utm_source=zero.xyz
- Price: $20/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x-pay-http-request-classifier-3370ae76
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DUZUm8GbObbKes8qcsjQK

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 x-pay-http-request-classifier-3370ae76 -d '<json body>'
```

Example prompt: Classify this HTTP POST request body as JSON — it's a payment transaction payload — and tell me what category it falls into and how confident you are.

## When to prefer this

Choose this endpoint when you need to programmatically determine the domain category (e.g. finance, commerce) of an HTTP request body with a confidence score, especially in a pay-per-use context where you don't want subscription overhead. Prefer it over bespoke classifiers when you need a lightweight, on-demand classification without managing ML infrastructure.

## Known failure modes

- Missing required 'input' object causes schema validation error
- Unsupported HTTP method (not POST/PUT/PATCH) causes enum rejection
- Malformed body or wrong bodyType causes parsing failure
- Low confidence score (e.g. 0.33) indicates ambiguous or unrecognizable request
- Payment failure via x402 results in 402 response before classification occurs

## How this service works

AI topic classification of text

## Output

Returns a JSON object containing: 'success' (boolean), 'category' (string label such as 'finance'), 'confidence' (float 0–1), 'asset' (e.g. 'USDC'), and 'network' (e.g. 'base').

## 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": {
     "type": "object"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "asset": "USDC",
  "network": "base",
  "success": true,
  "category": "finance",
  "confidence": 0.33
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x-pay-http-request-classifier-3370ae76/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.api-xpay.com](https://www.zero.xyz/host/www.api-xpay.com/llms.txt)
