document · documents · data · document · diff · compare · textDocument diff
Compare two texts and return structured line additions, removals, and a unified diff.
$0.01 USDCBase + Solanax402 v2POST
Endpoint
https://apiacre.com/v1/document/diff
Send the JSON body below. An unpaid request returns HTTP 402 with a PAYMENT-REQUIRED header; an x402-compatible buyer signs the requirement and retries with PAYMENT-SIGNATURE.
Pay $0.01 USDC and run in your browser
Official Coinbase agent path
Coinbase Agentic Wallet can satisfy this x402 request in one command. Running it may pay automatically, so --max-amount is fixed to $0.01 USDC in atomic units. Copying the command does not install, authenticate, sign, or pay; review the request and use a separate low-value wallet before running it.
npx --yes awal@latest x402 pay https://apiacre.com/v1/document/diff \
-X POST \
-d '{"before":"status: draft","after":"status: approved"}' \
--max-amount 10000 \
--json
Coinbase pay-for-service documentation · Buyer setup and wallet safety
Alternative third-party AgentCash commands
Run check first without payment. Its fetch command may automatically pay up to the exact listed price.
npx --yes agentcash@latest check https://apiacre.com/v1/document/diff
npx --yes agentcash@latest fetch https://apiacre.com/v1/document/diff \
--method POST \
--header 'content-type: application/json' \
--body '{"before":"status: draft","after":"status: approved"}' \
--payment-protocol x402 \
--payment-network base \
--max-amount 0.010
AgentCash CLI documentation
Input example
{
"before": "status: draft",
"after": "status: approved"
}
Response shape
View free static sample JSON
{
"request_id": "018f1f54-7f38-7ba2-8dc3-5f90272d9f1a",
"service": "document.diff",
"version": "1",
"data": {
"diff": "--- before\n+++ after\n@@ -1 +1 @@\n-status: draft\n+status: approved",
"added": 1,
"removed": 1,
"changed": true
},
"meta": {
"duration_ms": 42,
"cached": false,
"sources": [],
"warnings": [],
"next_actions": []
}
}
Complete recipes using this API
These buyer-controlled recipes connect this service to compatible API Acre results. Every step has its own exact price and requires separate authorization.
Review two caller-supplied source snapshots with deterministic static signals, then optionally inspect exact line additions, removals, and a bounded unified diff. For the complete recipe, each snapshot must be no more than 500,000 characters. Neither step executes code or accesses the network, and each step requires a separate buyer authorization.
Inspect the 2-step recipe
Try the payment challenge
curl -i -X POST 'https://apiacre.com/v1/document/diff' \
-H 'content-type: application/json' \
--data '{"before":"status: draft","after":"status: approved"}'