{"uid":"cap_mSWjEo_UPnuqB0buDB6PJ","slug":"three-ws-ai-tutor-pay-per-question-coding-learning-api-1c5114bf","name":"three.ws AI Tutor — Pay-Per-Question Coding & Learning API","description":"Make a 3D AI agent from a selfie in 60 seconds. Drop one HTML tag to embed it on any website. Agents think on IBM watsonx.ai (Granite); optionally charge per chat with built-in micropayments.","url":"https://three.ws/api/x402/tutor","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"level":{"enum":["beginner","intermediate","expert"],"type":"string","default":"intermediate","description":"Target expertise level — controls depth and assumed background."},"context":{"type":"string","maxLength":6000,"description":"Optional code or context to ground the explanation."},"question":{"type":"string","maxLength":2000,"minLength":5,"description":"The question to be explained."},"sessionId":{"type":"string","maxLength":100,"description":"Stable session identifier to accumulate a running tab. Omit to start a new session."}}},"responseSchema":{"type":"json","example":{"level":"beginner","model":"llama-3.3-70b-versatile","answer":"Each call to f() adds a frame to the call stack and never returns, so the stack grows until it exceeds its limit. Recursion needs a base case that stops the calls.","example":"function f(n){ if (n <= 0) return 0; return n + f(n - 1); }","followUp":"How would you convert this recursion into an iterative loop?","keyPoints":["Every function call consumes a stack frame.","Recursion without a base case never unwinds.","Add a condition that returns without recursing."],"sessionId":"8f1c0c2e-2a4d-4b6e-9b1a-3c5d7e9f0a1b","attestation":"sha256:abcd1234...","sessionTotal":"30000","questionCount":3,"costThisCharge":"10000","sessionTotalUsd":"0.030000","costThisChargeUsd":"0.010000"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_uKRwuYYYKb4-pyA2yqXY2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Answers a user's educational question using an LLM, returning a structured explanation with key points, a code example, a follow-up question, and session tracking — billed $0.01 USDC per call via x402 micropayments.","exampleAgentPrompt":"Ask the three.ws tutor to explain why infinite recursion causes a stack overflow, at a beginner level — I want the key points, a corrected code example, and a follow-up question to keep learning.","exampleUseCases":[{"title":"Interactive coding bootcamp with per-lesson billing","prompt":"Start a tutoring session with the three.ws agent. I'm learning JavaScript and want to understand closures — give me a beginner-friendly breakdown, show me a working code example, and suggest what I should learn next. Bill me per question so I only pay for what I actually use."},{"title":"Embedded web tutor for student support sites","prompt":"Create a 3D AI tutor from my photo and embed it on our learning platform. When students ask it to explain Python decorators with examples and key takeaways, track how many questions they've asked this session and show them the running cost in USDC."},{"title":"Technical interview prep with concept drills","prompt":"Use the three.ws agent to quiz me on data structures — ask it to explain what a hash table is, why it's efficient, give me a real implementation example, and then ask me a follow-up question to deepen my understanding. I want session tracking so I know how many concepts I've covered."}],"resultDescription":"Returns a JSON object with: a natural-language answer, an array of key points, a working code example illustrating the concept, a suggested follow-up question, the session ID, question count, per-call cost in USDC and USD, session running total in USDC and USD, and a SHA-256 attestation hash for the response.","failureModes":["Payment not provided or insufficient — x402 Payment Required response","Invalid or malformed session ID — session state not found","Question field missing or empty — 400 Bad Request","LLM backend unavailable — 503 or timeout","Rate limit exceeded on underlying LLM provider"],"whenToPreferThis":"Choose this endpoint when you need structured, LLM-generated educational explanations with built-in per-call micropayment billing via x402 — especially when you want session continuity, cost tracking across multiple questions, a code example, and a follow-up prompt baked into the response. Prefer this over generic LLM APIs when you need pay-as-you-go tutoring with attestation and session accounting.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:43:26.612Z","isFirstParty":false}