Quickstart
What you need: a wallet on X Layer holding a settlement stablecoin, and an HTTP client. There is no sign-up, no API key, and no dashboard to configure.
1. Find an endpoint
Browse the catalogue, or fetch it as JSON — the same data this site is built from:
curl "https://api.dana-edu.pp.ua/v1/catalog" 2. Call it, and read the price
curl -i -X POST "https://api.dana-edu.pp.ua/v1/text/statistics" \
-H "content-type: application/json" \
-d '{"text": "your input here"}'
You get 402 Payment Required. The body names the price, the asset, the
chain and the recipient. Nothing has been charged and nothing has been reserved.
3. Pay, and get your answer
Sign an authorisation for exactly what the challenge asked for, then retry with it
in the X-PAYMENT header.
Full detail here.
curl -i -X POST "https://api.dana-edu.pp.ua/v1/text/statistics" \
-H "content-type: application/json" \
-H "X-PAYMENT: <base64 authorisation>" \
-d '{"text": "your input here"}' Try it without paying
The catalogue, health and readiness routes are free, so you can confirm connectivity and see the exact shape of a challenge before committing to anything:
curl "https://api.dana-edu.pp.ua/health"
curl "https://api.dana-edu.pp.ua/v1/catalog"
curl -i -X POST "https://api.dana-edu.pp.ua/v1/text/statistics" -d '{"text":"hi"}' # the 402 Things that will save you time
- A malformed request is refused before a price is quoted. If you
get a
400, fix the request — no payment was involved. - Never reuse a nonce. A replayed authorisation is rejected, and the rejection names the request that already spent it.
- Parse money as decimal, not float. Every monetary value is a string for exactly this reason.
- Read
warnings. A successful response can still be telling you a document was truncated or a figure could not be verified.