Getting started: summarize 1,000 documents for under $1 — code walkthrough
by•
Here's the cost math for pay-per-use text AI:
1 USDC = 1,000 credits
Summarize: 10 credits/call → 100 summarizations per $1
Keywords: 5 credits/call → 200 keyword extractions per $1
Translate: 15 credits/call → 66 translations per $1
For a pipeline processing 1,000 documents, total cost = $10 in USDC. No monthly fee, no minimum.
Full working snippet:
BASE="https://textai-api.overtek.deno.net"
KEY=$(curl -s -X POST "$BASE/keys/create" | python3 -c "import sys,json; print(json.load(sys.stdin)['apiKey'])")
curl -s -X POST "$BASE/summarize" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Your document text here", "max_sentences": 3}'Top up with USDC when you need more credits. Launching April 7. What kind of document processing are you working on?
4 views


Replies
Thanks for checking this out! A few more things that might be useful:
Python snippet (3 lines to start):
Real batch processing pattern: Store your API key once, loop over documents, track credits. At 10 credits/call, a 1,000-doc pipeline costs exactly 10,000 credits = $10 USDC. Predictable cost, no surprises.
The USDC payment is on Solana devnet right now (test network), so you can try the full credit-buying flow with zero real money. Full walkthrough: https://gist.github.com/mokchou/...