Hirakumi Link Cardano API Payments to Response Checks

AI agents dey buy packs of API calls, and dem go deduct credits only when response meet conditions wey dem publish. Escrow option dey use signed receipts take calculate payments and return any balance wey remain.

By SongMarketCap

Updated:

Cardano News - Hirakumi Link Cardano API Payments to Response Checks

Hirakumi dey allow AI agents keep the credits wey dem buy if data service return stale information, miss fields, or the request fail. Dem develop am for TOKEN2049, and the prototype connect existing APIs with x402 payments and the Masumi agent registry. E dey run currently for Cardano Preprod using test USDM tokens.

A Price Request Show How API Credits Take Work

The public Live Crypto Prices example dey demonstrate the billing rules. One agent go request cryptocurrency price, and the API must return the required fields with timestamp wey no pass 15 minutes old.

Reading wey don reach one hour old go fail the check and e no go consume any credit. Failed requests and responses wey miss required fields go receive the same treatment. When response meet the conditions, the agent go receive am and the pack balance go reduce by one credit.

The displayed offer price 100 calls at 2 tUSDM. One payment on Cardano dey fund the pack, after that individual requests go pass through Hirakumi gateway without separate blockchain transaction for each response.

One JSON Schema rule dey define the required fields, data types, and the permitted age of the information. The gateway dey check responses against those conditions before e deduct credits. These checks dey establish format and freshness; dem no dey independently confirm say the reported market price accurate.

Existing APIs Connect to Masumi Agents

According to the project documentation, providers fit list API without changing im code. Dem go supply im address and sample requests, verify domain ownership through DNS record, and sign to connect payout address. Hirakumi go run test calls and prepare the service description.

The provider go approve the price and response conditions before publication. Cryptographic hash go record those conditions before any sale, and the service go register on Masumi make agents fit discover am.

When agent request paid access, x402 go return HTTP 402 response wey contain the offer. The agent go pay for pack and use im credits through Hirakumi gateway, wey go call the underlying API and validate the results. Any provider API key wey dem require go remain with the gateway.

The roles clear: Masumi dey supply registration and discovery, x402 dey connect web requests with payment, and Hirakumi dey check the delivered responses. Providers fit also begin setup by assigning task to the Hirakumi agent on Sokosumi.

Cardano Escrow Settle Accepted Usage

Hirakumi dey support direct payment and escrow. Direct payments dey go straight to the provider while the gateway dey track credits. Escrow go lock funds inside Cardano smart contract wey dem write with Aiken.

The escrow option dey intended for bigger packs, new providers, services wey get weaker availability, or buyers wey request am. For this model, the buyer agent go also check responses and sign receipts for the ones e accept.

Settlement go use those receipts to calculate final distribution, with chance to submit newer receipt before the pack close. According to the project, the provider go receive payment for accepted responses, Hirakumi go collect 3% fee, and the remaining funds go return to the buyer.

The public site dey link to test transactions for registration and settlement. Im status page dey separate automated availability checks from paid activity and e dey record service interruptions.

The browser demo join the components together: visitors fit request price through the gateway, inspect the response and receipt, and see the remaining credits inside the test pack. The interface also dey provide the service Masumi registry identifier and payment transaction make people fit inspect am.