Thynk.ai

Pay only for what you use - Thynk makes AI and SaaS subscriptions pay-as-you-go.

Thynk.ai

Created At

ETHOnline 2025

Project Description

Today, most AI tools lock users into costly monthly subscriptions — even if they only use the AI occasionally. Millions of users pay $20–$30 every month for access to ChatGPT or Claude, but only chat a few times a week. Meanwhile, developers and startups face high barriers to entry when integrating multiple AI models due to complex billing, rate limits, and separate payment systems.

Thynk solves this by introducing a pay-as-you-chat model powered by Yellow Network. Instead of subscriptions, users deposit once and pay per message or per token, in real time, through instant, gasless off-chain microtransactions. When they end their session, balances are securely settled on-chain, ensuring transparency and full fund control.

🧩 How It Works Connect wallet & deposit USDC into a Yellow Network custody session safe contract. Chat instantly with GPT-4, Claude, Gemini or Deepseek - each message triggers a micro-payment off-chain via Nitrolite. See balance in real time as you chat. End session → Yellow automatically settles the total on-chain and returns unused funds.

⚙️ Tech Stack Frontend: React + Tailwind + Yellow SDK (Nitrolite integration) Backend: FastAPI + Redis (session & message state) Blockchain: Yellow Network (off-chain session logic + on-chain settlement) Models: GPT-4, Claude, Gemini, DeepSeek

💡 Why It Matters Cost-efficient: Users only pay for what they use- no more idle subscriptions. Instant & gasless: Off-chain state updates provide a Web2-speed UX with Web3 security. Model flexibility: One interface to chat with multiple AI models. Transparency: Every session ends with a verifiable on-chain receipt.

🚀 Impact Thynk democratizes access to powerful AI by making it affordable, transparent, and pay-per-use. It showcases how off-chain micro-payments and session-based logic can bring Web3 scalability to real-world AI apps, paving the way for decentralized AI economies.

How it's Made

We built Thynk as a full-stack dApp that combines instant off-chain payments with real-time AI inference showcasing how Yellow Network can power gasless, session-based microtransactions for AI services.

On the frontend, we used React + TypeScript + Tailwind to create a sleek chat interface where users can:

  1. Connect their wallet via the Yellow SDK,
  2. Deposit USDC (or test tokens) into a Nitrolite session safe,
  3. View their real-time off-chain balance,
  4. Select between GPT-4, Claude, or Gemini, and
  5. Send messages that instantly deduct per-use costs off-chain.
  6. Each chat message triggers a micro-transaction in the Nitrolite test environment, where balances are updated instantly without gas or confirmation delay simulating a true “Web2-speed, Web3-secured” UX.

On the backend, we built a FastAPI server that handles:

  1. AI routing across OpenAI, Anthropic, and Google APIs,
  2. Session creation and verification using Nitrolite session IDs and digital keys,
  3. Off-chain debit calls via the Yellow SDK, and
  4. Message + balance tracking using Redis for fast in-memory state management.
  5. When a user ends their session, the backend finalizes the total usage and triggers on-chain settlement through the Yellow SDK smart contract. Any unused balance is automatically returned to the user’s wallet, and a verifiable transaction receipt is displayed in the app.
  6. We used Docker Compose to containerize the frontend, backend, and Redis making the entire stack runnable locally in seconds.

To make the experience seamless, we built a custom message cost estimator that calculates the off-chain debit per message based on token length. We also implemented an experimental “Tip the AI” feature that lets users send instant micro-tips off-chain to reward valuable responses.

Partner technology from Yellow Network was crucial their Nitrolite protocol provided the instant off-chain payment layer, while smart contracts ensured trustless final settlements. This allowed us to demonstrate how AI and blockchain can work together for real-world micro-billing use cases that are impossible on traditional blockchains due to latency and gas fees.

In short, Thynk brings together AI inference, micro-payments, and blockchain transparency in one unified system — a hacky but powerful demonstration of real-time pay-per-use AI.

background image mobile

Join the mailing list

Get the latest news and updates