ERGO
Back to demos
API demo

Agent API Payment

A direct paid API call for agents: request, price, agreement, payment proof, work result and receipt log.

Status

Prototype

Prototype

This is the simplest on-ramp for builders who want to monetize agent-readable APIs without pretending the payment alone proves useful work.

Flow

What happens

  1. 1Agent calls an API endpoint with a requested task.
  2. 2API returns price, deadline and Agreement fields.
  3. 3Agent accepts under policy and submits payment proof.
  4. 4API returns data plus a verification receipt.
  5. 5Client stores the receipt bundle for replay and dispute handling.

Receipt shape

Fields to inspect

apiRoute
taskHash
deadline
paymentProof
responseHash
providerSignature

Run modes

Mock

Available first

Useful for SDK adopters and API providers before live settlement is connected.

Testnet

Next

Adds a real settlement reference once the Ergo rail path is ready.

Safety rules

Deadlines must be explicit.

Response hashes should avoid exposing private data.

Refund or refusal paths must be documented before mainnet.

Prototype event stream

What becomes live

Add a mock paid API endpoint that returns the same receipt shape exposed by the event stream.

agreement.createdsettlement.recorded

API preview

Open JSON
curl https://www.ergoblockchain.org/api/agent-economy/events

This endpoint is prototype telemetry. It is intentionally separate from live usage counters until demos emit signed receipts.

Expected JSON

Demo output shape

No mainnet
{
  "route": "/v1/agent/data",
  "agreementId": "acc_api_demo_001",
  "responseHash": "blake2b256:...",
  "settlement": { "status": "mock-recorded" }
}