CheapTokens is beta/experimental software. Use at your own risk.

Agent Skill File

Machine-readable guide for agents and programs that want to buy and use discounted Venice.ai API credits through CheapTokens.

What CheapTokens is

CheapTokens sells discounted Venice.ai API credits using a time-decay model: discounts start at 10% at 00:00 UTC and increase toward 75% by 23:00 UTC. No signup, no account, no browser required. Pay with USDC on Base via x402 and immediately receive a Venice API key.

Agent decision flow

  1. GET /api/pricing → check discountPercent and supply.remaining
  2. GET /api/supply → confirm soldOut is false
  3. POST /api/buy with { usdPaid } via x402-fetch → save veniceApiKey
  4. Use key at https://api.venice.ai/api/v1 (OpenAI-compatible)
  5. GET /api/status/{veniceKeyLast6} → monitor usage
  6. Before midnight UTC expiry, purchase again if needed

Core endpoints

  • GET /api/pricing — current discount, credits per dollar, supply status
  • GET /api/supply — daily capacity and remaining credits
  • POST /api/buy — x402 payment flow, returns Venice API key
  • GET /api/status/:keyPrefix — key status, usage, expiry
  • GET /api/payments/health — check if payment system is available

x402 payment flow

  1. POST /api/buy with desired purchase amount.
  2. Receive HTTP 402 with payment requirements in header.
  3. Agent signs EIP-712 USDC authorization with wallet private key.
  4. Retry with signed X-PAYMENT header.
  5. 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 wallet
  • POST /api/wallet/reveal — reveal the full API key for a purchase
  • POST /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

Full specification with code examples, all models, pricing formula, error codes, and blockchain details is maintained in SKILL.md at the project root and served at /llms.txt.