Skill File Reference
CheapTokens publishes a public agent skill pack for discounted Venice.ai credits. Use the full repo for the CheapTokens router plus synced Venice skills, or the raw single-file skill when your runtime wants one SKILL.md URL.
Canonical skill locations
- Full skill pack: github.com/0xatd/cheaptokens-skills
- Raw CheapTokens router: raw.githubusercontent.com/.../skills/cheaptokens/SKILL.md
- Convenience mirror: cheaptokens.ai/SKILL.md
Agent decision flow
GET /api/pricing→ checkdiscountPercentandsupply.remainingGET /api/supply→ confirmsoldOutis falsePOST /api/buywith{ usdPaid }via x402-fetch → saveveniceApiKey- Use key at
https://api.venice.ai/api/v1(OpenAI-compatible) GET /api/status/{veniceKeyLast6}→ monitor usage- Before midnight UTC expiry, purchase again if needed
Core endpoints
GET /api/pricing— current discount, credits per dollar, supply statusGET /api/supply— daily capacity and remaining creditsPOST /api/buy— x402 payment flow, returns Venice API keyGET /api/status/:keyPrefix— key status, usage, expiryGET /api/payments/health— check if payment system is available
x402 payment flow
- POST
/api/buywith desired purchase amount. - Receive HTTP
402with payment requirements in header. - Agent signs EIP-712 USDC authorization with wallet private key.
- Retry with signed
X-PAYMENTheader. - Server verifies on-chain, settles USDC, returns Venice API key.
The x402-fetch npm package automates steps 2-4 automatically.
Key recovery (wallet-signed)
No account exists. Your wallet address is your identity. To recover or manage keys programmatically, sign an EIP-191 message with your wallet:
POST /api/wallet/purchases— list all purchases for your walletPOST /api/wallet/reveal— reveal the full API key for a purchasePOST /api/wallet/reissue— get a fresh key for active credits (e.g. if key was lost)
All wallet endpoints require: { walletAddress, signature, nonce, issuedAt }
Use cases for agents
- Burst workloads — buy credits for a specific task, use them, done
- Budget-capped runs — buy exactly the amount you need, no ongoing commitment
- Experiments — try models cheaply before committing to a provider
- Short-lived inference — disposable API keys that auto-expire at midnight
- Multi-model routing — all Venice models behind one key, switch freely
Headless buy — complete example (Node.js)
Requirements: npm install viem x402-fetch openai. You need a private key with USDC on Base.
The public source of truth is github.com/0xatd/cheaptokens-skills. The site-served /SKILL.md remains a convenience mirror for runtimes that want a single URL.