Early preview

Gateway API documentation

Webmole currently exposes one tool: batch text classification. Start with the fixed, no-charge sample. The supplier-backed route is limited to developer-configured Base Sepolia testing and is not a production payment service.

Current status

  • The catalog and fixed demo are public.
  • The demo accepts no user text, makes no provider call, and charges $0.00.
  • The supplier-backed route returns 503 until its server-side testnet configuration is enabled.
  • End-to-end x402 testnet setup has not yet been proven.
  • Webmole has no native buyer wallet and never signs a payment for the caller.

Base URL

https://webmole.ai

Responses use JSON. Preview contracts may change; inspect the catalog before wiring a client. Do not send production or sensitive data to the testnet route.

GET

/api/tools

Returns the current catalog, tool limits, sample path, live route, and payment stage. Catalog discovery does not execute a tool or create a payment.

Request

curl --request GET \
  https://webmole.ai/api/tools

Response

{
  "name": "Webmole",
  "stage": "early-preview",
  "tools": [
    {
      "id": "classify-text",
      "name": "Batch text classification",
      "status": "sample-available",
      "sample": "/api/tools/classify/demo",
      "endpoint": "/api/tools/classify",
      "liveStatus": "testnet-configuration-required",
      "limits": {
        "texts": 10,
        "charactersPerText": 2000,
        "labels": 8
      }
    }
  ],
  "docs": "/docs",
  "payment": {
    "status": "not-live",
    "testNetwork": "eip155:84532",
    "custody": false
  }
}
POST

/api/tools/classify/demo

Returns a fixed fixture with three sample enquiries and a sample receipt. Send no request body: custom text is never read or forwarded by this route.

No charge · no provider call · no user input

Request

curl --request POST \
  https://webmole.ai/api/tools/classify/demo

Response shape

Receipt IDs and timestamps are generated by the server. The texts, labels, confidence values, provider label, and zero cost are fixed sample data.

{
  "mode": "sample",
  "tool": "classify-text",
  "provider": "Illustrative sample; no provider call",
  "rows": [
    {
      "text": "Can I get a quote for 50 units?",
      "label": "Sales",
      "confidence": 0.94
    },
    {
      "text": "How do I reset my password?",
      "label": "Support",
      "confidence": 0.98
    },
    {
      "text": "My invoice was charged twice.",
      "label": "Billing",
      "confidence": 0.97
    }
  ],
  "receipt": {
    "id": "sample-…",
    "cost": "0.00",
    "currency": "USD",
    "status": "sample",
    "createdAt": "<ISO-8601 timestamp>"
  }
}
POST

/api/tools/classify

Intended for a bounded supplier-backed classification test behind x402 on Base Sepolia (eip155:84532). The configured testnet price is a fixed $0.01 in test USDC. That amount is not a production price.

Input

FieldRequiredLimits
textsYes1–10 strings; 1–2,000 characters each after trimming
labelsYes2–8 unique strings; 1–80 characters each after trimming

The JSON body is capped at 32 KB. Extra fields, duplicate labels, empty values, and unsupported content types are rejected before payment handling.

Example request

This unsigned request shows the payload shape. When testnet configuration is enabled, an x402-compatible buyer client must handle the payment challenge and obtain the caller's approval before signing or sending payment.

curl --request POST \
  https://webmole.ai/api/tools/classify \
  --header 'Content-Type: application/json' \
  --data '{
    "texts": [
      "Can I get a quote for 50 units?",
      "How do I reset my password?"
    ],
    "labels": ["Sales", "Support", "Billing"]
  }'

A successful testnet response identifies mode as testnet, returns the classified rows, and includes a preview receipt. Settlement information comes from the PAYMENT-RESPONSE header; the JSON receipt is not production reconciliation.

Default response

Without complete server-side supplier, recipient, and testnet settings, the route fails closed:

HTTP/1.1 503 Service Unavailable
Content-Type: application/json

{
  "error": "Live payments are not enabled. Try the free sample at /api/tools/classify/demo.",
  "mode": "unconfigured"
}

Testnet payment flow

  1. 1

    Discover

    Read GET /api/tools and confirm the route is still testnet-only.

  2. 2

    Request

    Send a valid bounded classification payload.

  3. 3

    Review

    Inspect the x402 payment requirement and show the amount to the user.

  4. 4

    Approve

    Let the user approve and sign with their own compatible testnet client.

  5. 5

    Execute

    Resubmit payment proof; the server calls the configured supplier.

  6. 6

    Verify

    Read the result and payment response. Do not treat the preview receipt as production reconciliation.

Status codes

StatusMeaning
400Invalid JSON or input outside the classification contract.
402Payment required after the x402 testnet route is configured.
413Request body exceeds 32 KB.
415Content-Type is not application/json.
502The supplier did not return a valid successful classification result.
503Testnet configuration is absent or the payment service is unavailable.
Live paid release remains blocked until payment receipt reconciliation, replay handling, and supplier terms have been checked. Do not automatically retry a signed payment after an uncertain payment-service failure; verify its status first.