---
name: aptu-dev
description: Machine-payable API infrastructure for autonomous agents; x402 per-call settlement in USDC on Base. Free surfaces: /.well-known/x402, /v1/catalog, /v1/openapi.json, and the free /v1/x401-probe demand probe.
---

# aptu.dev skill

aptu.dev hosts x402 machine surfaces for autonomous agents.

## Usage

- Discover payment requirements: GET https://aptu.dev/.well-known/x402
- List endpoints: GET https://aptu.dev/v1/catalog
- API schema: GET https://aptu.dev/v1/openapi.json
- Site summary: GET https://aptu.dev/llms.txt
- Paid probe: POST https://aptu.dev/v1/echo with a JSON `{message}` body; $0.01 USDC via x402 (402 challenge on first call)
- Paid scorer: POST https://aptu.dev/v1/resume-eval with a JSON `{resume_text, format, job_description?}` body; $0.005 USDC via x402 (returns four ATS checks + total)
- Paid auditor: POST https://aptu.dev/v1/agent-readiness with a JSON `{domain}` body; $0.05 USDC via x402 (returns a 0-100 readiness score plus per-check findings)
- Paid pre-flight: POST https://aptu.dev/v1/x402-preflight with a JSON `{url}` body (https resource URL, optional `{resource}` override); $0.05 USDC via x402 (returns a graded 0-100 conformance report with rubricVersion, summary {fails, warns}, and findings each carrying check, pass, severity, detail, ms, hint, specRef; the public rubric lives at https://aptu.dev/x402-preflight-checks)
- Paid fix: POST https://aptu.dev/v1/readiness-fix with a JSON `{domain}` body; $0.05 USDC via x402 (returns nine ready-to-host machine-surface artifacts templated from the probe facts, each with its motivating finding; the public artifact contract lives at https://aptu.dev/readiness-fix-checks)
- Paid regime gate: GET https://aptu.dev/v1/btc-regime?spot=65000&closes=61000,62000,63000,63500,64000,64500,65000; $0.003 USDC via x402 (returns bull/bear, MA7, deviation pct, and an entry action; omit closes to read Kraken)
- Free self-check: GET https://aptu.dev/v1/self-check for per-fixture SHA-256 score hashes

## How to pay

All paid endpoints use the x402 protocol: the first unpaid call returns HTTP 402 with a Base64url-encoded JSON `PAYMENT-REQUIRED` header describing the payment terms.

Handshake contract:

- `PAYMENT-REQUIRED` and `PAYMENT-RESPONSE` header values are Base64url JSON.
- Decode recipe: replace `-` with `+`, replace `_` with `/`, pad with `=` to a multiple of 4, then base64-decode and `JSON.parse`.
- On retry, send the signed payment in a `PAYMENT-SIGNATURE` header with a body byte-identical to the original request.
- The settled 200 response carries a `PAYMENT-RESPONSE` receipt with `transaction`, `payer`, and `network`, plus `settledAmountUsdc`, `asset`, and `explorerUrl` for on-chain verification.

Payer prerequisites:

- Hold a USDC balance on Base mainnet covering the endpoint price; no ETH is needed (the facilitator covers gas).
- The EIP-3009 payment nonce is single-use; each retry after a failed signature needs a fresh payment signature.

Copy-paste paid client (Node 20+, `npm i @x402/fetch @x402/evm viem`):

```ts
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { ExactEvmScheme, toClientEvmSigner } from "@x402/evm";
import { createPublicClient, http } from "viem";
import { base } from "viem/chains";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount("0xYOUR_PRIVATE_KEY");
const publicClient = createPublicClient({ chain: base, transport: http() });
const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(toClientEvmSigner(account, publicClient)),
);
const fetchWithPay = wrapFetchWithPayment(fetch, client);

const res = await fetchWithPay("https://aptu.dev/v1/echo", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({ message: "hello" }),
});
```

The wrapper handles the 402 challenge, signs the EIP-3009 payment, and retries automatically; see llms-full.txt for exact per-endpoint response keys.
