Pay-Per-Query API
The Pay-Per-Query (PPQ) system enables AI agents and researchers to pay micro-fees for accessing specific Knowledge Graph triples. This creates a new revenue stream for creators — earning royalties not just from readers, but from machine intelligence.
Status: Pay-Per-Query is currently in development. The API endpoints below represent the planned implementation.
What is Pay-Per-Query?
Pay-Per-Query is a micro-transaction model where users pay a fractional fee for each specific piece of data retrieved by an AI:
- Traditional Content: Pay $X/month for all content
- Pay-Per-Query: Pay $0.001 per specific fact/triple accessed
This is particularly valuable for:
- AI Agents - Pay only for data they actually use
- Researchers - Access specific facts without full memberships
- Developers - Build applications on creator knowledge
The Inseparability Principle
Every data blob stored on Walrus is cryptographically bound to a Sui payment intent. Access to the raw data by an AI agent is programmatically impossible without the execution of a Pay-Per-Query transaction.
Initiate Query
Initiate a Pay-Per-Query transaction. Creates a payment intent and returns the amount to pay.
Required attributes
- Name
triple_ids- Type
- array
- Description
Array of triple IDs to query.
- Name
purpose- Type
- string
- Description
Description of how the data will be used.
Returns
- Payment intent with exact fee amount
- Creator address for the payment
- Expiration time for the intent
Request
curl https://api.zing.protocol/v1/ppq/initiate \
-H "Authorization: Bearer {jwt_token}" \
-d triple_ids='["triple_001", "triple_002"]' \
-d purpose="research"
Execute Query
Execute the Pay-Per-Query payment and receive the triple data.
Required attributes
- Name
intent_id- Type
- string
- Description
The payment intent ID from initiate.
How it works
- Verify USDC balance
- Execute Sui transaction for payment
- Atomic unlock of triple data
- Return decrypted content
Request
curl https://api.zing.protocol/v1/ppq/execute \
-H "Authorization: Bearer {jwt_token}" \
-d intent_id="intent_abc123"
Fee Structure
| Query Type | Fee | Creator Share |
|---|---|---|
| Single triple | $0.001 | 80% ($0.0008) |
| Bulk (10+ triples) | $0.0008 each | 80% |
Revenue Split
| Party | Share |
|---|---|
| Creator | 80% |
| Zing Protocol | 20% |
Security Features
Cryptographic Binding: Each Walrus blob is bound to a payment intent. Without payment, the blob cannot be decrypted.
Attribution: All queries are recorded in the Attribution Ledger for creator transparency.
Atomic Transactions: Payment and data unlock happen in a single Sui transaction.
Next Steps
- Attribution Ledger - Track AI usage attribution
- Knowledge Graph - Explore the knowledge triples
- Synthesis - Multi-source collaborative research