Run Inference Guide¶
This guide explains how to run AI inference on WasiAI using the pay-per-use model.
Quick Start¶
- Find a model in the catalog
- Enter your input in the "Run Model" panel
- Click "Run Model"
- Sign the payment in your wallet (no gas!)
- Get your result with transaction proof
Step-by-Step¶
1. Find a Model¶
Browse the model catalog to find an AI model:
- Search: Use keywords to find specific capabilities
- Filter: By category, price, or popularity
- Sort: By newest, most used, or price
2. View Model Details¶
Click a model card to see:
- Description: What the model does
- Pricing: Cost per inference
- Category: Model type
- Reputation: User feedback score
- Agent ID: On-chain identity
3. Prepare Your Input¶
In the "Run Model" panel:
- Enter your input text or data
- For classification models, you may add custom labels
- Review the price shown
Example inputs by model type:
| Model Type | Example Input |
|---|---|
| Sentiment Analysis | "Bitcoin hits new all-time high" |
| Classification | "How do I stake my tokens?" |
| Text Generation | "Explain smart contracts simply" |
4. Execute Inference¶
Click "Run Model" to start:
- First request: Sent without payment
- 402 Response: Server returns price
- Wallet popup: Sign the USDC authorization
- Second request: Sent with payment
- Result: Displayed with transaction link
5. Review Results¶
After inference completes, you'll see:
┌─────────────────────────────────────────┐
│ Result │
│ ─────────────────────────────────────── │
│ Sentiment: Positive │
│ Confidence: 94.2% │
│ │
│ Payment │
│ ─────────────────────────────────────── │
│ Amount: $0.0100 USDC │
│ Transaction: 0xabc123... [View] │
│ Status: ✓ Verified │
│ │
│ Feedback │
│ ─────────────────────────────────────── │
│ Was this helpful? [👍] [👎] │
└─────────────────────────────────────────┘
Understanding the Payment¶
What You're Signing¶
When you sign, you authorize: - Amount: Exact price shown (e.g., $0.01) - Recipient: Model's splitter contract - Validity: 60 seconds from signing - Token: USDC only
What You're NOT Signing¶
- No unlimited approvals
- No access to other tokens
- No permission to drain your wallet
Gasless Payments¶
You don't pay gas because: 1. You sign an authorization message (not a transaction) 2. A facilitator submits it to the blockchain 3. The facilitator pays the gas fee
Providing Feedback¶
After each inference, rate the result:
- 👍 Thumbs Up: Result was helpful/accurate
- 👎 Thumbs Down: Result was unhelpful/wrong
Why Feedback Matters¶
- Builds the model's reputation score
- Helps other users discover quality
- Incentivizes creators to maintain quality
- Recorded on-chain (ERC-8004)
Viewing History¶
Inference History¶
See all your past inferences:
- Go to your Dashboard
- Click Inference History
- View: model, input, result, payment, timestamp
Transaction Verification¶
Every payment is on-chain:
- Click the transaction link
- View on Snowtrace
- Verify: amount, sender, recipient, timestamp
Advanced Usage¶
Custom Labels (Classification)¶
For zero-shot classification models:
Batch Processing¶
For multiple inferences, use the API directly:
Programmatic Access¶
See the Inference API for: - Direct API calls - Integration examples - Response formats
Troubleshooting¶
"Insufficient USDC Balance"¶
Cause: Not enough USDC in your wallet
Solution: 1. Check your USDC balance 2. Get testnet USDC from faucet.circle.com
"Signature Rejected"¶
Cause: Wallet rejected the signing request
Solution: 1. Make sure you're on Avalanche Fuji network 2. Try disconnecting and reconnecting wallet 3. Clear browser cache
"Payment Expired"¶
Cause: Took too long to sign (>60 seconds)
Solution: Click "Run Model" again to generate a new payment
"Inference Timeout"¶
Cause: Model took too long to respond
Solution: 1. Try again (model may have been cold starting) 2. Use a smaller input 3. Try a different model
"Model Not Found"¶
Cause: Model ID doesn't exist or was delisted
Solution: Return to catalog and select a different model
Tips¶
Save Money¶
- Test with short inputs first
- Compare prices across similar models
- Consider a license for heavy use
Get Better Results¶
- Provide clear, specific inputs
- Follow the model's expected format
- Check the model description for tips
Verify Payments¶
- Always check the amount before signing
- Verify the transaction on Snowtrace
- Keep track of your spending in Dashboard