---
name: sureapis
description: Six pay-per-call APIs for autonomous agents — schema extraction from text and images, business-time resolution, SQL policy guarding, Base transaction preflight, and safe web fetching. Paid with x402 (USDC on Base mainnet), no account or API key.
---

# SureAPIs portfolio

SchemaSure operates six paid capabilities for autonomous agents. Every one
shares the same rail: x402 V2 with USDC on Base mainnet (`eip155:8453`), no signup, no API
key, and charge-only-on-success — a call that fails to produce a usable result is not settled.

## Pick an API

| API | Use when | Endpoint | Price |
| --- | --- | --- | --- |
| SchemaSure — Text extraction | you hold unstructured text or HTML and need JSON that matches a schema you supply | `POST https://schemasure.com/v2/extract` | $0.01/call, flat, failed calls free |
| SchemaSure — Image extraction | you hold a document image — scan, receipt, form, label, or screenshot — and need JSON that matches a schema you supply | `POST https://schemasure.com/v2/extract-image` | $0.03/image, flat, failed calls free |
| ChronoSure — Business time | you must resolve a local time, a DST ambiguity, a business-day offset, or a public holiday for a timezone | `POST https://chrono.schemasure.com/v1/business-time` | $0.01/call list |
| SQLPermit — SQL guard | you are about to execute a PostgreSQL statement and need it checked against a policy first | `POST https://sqlpermit.schemasure.com/v1/guard/sql` | $0.01/call list |
| TxGuard — Transaction preflight | you are about to sign a Base transaction or an x402 payment authorization and need to know what it actually does | `POST https://txguard.schemasure.com/v1/tx/preflight` | $0.01/call list |
| SafeFetch — Safe fetch | you must read an untrusted web page and want the prose without the instructions hidden inside it | `POST https://safefetch.schemasure.com/v1/fetch` | $0.01/call list |

Prices marked "list" are for orientation. The authoritative amount, network, asset, and payee always
come from the live 402 challenge — validate it rather than hardcoding terms.

## How to pay (identical for all six)

1. Send the request with no payment header. You receive `402` with a base64 `PAYMENT-REQUIRED` header.
2. Decode it and check the price, network, asset, `payTo`, and resource against what you expect.
3. Sign those exact terms locally with an x402 V2 wallet. Your private key never leaves your process.
4. Retry the identical request with the `PAYMENT-SIGNATURE` header.
5. On `200`, read `PAYMENT-RESPONSE` for the settlement receipt.

## Extraction quickstart

This origin serves the two extraction capabilities. Text and HTML go to `POST /v2/extract`;
base64 image bytes go to `POST /v2/extract-image`. Both take the JSON Schema you want back and
guarantee the response validates against it (Ajv, draft 2020-12) or you are not charged.

```json
{
  "input": "Invoice #A-1042 — Acme Corp. Total due: $1,299.00 USD on 2026-08-01.",
  "schema": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "invoiceNumber",
      "total",
      "currency",
      "dueDate"
    ],
    "properties": {
      "invoiceNumber": {
        "type": "string"
      },
      "total": {
        "type": "number"
      },
      "currency": {
        "type": "string",
        "enum": [
          "USD",
          "EUR",
          "GBP"
        ]
      },
      "dueDate": {
        "type": "string",
        "format": "date"
      }
    }
  }
}
```

To evaluate extraction quality before connecting a wallet, the legacy `POST /extract` endpoint
allows 3 free calls per client. There is no free image endpoint.

The biggest accuracy lever is a per-field `description` in your schema: it tells the engine how to
interpret a value, for example "tax rate as a decimal such as 0.0725".

## Errors

Every error is JSON: `{"error":{"code":string,"message":string,"details"?:any}}`. Never HTML.

- `400`/`413` — fix the request; do not retry it unchanged.
- `402` — sign the live challenge, or fetch a fresh one, then retry the identical body.
- `422` — the input or schema could not yield a usable result; nothing was charged.
- `429` — wait for `Retry-After`.
- `5xx` — nothing was charged; retry with bounded exponential backoff.

## Full documentation

- This service: https://schemasure.com/llms.txt and https://schemasure.com/openapi.json
- Machine-readable portfolio index: https://schemasure.com/apis.json
- ChronoSure: https://chrono.schemasure.com/llms.txt and https://chrono.schemasure.com/SKILL.md
- SQLPermit: https://sqlpermit.schemasure.com/llms.txt and https://sqlpermit.schemasure.com/SKILL.md
- TxGuard: https://txguard.schemasure.com/llms.txt and https://txguard.schemasure.com/SKILL.md
- SafeFetch: https://safefetch.schemasure.com/llms.txt and https://safefetch.schemasure.com/SKILL.md
