Credits & Payments
The platform utilizes a credit-based metering system to track usage and facilitate permissionless access.
Credit System
Usage is metered in Credits. The standard conversion rate is 1 Credit ≈ $0.001.
Operation Costs
| Operation | Cost (Credits) | Description |
|---|---|---|
| Create | 5 | Ingesting and vectorizing a new memory. |
| Search | 2 | Semantic search query against the index. |
| Update | 2 | Modifying existing memory content or metadata. |
| Get | 1 | Retrieving a memory by its specific ID. |
| Delete | 1 | Removing a memory from the index. |
Batch Operations
Batch endpoints use flat pricing (2× single operation) regardless of batch size, offering significant savings at scale.
| Operation | Cost (Credits) | Max Items | Savings vs Individual |
|---|---|---|---|
| Batch Search | 4 | 10 queries | Up to 80% |
| Batch Delete | 2 | 100 IDs | Up to 98% |
| Batch Update | 4 | 100 IDs | Up to 98% |
Pay-Per-Use Model
Unlike traditional cloud services that require provisioning servers based on predicted usage, zkStash operates on a true pay-per-use model.
No Idle Costs
You’re only charged for the resources you actively use. There’s no need to over-provision for peak loads or pay for idle capacity during quiet periods. This aligns pricing directly with actual utilization.
Flexibility
Our system scales seamlessly based on your demand:
- Traffic Spikes: Resources scale up automatically to meet demand.
- Quiet Periods: Resources scale down to minimize costs.
Focus on Innovation
Developers can concentrate on building features rather than optimizing infrastructure. The platform handles scaling automatically, allowing you to focus on creating value for your users.
Storage & Retention
Storage policies vary by plan to accommodate different use cases, from testing to production scaling.
Two Types of Memory Expiration
zkStash has two independent expiration mechanisms:
| Type | Applies To | Purpose | How It Works |
|---|---|---|---|
| User TTL | All plans | Developer-controlled expiration | Set ttl or expiresAt when creating/updating memories |
| System Retention | Free plan only | Platform resource management | 7-day rolling window for unpaid storage |
User TTL is your explicit intent—“delete this session context after 1 hour.” It applies regardless of plan.
System Retention is a platform policy—Free tier memories expire after 7 days to manage resources. Paid plans have permanent retention.
Both run on the same background job. User TTL is checked first (for all users), then system retention rules apply (Free tier only).
Plan Limits
| Plan | Included Memories | Retention | Overage Policy |
|---|---|---|---|
| Free | 0 | 7 Days (Default) | Memories deleted after 7 days unless insured. |
| Starter | 50,000 | Permanent | Metered billing for excess storage. |
| Pro | 500,000 | Permanent | Metered billing for excess storage. |
Metered Overages (Paid Plans)
For Starter and Pro plans, storage beyond the included limit is billed automatically via Stripe at the end of the billing cycle.
- Starter: 20% discount on standard rates.
- Pro: 40% discount on standard rates.
Storage Insurance (Free Plan)
The Free plan is designed for testing and includes 0 permanent memories. By default, memories are retained for 7 days and then deleted.
To keep memories permanently on the Free plan, you can use Storage Insurance:
- Maintain a positive Credit balance in your account.
- A daily cron job deducts a small storage fee from your balance.
- Cost: ~3.33 Credits per 1,000 memories / day.
- If your balance runs out, the 7-day retention policy resumes.
Permissionless Credit Deposits
Autonomous agents can deposit credits via the x402 protocol without requiring a dashboard login or human intervention. This is critical for agents that need to fund their own storage insurance.
Endpoint: POST /api/v1/credits/deposit
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
amount_usd | number | Amount to deposit in USD (min: 1000) |
Flow:
- Agent calls
POST /api/v1/credits/deposit?amount_usd=5 - Server returns
402 Payment Requiredwith payment requirements - Agent signs an x402 payment and retries with the
x-paymentheader - Server verifies, settles, and credits the full amount to the balance
- Agent receives confirmation with updated balance
Example Response (Success):
{
"success": true,
"deposit": {
"amount_usd": 5,
"credits": 5000
},
"balance": {
"credits": 5000,
"usd": 5
},
"message": "Deposit successful. Storage insurance is now active."
}This enables self-sovereign agents that can earn revenue and autonomously pay for their own existence—a capability unique to crypto-native AI platforms.
Rate Limits
To ensure fair usage and system stability, we enforce rate limits based on your plan.
| Plan | Requests / Minute | Requests / Hour | Requests / Day |
|---|---|---|---|
| Permissionless (x402) | 10 | 300 | 5000 |
| Starter | 100 | 3000 | 50000 |
| Pro | 500 | 15000 | 250000 |
x402 Protocol
x402 is an open standard for payment-required HTTP requests. It allows agents to pay for resources directly within the request flow.
Mechanism
- Challenge: If a request requires payment, the server responds with a
402 Payment Requiredstatus and details about the required payment (amount, token, recipient). - Payment: The agent signs a transaction or message authorizing the payment.
- Retry: The agent retries the request with the payment proof (signature) in the
x-payment-sigheader.
We currently support x402 payments on Solana and Base networks. This enables fully autonomous agents to manage their own operational costs without human intervention.